[TIMOB-2570] JSS files are not properly rebuilt when launching emulator
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-08-19T17:04:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | gui, jss |
Reporter | Andreas sandberg |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:23:05.000+0000 |
Updated | 2017-03-20T17:54:42.000+0000 |
Description
If a jss file is modified after a full rebuild has already been completed, the changes do not take effect. To reproduce:
Create a simple app.js file, add a button and add it to the window.
var button = Ti.UI.createButton({id:'b'})
Create app.js and add some properties for the button:
#b { width:100; height: 90; title: "tyskland"; }
Launch the app. If this is the first time the project has been run, the build process will take place and the app will start. The button will appear as expected. Now modify the title for the button. Save the file and re-deploy with the emulator. Notice that the new title is not displayed, the old title is still visible.
Reproduced against 1.5 RC2 running iphone simulator.
I think http://developer.appcelerator.com/question/100681/cant-get-jss-to-work-on-ios#header"> my problem and yours is the same bug..
Steps to reproduce:
1. Create a new (1.5.1) project
2. Run iPhone-emulator
3. Create the app.jss
4. Run the emulator again (the layout hasn't changed)
Yeah, I'm hitting the same bug... It's still not fixed with the latest (2011.01.27 ) build.... So, jss is quite useless for now, right?
This seems to have worked for me:
cp build/iphone/Resources/stylesheet.plist build/iphone/build/Debug-iphonesimulator/UnionPlus.app/stylesheet.plist
I should mentioned that you'll want to change the ".app" path in there for the name of your app (mine is UnionPlus.app in the example)
A HD Support ticket encountered same glitch about JSS, where some properties are not fully/properly loaded from JSS file. http://support.appcelerator.com/tickets/APP-257869/ repro sequence: //FILE: APP.JS // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); var myPlatform = Ti.Platform.osname; var win1 = null; var myClass = null; var win1 = Titanium.UI.createWindow({className: 'myWin' }); var myLabel = Ti.UI.createLabel({ className: 'myLabel', top:20 }); win1.add(myLabel); var button = Ti.UI.createButton({ id:'b', height:25, top:80 }); win1.add(button); if (myPlatform == "iphone") { myClass = 'iphoneClass'; }else{ myClass = 'ipadClass'; } button.addEventListener('click',function(){ var win2 = Titanium.UI.createWindow({className: myClass }); win2.open(); }); win1.open(); //FILE: APP.JSS .iphoneClass { url: "win2iphone.js"; titleid: "base_title"; titleImage: "appicon.png"; } .ipadClass { url: "win2ipad.js"; titleid: "base_title"; titleImage: "appicon.png"; } .myLabel{ color: #FF0000; title: "To open Window"; } #b { color:#FF8888; width:100; height: 90; title: "Press Button"; } .myWin { color: #FF0000; } //FILE: win2ipad.js var win = Titanium.UI.createWindow({backgroundColor:'red'}); var _title = Ti.UI.createLabel({ text:'Welcome to iPad', color:'white', top:45 }); win.add(_title); win.open(); //FILE: win2iphone.js var win = Titanium.UI.createWindow({backgroundColor:'green'}); var _title = Ti.UI.createLabel({ text:'Welcome to iPhone', color:'white', top:45 }); win.add(_title); win.open();
JSS support has been removed since Titanium SDK 4.2.0.
Closing ticket as JSS support has been removed since Titanium SDK 4.2.0.