[ALOY-502] Unexpected error when requiring a widget that provides a valid view to it's parent
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-07-19T19:34:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 15 |
Components | Widgets, XML |
Labels | qe-testadded |
Reporter | Fokke Zandbergen |
Assignee | Tony Lukasavage |
Created | 2012-11-21T07:56:31.000+0000 |
Updated | 2013-08-01T01:06:47.000+0000 |
Description
I'm building a widget that provides a nice almost-twitter-like-experience within an app's tab.
This widget can be required to provide a containing a list of tweets to a like so:
all together like:
and not trigger this error?
<Tab id="tweetsTab" title="Tweets" icon="tweets.png">
<Window id="tweetsWindow" title="Tweets">
<Widget src="nl.fokkezb.tweetsView" id="tweetsWidget" />
</Window>
</Tab>
But I'd rather like the widget to provide the
<Alloy>
<Window>
<TableView id="tableView" />
</Window>
</Alloy>
But when I require the widget including the window like within the tab like this:
<Tab id="tweetsTab" title="Tweets" icon="tweets.png">
<Widget src="nl.fokkezb.tweetsView" id="tweetsWidget" />
</Tab>
I get the following error during build:
[ERROR] Invalid Tab child "Alloy.Widget"
[ERROR] Tab must have only one child element, which must be a Window
Shouldn't the build be aware that this widget provides (or a widget in general COULD provide) a
*Note:* This appears to have been resolved by an earlier commit. A test case was created just to ensure no regressions. PR: https://github.com/appcelerator/alloy/pull/190 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-502 Functional testing can be passed on all platforms so long as the app compiles and runs. The initial issue was related to a compile time error, so the app loading enough is enough confirmation.
I think the issue was also related to cases with proxy components like:
But I just tested the above and works fine. Time to update my PullToRefresh widget ;)
Verified fixed. Titanium SDK 3.1.2.v20130730133101 Alloy 1.2.0-alpha Appcelerator Studio 3.1.2.201307261628 CLI 3.1.2 Node 0.8.22 Closing.