Actual behavior
Working with an app.js with an include an app.jss with a require, and adding labels to the window, those are not getting the styles dictated by the jss files
Expected behavior
Jss working as used to work on 1.7.6 with the same structure
Files
var gt = {};
gt.ui={};
Ti.include('/incs/incs.js');
gt.ui.makeWin = function(){
var win1 = Titanium.UI.createWindow({
backgroundColor:'#fff',
navBarHidden:true
});
var label1 = gt.ui.makeLabel('label1');
var label2 = gt.ui.makeLabel('label2');
win1.add(label1);
win1.add(label2);
return win1;
};
var win = gt.ui.makeWin();
win.open();
@import 'lay/style.jss';
#label2 {
color:'#f0f';
text:'I am Window 2';
fontSize:40;
textAlign:'center';
height:80;
width:'auto';
}
Ti.API.info('Including the inc file');
gt.ui.makeLabel = function(id) {
var label = Titanium.UI.createLabel({
id:id,
className:'button'
});
return label;
};
#label1 {
color:'#f00';
top:0;
text-align:'center';
text:'I am label 1';
height:40;
width:'auto';
}
.button {
background-color:'#00f';
}
Issue still exists with 2.0.1GA2 on a Samsung Galaxy S2. Seems to work fine on the iOS simulator. I have also attached a sample project with the same code, to save time setting it up.
The error is still there. Same as http://developer.appcelerator.com/question/134477/ (very simple example) The problem is that JSS is not working at all if you use 'require' (commonjs) files under Android SDK 2.1.3. (maybe it's a context problem?) Some progress? Thanks in advance
issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Android Emulator: Android SDK version: 2.2
JSS has been deprecated. We won't be fixing this.
Closing ticket as the issue will not fix and with reference to the above comments. JSS has been deprecated.