Re: [flexcoders] Cairngorm Question
You do have acess to the model. The combo 2 will be populated with some data. Put that into the model and bind combo 2 to the model I'm not sure what you actually want to do but it doesn't look like you need cairgorm to do that ... C From: skusunam skusu...@rlpt.com To: flexcoders@yahoogroups.com Sent: Thursday, April 9, 2009 7:53:48 PM Subject: [flexcoders] Cairngorm Question Hello Group, This is my first question on this group and I have been referring to this group for all my technical challenges with Flex (started using 1 month back). Thanks for such a nice group and support. I have a complex screen where I have 2 Combo boxes and by default Combo-2 is disabled and will be enabled only when user selects Combo-1 and Server returns any Objects for Combo-2 otherwise it will be still disabled. I have defined an Event `LoadCombo2Event' which is dispatched when user selects an entry from Combo-1 and the results will be handled in `LoadComb2Command' . I do not have access to Combo2 in this command to Enable or Disable? How do we handle this case using Cairngorm? Thanks, Sre
RE: [flexcoders] Cairngorm - Question on using ResultHandler
You are doing things the right way. If after you login you want to do some more, look at the SequenceCommand. You would basically add a executeNextCommand() statement after your model.workflowState statement. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of malik_robinson Sent: Sunday, January 28, 2007 1:49 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm - Question on using ResultHandler Hi, I have a question using Cairngorm and Commands. I am new to it but its making more sense to me each day at least it seems that way. I have the following in my LoginCommand.as public function result( data:Object ):void { var event:ResultEvent = data as ResultEvent; if (event.result.length 0) { model.workflowState = ModelLocator.VIEWING_HOMEPAGE; } else { model.login.statusMsg = Your login credentials are invalid, please try again.; } } 1. Is there anything wrong with the way I am doing the above? 2. I would like to call some other remote objects s! o I can populate some datagrids after the user has been authenticated and then load the home page of the app as I am doing above. -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
RE: [flexcoders] Cairngorm question
Where can I download cairngorm 2.0. I believe I have downloaded the .99 version, but I didnt get a chance to learn it before I got tasked with a Flex 2.0 project. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Steven Webster Sent: Thursday, June 01, 2006 8:15 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm question Michael, I wrote a 6-part series of articles for Adobe Devnet that seem to be helping people to get started with Cairngorm, you'll find the first part here: http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html Hope that helps ! Steven Steven Webster Practice Director (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6108 m: +44 (0)7917 428 947 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Michael Sent: 01 June 2006 02:51 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm question Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help! Michael -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Cairngorm question
You'll have everything you need on Steven's Blog : http://weblogs.macromedia.com/swebster/ CG2 is in Beta3 right now. Download it here : http://weblogs.macromedia.com/swebster/archives/Cairngorm2b3.zip Best, Jean-Luc PS: Steven, di you hear something about a cgStore ? Just kidding :) - Original Message - From: Michael To: flexcoders@yahoogroups.com Sent: Thursday, June 01, 2006 4:19 PM Subject: RE: [flexcoders] Cairngorm question Where can I download cairngorm 2.0. I believe I have downloaded the .99 version, but I didnt get a chance to learn it before I got tasked with a Flex 2.0 project. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Steven WebsterSent: Thursday, June 01, 2006 8:15 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm question Michael, I wrote a 6-part series of articles for Adobe Devnet that seem to be helping people to get started with Cairngorm, you'll find the first part here: http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html Hope that helps ! Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0)7917 428 947[EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of MichaelSent: 01 June 2006 02:51To: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm question Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help! Michael -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm question
Hey Jean-Luc, CairngormStore ... sorry, we've just been slammed on stuff. I think we may hold off on just shipping you a version that works with the final Flex 2 build that ships when we "go live" with Flex 2. I believe others have suggested on the list when that might be. If we can get something out sooner for B3, then we'll do so Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0)7917 428 947[EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc ESSERSent: 01 June 2006 16:50To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Cairngorm question You'll have everything you need on Steven's Blog : http://weblogs.macromedia.com/swebster/ CG2 is in Beta3 right now. Download it here : http://weblogs.macromedia.com/swebster/archives/Cairngorm2b3.zip Best, Jean-Luc PS: Steven, di you hear something about a cgStore ? Just kidding :) - Original Message - From: Michael To: flexcoders@yahoogroups.com Sent: Thursday, June 01, 2006 4:19 PM Subject: RE: [flexcoders] Cairngorm question Where can I download cairngorm 2.0. I believe I have downloaded the .99 version, but I didnt get a chance to learn it before I got tasked with a Flex 2.0 project. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Steven WebsterSent: Thursday, June 01, 2006 8:15 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm question Michael, I wrote a 6-part series of articles for Adobe Devnet that seem to be helping people to get started with Cairngorm, you'll find the first part here: http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html Hope that helps ! Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0)7917 428 947[EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of MichaelSent: 01 June 2006 02:51To: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm question Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help! Michael -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm question
If I'm not mistaken I think this is the latest... http://weblogs.macromedia.com/swebster/archives/2006/05/cairngorm_2_for.cfm Darren From: Michael [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm question Date: Thu, 1 Jun 2006 09:19:12 -0500 Where can I download cairngorm 2.0. I believe I have downloaded the .99 version, but I didn't get a chance to learn it before I got tasked with a Flex 2.0 project. _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven Webster Sent: Thursday, June 01, 2006 8:15 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Cairngorm question Michael, I wrote a 6-part series of articles for Adobe Devnet that seem to be helping people to get started with Cairngorm, you'll find the first part here: http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html Hope that helps ! Steven Steven Webster Practice Director (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6108 m: +44 (0) 7917 428 947 [EMAIL PROTECTED] _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sent: 01 June 2006 02:51 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm question Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help! Michael -- 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 Web http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site +design+developmentw2=Computer+software+developmentw3=Software+design+and+ developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=1 66.sig=L-4QTvxB_quFDtMyhrQaHQ site design development Computer http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+an d+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s =166.sig=lvQjSRfQDfWudJSe1lLjHw software development Software http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5 s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ design and development Macromedia http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+deve lopmentw2=Computer+software+developmentw3=Software+design+and+development w4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6n PIrz7_EpZI36cYzBjw flex Software http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=W eb+site+design+developmentw2=Computer+software+developmentw3=Software+desi gn+and+developmentw4=Macromedia+flexw5=Software+development+best+practice c=5s=166.sig=f89quyyulIDsnABLD6IXIw development best practice _ YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! http://docs.yahoo.com/info/terms/ Terms of Service. _ image001.gif -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm question
Steven: To my understanding, correct me if I am wrong, there are somewhat to significant changes from Cairngorm 0.99 and Cairngorm 2.0. I realize some of this is due to Flex 2, but my question is will there be an updated version of your 6-Part article(s) for Cairngorm 2? Or will that information be contained in documentation when Cairngorm 2 is released? Thanking you in advance, Jack From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven WebsterSent: Thursday, June 01, 2006 11:59 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm question Hey Jean-Luc, CairngormStore ... sorry, we've just been slammed on stuff. I think we may hold off on just shipping you a version that works with the final Flex 2 build that ships when we "go live" with Flex 2. I believe others have suggested on the list when that might be. If we can get something out sooner for B3, then we'll do so Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0)7917 428 947[EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc ESSERSent: 01 June 2006 16:50To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Cairngorm question You'll have everything you need on Steven's Blog : http://weblogs.macromedia.com/swebster/ CG2 is in Beta3 right now. Download it here : http://weblogs.macromedia.com/swebster/archives/Cairngorm2b3.zip Best, Jean-Luc PS: Steven, di you hear something about a cgStore ? Just kidding :) - Original Message - From: Michael To: flexcoders@yahoogroups.com Sent: Thursday, June 01, 2006 4:19 PM Subject: RE: [flexcoders] Cairngorm question Where can I download cairngorm 2.0. I believe I have downloaded the .99 version, but I didnt get a chance to learn it before I got tasked with a Flex 2.0 project. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Steven WebsterSent: Thursday, June 01, 2006 8:15 AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm question Michael, I wrote a 6-part series of articles for Adobe Devnet that seem to be helping people to get started with Cairngorm, you'll find the first part here: http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html Hope that helps ! Steven Steven WebsterPractice Director (Rich Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6108 m: +44 (0)7917 428 947[EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of MichaelSent: 01 June 2006 02:51To: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm question Does anyone know some good resources for cairngorm, and what the best way to start learning it is. I have done a few large flex apps, and I would like to see what cairngorm can do for me. Thanks a lot for the help! Michael -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm Question
I've only worked with some of the Cairngorm classes that were described in the Flex book. You're going to have to have a local model for each sub app instance. Your event that is fired after the search being complete can also contain instance data about the Sub app that called it and update your local model with the returning data accordingly. That way you can map the returning data to the calling Search instance, and its associated parent sub-application. When you invoke a RemoteObject you can stipulate where the returning data is going to go using the returned pendingCall instance which can point to a result handler which can be local to the calling search instance, which in turn updates your local model. var pendingCall = myRemoteObject.myMethod(arg1,arg2,etc.); pendingCall.resultHandler = mx.utils.Delegate.create(mySubApp,myReturnFunction); function myReturnFunction(event):Void { //update your local model instance here; } Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of fowleryj Sent: Monday, January 16, 2006 9:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm Question We have been developing a fairly large application using Flex 1.5 and the Cairngorm framework, and have recently run across what could be a large roadblock. Our application has many sub-applications the user can choose to run from a menu in the main application. To implement this we are dynamically creating the children the user selects in a view stack. All of these sub-applications rely on a particular search screen that allows the user to find a particular person in our database. The problem is that the sub-applications are bound to the selection the user makes in the search screen, and are all reacting to the same events (which are broadcast from the search screen). We would like the search screens to function as separate instances. For example, if I broadcast a change event from the search screen, all of the open sub-applications will catch the event and change all of their displayed information to reflect that of the most recently selected person. Our problem appears to stem from the way the EventBroadcaster and FrontController are designed. All events are broadcast in the same EventBroadcaster using the getInstance() method, thus everything is listening for everything. Can anyone who is familiar with the intricacies of Cairngorm propose a way to deal with this problem? We would like to be able to return the information about the selected person only to the sub-application that invoked the search screen. Perhaps it is not possible to do this using Cairngorm, and we would appreciate knowing that, too. If anyone has a different/better solution, we'd love to hear about it. Thanks in advance. -- 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 -- 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/
Re: [flexcoders] Cairngorm Question
Hi fowleryj, Why have the same problem here. And one solutionfor usea diferents commands you have to use diferentes names for each application, beacause the FrontController add a listener in a single static var eventBroadcaster. But if your application is realy big I recommend to you rewrite some classes in the cairngorm framework. For example you can rewrite te EventBroadcaster and FrontController classes creating a FrontControllerLocator. This FrontControllerLocator can be implemented like the ViewLocator. You set IDs for each controller and use this IDs to call the EventBroadcaster. Did you understood? I did the same with the services creating a ServiceHelper and a ServiceLocator, and this can help you to implements the FrontControllerLocator. I hope that can solve your problems. Let me know if it`s works and sorry for my poor english. Hugs. On 1/16/06, fowleryj [EMAIL PROTECTED] wrote: We have been developing a fairly large application using Flex 1.5 andthe Cairngorm framework, and have recently run across what could be a large roadblock. Our application has many sub-applications the usercan choose to run from a menu in the main application. To implementthis we are dynamically creating the children the user selects in aview stack. All of these sub-applications rely on a particular search screen that allows the user to find a particular person in ourdatabase. The problem is that the sub-applications are bound to theselection the user makes in the search screen, and are all reacting tothe same events (which are broadcast from the search screen). We would like the search screens to function as separate instances. Forexample, if I broadcast a change event from the search screen, all ofthe open sub-applications will catch the event and change all of theirdisplayed information to reflect that of the most recently selected person. Our problem appears to stem from the way the EventBroadcasterand FrontController are designed. All events are broadcast in the sameEventBroadcaster using the getInstance() method, thus everything is listening for everything.Can anyone who is familiar with the intricacies of Cairngorm propose away to deal with this problem? We would like to be able to return theinformation about the selected person only to the sub-application that invoked the search screen. Perhaps it is not possible to do this usingCairngorm, and we would appreciate knowing that, too. If anyone has a different/better solution, we'd love to hear about it.Thanks in advance. --Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Bruno Gustavo MartinsMobile: (55)(11)9585-9587[EMAIL PROTECTED] -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ServiceHelper.as Description: Binary data ServiceLocator.as Description: Binary data
Re: [flexcoders] Cairngorm Question
Hi YJ, RocketBoots is working with a development team on a large (100s of classes) Flex 1.5 Cairngorm application at the moment with potentially many instances of the same sub-application (we call them workspaces) around at the same time - e.g. two searches, three articles, a calculator etc. Here's our solution, which is working nicely. Each type of workspace has it's own viewHelper class. Each workspace instance has it's own viewHelper instance. Because there are multiple instances it was going to be difficult to use the ViewLocator and ModelLocator, so we didn't. Instead, when workspace instance X broadcasts an event, we include a reference to the workspace's viewHelper in the event data. The command's execute method caches this viewHelper in an instance variable, and its onResult method uses the same viewHelper to display the results. The viewHelper instance also holds our model, using instance instead of static variables (although we can imagine using statics in some situations, for bits of the model shared across all workspaces). Happy to answer further questions about this approach - this one has been in the backlog of things to blog for a while. Cheers, Robin __ Robin Hilliard Director - RocketBoots Pty Ltd Professional Services for Macromedia Technologies http://www.rocketboots.com.au For schedule/availability call Pamela Higgins: w+61 7 5451 0362 m+61 419 677 151 e[EMAIL PROTECTED] or Direct: m+61 418 414 341 f+61 2 9798 0070 e[EMAIL PROTECTED] *** Register for WebDU http://www.mxdu.com 2-3 March 2006 *** On 17/01/2006, at 1:37 AM, fowleryj wrote: We have been developing a fairly large application using Flex 1.5 and the Cairngorm framework, and have recently run across what could be a large roadblock. Our application has many sub-applications the user can choose to run from a menu in the main application. To implement this we are dynamically creating the children the user selects in a view stack. All of these sub-applications rely on a particular search screen that allows the user to find a particular person in our database. The problem is that the sub-applications are bound to the selection the user makes in the search screen, and are all reacting to the same events (which are broadcast from the search screen). We would like the search screens to function as separate instances. For example, if I broadcast a change event from the search screen, all of the open sub-applications will catch the event and change all of their displayed information to reflect that of the most recently selected person. Our problem appears to stem from the way the EventBroadcaster and FrontController are designed. All events are broadcast in the same EventBroadcaster using the getInstance() method, thus everything is listening for everything. Can anyone who is familiar with the intricacies of Cairngorm propose a way to deal with this problem? We would like to be able to return the information about the selected person only to the sub-application that invoked the search screen. Perhaps it is not possible to do this using Cairngorm, and we would appreciate knowing that, too. If anyone has a different/better solution, we'd love to hear about it. Thanks in advance. -- 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/
RE: [flexcoders] Cairngorm Question about the Store Example
Libby, I don't have the source in-front of me, but if you have a GraphicalProductList component, that is advertising that it broadcasts a select event, then I'd be looking for the instantation of that component to find the event being handled, eg: namespace:GraphicalProductList select=yourOwnHandlerHere() / The GraphicalProductList will broadcast the event (or use a helper class, as seems to be the case here, to broadcast the event) but the parent of that instance of the class will be the place where the event is handled. Make sense ? Steven -- Steven Webster Practice Director (Rich Internet Applications) Adobe Consulting EMEA Office: + 44 (0) 131 338 6108 Mobile: +44 (0) 7917 428 947 -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Libby Sent: 14 December 2005 16:40 To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm Question about the Store Example In GraphicalProductListViewHelper.as, there is this line: view.dispatchEvent( { type:select } ); In the view, which is GraphicalProductList.mxml, it advertises that it broadcasts this event: mx:Metadata [Event(select)] /mx:Metadata Where is this event actually caught or handled? I have read thru all the files several times and cannot find it. The reason I am looking is that in my Master/Detail screen, when Master updates the Model, the Detail, that is bound to the model, doesn't notice it. I think I need to broadcast that a change has occurred, they way they did. thanks, Libby Yahoo! Groups Sponsor ~-- 1.2 million kids a year are victims of human trafficking. Stop slavery. http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/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 Yahoo! Groups Sponsor ~-- Most low income homes are not online. Make a difference this holiday season! http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/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/
RE: [flexcoders] [Cairngorm] - Question about ViewHelpers
Hi, A ViewHelper is bound to a specific Form/View. If your case you can do it two ways. You can use one ViewHelper to set the data on the different fields OR the command can save the user data on a ModelLocator and that model is bound to the varius controls, like so: mx:TextInput id=name text={ModelLocator.user.name} / mx:TextInput id=email text={ModelLocator.user.email} / As for the header, you can bind its value as well, instead of having to set it everytime, like so: mx:Label text={name.text} / Hope that helps! Jimmy -Original Message- From: flexcoders@yahoogroups.com on behalf of Christophe Herreman Sent: Sat 10/8/2005 7:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] [Cairngorm] - Question about ViewHelpers Hi guys, I was wondering about the following... Say you have a GetUserCommand the retrieves a user from the db and then updates 2 views: a UserForm where the user's data is shown and the application's HeaderForm where the name of the current user is displayed. How would you handle updating these 2 views? I was thinking: 1) Update the views from within the command through 2 ViewHelpers (UserFormViewHelper, HeaderFormViewHelper) 2) Create one ViewHelper named UserViewHelper that you call inside the command. In that UserViewHelper the 2 forms are updated. This raises another question: Is a ViewHelper bound to a Form/View or to a business entity like User in this case? thx for your time ! regards, Christophe -- 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 Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw Software development best practice http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw YAHOO! GROUPS LINKS *Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. *To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] *Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/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/ winmail.dat
Re: [flexcoders] [Cairngorm] - Question about ViewHelpers
Hi Dimitros, thx for the feedback. Things are more clear now. Just another question: How would you handle the same situation in a Flash application? Would it be a good idea to let the Forms/Views register with the ModelLocator for changes in the model? Or does that give the ModelLocator too much responsibility. I see how the binding is done automaticly by Flex and that rocks...if only Flash could do that in such an easy way. regards, Christophe Dimitrios Gianninas wrote: Hi, A ViewHelper is bound to a specific Form/View. If your case you can do it two ways. You can use one ViewHelper to set the data on the different fields OR the command can save the user data on a ModelLocator and that model is bound to the varius controls, like so: mx:TextInput id=name text={ModelLocator.user.name} / mx:TextInput id=email text={ModelLocator.user.email} / As for the header, you can bind its value as well, instead of having to set it everytime, like so: mx:Label text={name.text} / Hope that helps! Jimmy -Original Message- From: flexcoders@yahoogroups.com on behalf of Christophe Herreman Sent: Sat 10/8/2005 7:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] [Cairngorm] - Question about ViewHelpers Hi guys, I was wondering about the following... Say you have a GetUserCommand the retrieves a user from the db and then updates 2 views: a UserForm where the user's data is shown and the application's HeaderForm where the name of the current user is displayed. How would you handle updating these 2 views? I was thinking: 1) Update the views from within the command through 2 ViewHelpers (UserFormViewHelper, HeaderFormViewHelper) 2) Create one ViewHelper named UserViewHelper that you call inside the command. In that UserViewHelper the 2 forms are updated. This raises another question: Is a ViewHelper bound to a Form/View or to a business entity like User in this case? thx for your time ! regards, Christophe -- 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 Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw Software development best practice http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw YAHOO! GROUPS LINKS *Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . -- 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 Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/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/
Re: [flexcoders] [Cairngorm] - Question about ViewHelpers
It can do Arrays: ModelLocator.my_array = []; // datagrid my_dg.dataProvider = ModelLocator.my_array; ModelLocator.addItem(); ...that's it though... - Original Message - From: Christophe Herreman [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, October 08, 2005 12:05 PM Subject: Re: [flexcoders] [Cairngorm] - Question about ViewHelpers Hi Dimitros, thx for the feedback. Things are more clear now. Just another question: How would you handle the same situation in a Flash application? Would it be a good idea to let the Forms/Views register with the ModelLocator for changes in the model? Or does that give the ModelLocator too much responsibility. I see how the binding is done automaticly by Flex and that rocks...if only Flash could do that in such an easy way. regards, Christophe Dimitrios Gianninas wrote: Hi, A ViewHelper is bound to a specific Form/View. If your case you can do it two ways. You can use one ViewHelper to set the data on the different fields OR the command can save the user data on a ModelLocator and that model is bound to the varius controls, like so: mx:TextInput id=name text={ModelLocator.user.name} / mx:TextInput id=email text={ModelLocator.user.email} / As for the header, you can bind its value as well, instead of having to set it everytime, like so: mx:Label text={name.text} / Hope that helps! Jimmy -Original Message- From: flexcoders@yahoogroups.com on behalf of Christophe Herreman Sent: Sat 10/8/2005 7:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] [Cairngorm] - Question about ViewHelpers Hi guys, I was wondering about the following... Say you have a GetUserCommand the retrieves a user from the db and then updates 2 views: a UserForm where the user's data is shown and the application's HeaderForm where the name of the current user is displayed. How would you handle updating these 2 views? I was thinking: 1) Update the views from within the command through 2 ViewHelpers (UserFormViewHelper, HeaderFormViewHelper) 2) Create one ViewHelper named UserViewHelper that you call inside the command. In that UserViewHelper the 2 forms are updated. This raises another question: Is a ViewHelper bound to a Form/View or to a business entity like User in this case? thx for your time ! regards, Christophe -- 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 Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=OO6nPIrz7_EpZI36cYzBjw Software development best practice http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . -- 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 -- 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 Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders
RE: [flexcoders] Cairngorm question
I don't know about the cairngorm point of view, but I saw this interesting article on Flex/FCS http://www.macromedia.com/devnet/flex/articles/fcs_flex.html Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alberto Albericio SalvadorSent: mardi 30 août 2005 9:42To: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm question Hi all,The Cairngorm samples are a great resource for understanding how to best arquitect an specific kind of applications; in this case, applications that talk syncly with some servers that expose some services.Imagine now that Im building an application which implements, somewhere, some kind of asynchronous services: a flash comm server chat , for example. This "service" must be running, in the background, even if im visually working in another part of the application, entering some data for new providers or whatever. So the question is, where is the best place to initialise these services? Or how can I place/work with these services within this arquitecture?My choice would probably be to initialise evrything inside a "initialise()" function in the model locator and then use some public var there to control msgs and status of this "service" and then bind the chat components to these vars.I hope someone can help chosing the best option.Thanks all in advance.-- Alberto Albericio SalvadorAura S.A. SegurosDepartamento Informática -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --**STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.--
RE: [flexcoders] Cairngorm Question.
Title: Message The way Cairngorm current architects the ViewHelper is that itrequires eachViewHelper to register itself to the ViewLocator under a unique name. Therefore if you are attaching theview dynamically in a repeater and using the samevalue in the 'name' attributefor the ViewHelpers thenthe ViewLoactor will throw an error. One approach to your solution is to have the each of your views bubble up its methods to the parent view that the repeater exists in. For example (in code babble). MyMainView.mxml mx:script public activeChild : MovieClip = null; function parentHandleMethod(evt) { // store current child view to local var activeChild = evt.target' // do server call } /ms:script mx:repeater me:mychildView /mx:repeater ... MyChildView.mxml mx:Metadata [Event("onCustomEvent1")] [Event("onCustomEvent2")] /mx:Metadata mx:Button click="this.dispatchEvent({type='onCustomEvent1', otherAttributes=''})" In this example instead of having the child view handle the logic itself (communicating to the server) it tells the parent too. Or more correctly says 'someone please do this for me' the parent will know which of the child views to get the data from since the dispatch event automatically keeps track of the target in which the event was dispatch from. This is just a suggestion. There are other options out there, perhaps better or more correct then this approach. Ben -Original Message-From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:53 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Anyone? Omar Ramos Itacon Corporation Technology Manager From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 8:18 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm Question. Hi all, I am using the Cairngorm plataform but had a small question. How can I use the viewhelper technique when I attach view dynamicaly? For example I have a mxml component and put a view helper attached to it and use this component on a repeater and 5 instances are made. When I call the getViewHelper method which of those 5 reference will it give me? Any help would be apreaciated. Omar Ramos Itacon Corporation Technology Manager Yahoo! Groups Sponsor ADVERTISEMENT 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 the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm Question.
Title: Message Yes I had tho of that idea ben. But was wondering what was the clean way to do it. Thanks for the reply's so far. Omar Ramos Itacon Corporation Technology Manager From: Ben Elmore [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 2:17 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. The way Cairngorm current architects the ViewHelper is that itrequires eachViewHelper to register itself to the ViewLocator under a unique name. Therefore if you are attaching theview dynamically in a repeater and using the samevalue in the 'name' attributefor the ViewHelpers thenthe ViewLoactor will throw an error. One approach to your solution is to have the each of your views bubble up its methods to the parent view that the repeater exists in. For example (in code babble). MyMainView.mxml mx:script public activeChild : MovieClip = null; function parentHandleMethod(evt) { // store current child view to local var activeChild = evt.target' // do server call } /ms:script mx:repeater me:mychildView /mx:repeater ... MyChildView.mxml mx:Metadata [Event("onCustomEvent1")] [Event("onCustomEvent2")] /mx:Metadata mx:Button click="this.dispatchEvent({type='onCustomEvent1', otherAttributes=''})" In this example instead of having the child view handle the logic itself (communicating to the server) it tells the parent too. Or more correctly says 'someone please do this for me' the parent will know which of the child views to get the data from since the dispatch event automatically keeps track of the target in which the event was dispatch from. This is just a suggestion. There are other options out there, perhaps better or more correct then this approach. Ben -Original Message-From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:53 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Anyone? Omar Ramos Itacon Corporation Technology Manager From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 8:18 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm Question. Hi all, I am using the Cairngorm plataform but had a small question. How can I use the viewhelper technique when I attach view dynamicaly? For example I have a mxml component and put a view helper attached to it and use this component on a repeater and 5 instances are made. When I call the getViewHelper method which of those 5 reference will it give me? Any help would be apreaciated. Omar Ramos Itacon Corporation Technology Manager 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 the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm Question.
Title: Message Well. My thought is 'Who would know what child needed the work done?' The view locator's need to have the view helper name be unique is so that it can locate the view. A command has to be 100% sure what view towork with to get the data to properly make the call out to the server. Therefore my thought is that the safer bet would be to have the command talk to the parent to either a) get the data or b) get the name of the child. Anyway, those are just my thoughts to why I would approach the situation the way I outlined. My judgment of clean has a lot to do with the ability to maintain the application and as much as possible keeping the interdepancy between my view files as possible. Loose coupling. Ben -Original Message-From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 3:18 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Yes I had tho of that idea ben. But was wondering what was the clean way to do it. Thanks for the reply's so far. Omar Ramos Itacon Corporation Technology Manager From: Ben Elmore [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 2:17 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. The way Cairngorm current architects the ViewHelper is that itrequires eachViewHelper to register itself to the ViewLocator under a unique name. Therefore if you are attaching theview dynamically in a repeater and using the samevalue in the 'name' attributefor the ViewHelpers thenthe ViewLoactor will throw an error. One approach to your solution is to have the each of your views bubble up its methods to the parent view that the repeater exists in. For example (in code babble). MyMainView.mxml mx:script public activeChild : MovieClip = null; function parentHandleMethod(evt) { // store current child view to local var activeChild = evt.target' // do server call } /ms:script mx:repeater me:mychildView /mx:repeater ... MyChildView.mxml mx:Metadata [Event("onCustomEvent1")] [Event("onCustomEvent2")] /mx:Metadata mx:Button click="this.dispatchEvent({type='onCustomEvent1', otherAttributes=''})" In this example instead of having the child view handle the logic itself (communicating to the server) it tells the parent too. Or more correctly says 'someone please do this for me' the parent will know which of the child views to get the data from since the dispatch event automatically keeps track of the target in which the event was dispatch from. This is just a suggestion. There are other options out there, perhaps better or more correct then this approach. Ben -Original Message-From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:53 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Anyone? Omar Ramos Itacon Corporation Technology Manager From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 8:18 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm Question. Hi all, I am using the Cairngorm plataform but had a small question. How can I use the viewhelper technique when I attach view dynamicaly? For example I have a mxml component and put a view helper attached to it and use this component on a repeater and 5 instances are made. When I call the getViewHelper method which of those 5 reference will it give me? Any help would be apreaciated. Omar Ramos Itacon Corporation Technology Manager 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 the Yahoo! Terms of Service.
RE: [flexcoders] Cairngorm Question.
Title: Message That is 'keeping the interdepancy between my view files as few as possible'. -Original Message-From: Ben Elmore [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 4:07 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Well. My thought is 'Who would know what child needed the work done?' The view locator's need to have the view helper name be unique is so that it can locate the view. A command has to be 100% sure what view towork with to get the data to properly make the call out to the server. Therefore my thought is that the safer bet would be to have the command talk to the parent to either a) get the data or b) get the name of the child. Anyway, those are just my thoughts to why I would approach the situation the way I outlined. My judgment of clean has a lot to do with the ability to maintain the application and as much as possible keeping the interdepancy between my view files as possible. Loose coupling. Ben -Original Message-From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 3:18 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Yes I had tho of that idea ben. But was wondering what was the clean way to do it. Thanks for the reply's so far. Omar Ramos Itacon Corporation Technology Manager From: Ben Elmore [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 2:17 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. The way Cairngorm current architects the ViewHelper is that itrequires eachViewHelper to register itself to the ViewLocator under a unique name. Therefore if you are attaching theview dynamically in a repeater and using the samevalue in the 'name' attributefor the ViewHelpers thenthe ViewLoactor will throw an error. One approach to your solution is to have the each of your views bubble up its methods to the parent view that the repeater exists in. For example (in code babble). MyMainView.mxml mx:script public activeChild : MovieClip = null; function parentHandleMethod(evt) { // store current child view to local var activeChild = evt.target' // do server call } /ms:script mx:repeater me:mychildView /mx:repeater ... MyChildView.mxml mx:Metadata [Event("onCustomEvent1")] [Event("onCustomEvent2")] /mx:Metadata mx:Button click="this.dispatchEvent({type='onCustomEvent1', otherAttributes=''})" In this example instead of having the child view handle the logic itself (communicating to the server) it tells the parent too. Or more correctly says 'someone please do this for me' the parent will know which of the child views to get the data from since the dispatch event automatically keeps track of the target in which the event was dispatch from. This is just a suggestion. There are other options out there, perhaps better or more correct then this approach. Ben -Original Message-From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:53 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Cairngorm Question. Anyone? Omar Ramos Itacon Corporation Technology Manager From: Omar Ramos [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 8:18 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm Question. Hi all, I am using the Cairngorm plataform but had a small question. How can I use the viewhelper technique when I attach view dynamicaly? For example I have a mxml component and put a view helper attached to it and use this component on a repeater and 5 instances are made. When I call the getViewHelper method which of those 5 reference will it give me? Any help would be apreaciated. Omar Ramos Itacon Corporation Technology Manager 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 the Yahoo! Terms of Service.