[flexcoders] Cairngorm separation of action script and mxml

2006-08-01 Thread flxcoder
Hi,

I have a component that gets called in the view:component say.

Now this component has some functions that do operations to format the
data in the format that is required to display on screen. These
functions are quite large and ugly. I want to move them to a separate
scripts.as file, so they could be a little out of sight and also
reusable.

Any ideas how I can go about doing this.
1. How would I get access to scripts.as function returnXMLList(xml) say.
Is it something like
import view.scripts;

Scripts scripts = new Scripts();
scripts.returnXMLList(xml);

Does this make sense?

Thanks.






--
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 separation of action script and mxml

2006-08-01 Thread Paul BH



what you might want to look at is creating an adapter class to format your data, so it would be something like:myList:XMLList = myAdapter.adaptXML(xml)then in myAdapterpublic static function adaptXML(inXML:XML):XMLList{
 //do ugly stuff}On 8/1/06, flxcoder [EMAIL PROTECTED] wrote:













  



Hi,

I have a component that gets called in the view:component say.

Now this component has some functions that do operations to format the
data in the format that is required to display on screen. These
functions are quite large and ugly. I want to move them to a separate
scripts.as file, so they could be a little out of sight and also
reusable.

Any ideas how I can go about doing this.
1. How would I get access to scripts.as function returnXMLList(xml) say.
Is it something like
import view.scripts;

Scripts scripts = new Scripts();
scripts.returnXMLList(xml);

Does this make sense?

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
  
  
  

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.



  






__,_._,___