Anyone?

_______________________________________________________________________

Joseph Balderson | http://joeflash.ca
Flex & Flash Platform Developer | Abobe Certified Developer & Trainer
Author, Professional Flex 3 (coming Winter 2008)
Staff Writer, Community MX | http://communitymx.com/author.cfm?cid=4674



Joseph Balderson wrote:
> A potentially silly question, but one I have not managed to figure out.
> 
> My question is, is there any way to get code hinting for MXML assets 
> working in included as files?
> 
> Often in my projects I use a pseudo-code behind for MXML files by simply 
> including the AS code in the source prop for the Script tag in the MXML 
> file.
> 
> Say in CustomComponent.mxml, we have
> 
> <mx:Script source="CustomComponentCode.as"/>
> ...
> <mx:Button id="daBtn"/>
> 
> The problem is, in CustomComponentCode.as, I don't get code hinting for 
> MXML assets declared in CustomComponent.mxml -- daBtn does not trigger 
> code hinting, which is a real pain. I suppose one solution is to declare 
> all component instances in AS, but that completely defeats the purpose 
> of MXML.
> 
> For smaller components, I usually land up coding the entire component in 
> one MXML file, then separate out the AS from the MXML when it's done, 
> but this can lead to spaghetti code, so it would be great if I could use 
> the two files right from the start.
> 
> I don't want to get into a debate about code behind techniques; I know 
> there are other, more robust ways of using code behind such as using 
> bona-fide classes, but the include technique seems a lot more logical 
> and straightforward to me.
> 
> Thanks,
> 

Reply via email to