Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3170] Android Bug: JSS ignored if file has an include

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:01:06.000+0000
Affected Version/sn/a
Fix Version/sSprint-2011-08
ComponentsAndroid
Labelsandroid, defect, include, jss, release-1.7.0, rplist
ReporterAlan Leard
AssigneeDon Thorp
Created2011-04-15T03:38:41.000+0000
Updated2011-04-17T02:01:06.000+0000

Description

If you have an app.js with an app.jss everything works fine. If you add any Ti.include into the file the app.jss is ignored.

Ticket reference: http://developer.appcelerator.com/helpdesk/view/73861">http://developer.appcelerator.com/helpdesk/view/73861

Comments

  1. Don Thorp 2011-04-15

    Fixing tags, fixing title to conform to ticket guidelines.

    @Ben or @Alan what version of the mobilesdk?

  2. Ben 2011-04-15

    Hi Don, I tested with 1.6 RC1 and the 1.7.x build series from Feb 15th. Both had the issue.

  3. Ben 2011-04-15

    An additional point, it isn't limited to app.js and app.jss it appears to be an issue on any window with Ti.include

  4. Mark S 2011-04-15

    I noticed the same issue on 1.6.0 with Android.

  5. Bill Dawson 2011-04-15

    Simple failcase:

    app.js:

       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test',
           backgroundColor:'#000',
           exitOnClose: true
       });
       
       Ti.include('test.js');
       win.add( Ti.UI.createButton({id:'btnTest', title: 'Mickey'}) );
       win.open();
       

    app.jss:

       #btnTest {
           height: 80;
           width: 200;
           font-size: 40
       }
       

    test.js:

       Ti.API.info('hello from test.js');
       

    The button that displays should be a "big" (height 80) button with some big text on it. But you'll just get a normal button with normal font size in the failcase.

  6. Bill Dawson 2011-04-15

    (from [da7f39dbb79b4bc8230ba36d0698f8e51e493701]) When evalFile called for Ti.include(), make sure context's url gets set back to original else things that depend on the filename -- like JSS -- break. [#3170 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/da7f39dbb79b4bc8230ba36d0698f8e51e493701"> https://github.com/appcelerator/titanium_mobile/commit/da7f39dbb79b...

  7. Natalie Huynh 2011-04-15

    Tested with Titanium SDK version: 1.7.0 (03/01/11 16:09 e613126)
    G1 1.6
    GalaxyTab 2.2
    iPhone 4 OS 4.2.1
    Emulator 2.1

  8. Don Thorp 2011-04-15

    @Bill should this get onto 1.6.1. Seems like it should to me.

JSON Source