On Tuesday 20 June 2006 22:14, Tim Hoff wrote:
> I think the right approach here is to maintain the view, that you want
> to duplicate through instantiation, in the ModelLocator. This is
> similar to the Cairngorm store example's ShoppingCart. You can then
> create multiple instances of the view and bind them accordingly.
>
> public static var wishList : ShoppingCart;
> ModelLocator.wishList = new ShoppingCart();
In that case though, the ShoppingCart isn't the view, it's the buisness
object, no ?
The problem (looking at it afresh this morning) is that if I write in the main
MXML:
<mx:TabNavigator borderStyle="none" selectedIndex="0" width="95%">
<mx:VBox label="Create new" width="100%">
<view:NewView id="newView"/>
</mx:VBox>
<mx:VBox label="Find in archive" id="findViewContainer">
<view:FindView id="findView" />
</mx:VBox>
</mx:TabNavigator>
And then in both the views write
<view:FilesAndCheckoutControlBar />
<view:FilesAndCheckoutViewStack />
And (taken from the Flex store) these views have components with id="...."
(typicaly the view helpers), then that generates a duplicate id and crash :-/
The simpler case in the Store app doesn't have this problem, because
their 'basket' view doesn't contain other views, so can just be duplicated.
Hmm ?
This is all on Flex2 with the Cairgorm SWC from the phones demo app btw.
--
Tom Chiverton
****************************************************
This email is sent for and on behalf of Halliwells LLP.
Halliwells LLP is a limited liability partnership registered in England and
Wales under registered number OC307980 whose registered office address is at St
James's Court Brown Street Manchester M2 2JF. A list of members is available
for inspection at the registered office. Any reference to a partner in relation
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law
Society.
CONFIDENTIALITY
This email is intended only for the use of the addressee named above and may be
confidential or legally privileged. If you are not the addressee you must not
read it and must not use any information contained in nor copy it nor inform
any person other than Halliwells LLP or the addressee of its existence or
contents. If you have received this email in error please delete it and notify
Halliwells LLP IT Department on 0870 365 8008.
For more information about Halliwells LLP visit www.halliwells.com.
We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the
Year at the 2005 Growth Company Awards
------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups. Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/