Titanium JIRA Archive
Alloy (ALOY)

[ALOY-502] Unexpected error when requiring a widget that provides a valid view to it's parent

GitHub Issuen/a
Resolution Date2013-07-19T19:34:24.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 15
ComponentsWidgets, XML
ReporterFokke Zandbergen
AssigneeTony Lukasavage


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:
	<Tab id="tweetsTab" title="Tweets" icon="tweets.png">
		<Window id="tweetsWindow" title="Tweets">
			<Widget src="nl.fokkezb.tweetsView" id="tweetsWidget" />
But I'd rather like the widget to provide the all together like:
 			<TableView id="tableView" />
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" />
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 and not trigger this error?


  1. Tony Lukasavage 2013-07-19

    *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.
  2. Fokke Zandbergen 2013-07-21

    I think the issue was also related to cases with proxy components like:
       	<Window class="container">
       			<!-- This code...
       				<View backgroundColor="red">
       					<Label color="white" bottom="0">Pull me</Label>
       			.. in a widget now also works! -->
       			<Widget src="hpv" />
       			<TableViewRow title="hello world" />
    But I just tested the above and works fine. Time to update my PullToRefresh widget ;)
  3. Federico Casali 2013-08-01

    Verified fixed. Titanium SDK 3.1.2.v20130730133101 Alloy 1.2.0-alpha Appcelerator Studio CLI 3.1.2 Node 0.8.22 Closing.

JSON Source