Hi,

Usually, if you're dealing with moving data around a Cairngorm application, you would create a public variable (or VO) in the ModelLocator.  When you take a snapshot of the video, dispatch a CairngormEvent that contains the bitmapData (I would do this in the view's script; not a ViewHelper).  In the command, update the variable in the ModelLocator with the data.  Now you have the data in a centrally located position.  If another view needs access to this data, simply bind the view's control to the variable in the ModelLocator.  As soon as the variable is updated by the command, the second view will automatically reflect the change.

This is a simple explanation and may not fit your particular use case.  But hopefully it will give you some ideas.

-TH
__________________________________

Tim Hoff
Cynergy Systems, Inc.
http://www.cynergysystems.com
Office
: 866-CYNERGY 


--- In [email protected], "gdoucen" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> My problem is the following.
>
> I use cairngorm framework.
> I have two views. the button in one view triggers an event that need
> to get data from the other view. In my case, i take a snapshot of the
> video so here i need the bitmap data.
>
> I see two solutions.
>
> First, using viewhelper/viewLocator to get the data from the dedicated
> view inside the command class.
>
> I know that viewhelper are mostly not recommended by cairngorm in the
> opposite side when it's used to set views from commands but here.
>
> Secondly, use the parent of the two views to transmit the event from
> view1 to view2 that send the final event.
>
> The structure could be as below
>
> <!-- my composite view -->
> <mx:VBox ...>
> <mx:Script>
> <![CDATA[
>
> private function handleMyEvent(event:MyCustomEvent):void
> {
> // Trigger the final event after filling up with the data
> view1.sendEvent(event);
> }
>
> ]]>
> </mx:Script>
> <view:view1 id="view1" />
> <view:view1 id="view2" myInititialEvent="handleMyEvent(event)" />
> </mx:VBox>
>
> What is the best way to do that?
>
> If the action was triggered from the view that hold the needed
> informations, i could have passed the data into a custom event that
> could be directly read by the command...
>
> I have browse the forum without success to get informations on this
> subject. Feel free to redirect me or give me an answer.
>
> Thanks
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to