[ALOY-547] TSS selector Widget doesn't work like Require does
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-18T21:15:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.1.0, 2013 Sprint 06 |
Components | Runtime, XML |
Labels | alloy, require, tss, widget |
Reporter | Fokke Zandbergen |
Assignee | Tony Lukasavage |
Created | 2013-03-04T13:48:07.000+0000 |
Updated | 2013-05-01T14:56:28.000+0000 |
Description
Assuming you have an
index.xml
like:
<Alloy>
<Window>
<Widget src="my.allow.widget" id="myId" />
</Window>
</Alloy>
And an index.tss
like:
"Widget": {
top: 50
}
The compiled index.js
will contain:
$.__views.myId = Alloy.createWidget("my.allow.widget", "widget", {
id: "myId"
});
While the following index.tss
:
"Require": {
top: 50
}
Results in the expected:
$.__views.myId = Alloy.createWidget("my.allow.widget", "widget", {
top: 50,
id: "myId"
});
I've ran into more examples where <Widget />
does not inherit all functionality of <Require />
in a correct way. Maybe it would be good idea just to replace <Widget />
by <Require type="widget" />
as the first step in compilation so we don't have to take care of <Widget />
anymore in the further compilation process?
If you look at the
Verified fixed. Alloy 1.1.0-cr CLI version 3.1.0-cr TiSDK : 3.1.0.v20130408154547 (RC) Android and iOS