Noob Question! addChild on Context autocomplete FlashDevelop

19 views
Skip to first unread message

Dead Duck

unread,
Feb 21, 2014, 12:58:11 AM2/21/14
to aw...@googlegroups.com
Yo!

I love the powerful awe6 kernel and all it does in managing the exoskeleton, data, transitions, and assets plus all the other extra goodies.  But I got in the habit of bypassing Entities and have been just attaching to the _context of them instead.  Anyways one thing has been irking me about my current workflow and I can't wrap my head around the cause of it.  

If I'm within an Entity and doing _context.addChild, it works fine with the autocomplete with FlashDevelop and I see all the options as if it were a sprite.  However if I'm extending Context and from within that class, there's no autocomplete.  using (this.) will get the autocomplete to show up. 

I realize this is more of a workings-of-FlashDevelop question than an awe6 question but I'm just really curious about this behavior and the reasoning for it.

Thanks if u can answer!






Rob Fell

unread,
Feb 21, 2014, 1:20:55 AM2/21/14
to aw...@googlegroups.com
I've also found autocomplete on conditional typedefs (as is the case of Context) to be temperamental with FlashDevelop (which is probably by extension the Haxe Compiler completion?).  But it's recently better than it was.

Class inheritance / extension appears consistently reliable.  So you could modify awe6.core.Context to extend flash.display.Sprite (rather than typedef to it)?

And it's no crime to use public methods of _context!  I do it all the time in project work.  Just be wise if needing to pass that dependency outside the class if also wanting to keep things platform agnostic.  That's a whole lot of ifs :p

Dead Duck

unread,
Feb 21, 2014, 1:58:43 PM2/21/14
to aw...@googlegroups.com
Ah thanks!!!! Yes that worked in core.Context.  I commented out the 'typedef context' line under the awe6DriverRemap condition and it works smoothly now.  Maybe because haxe.macro has a Context too?  It seems if there's a line that typedef's Context = to anything from haxe.macro.*, even if the condition isn't met,  FlashDevelop's autocomplete won't show a sprites in Context.

"if needing to pass that dependency outside the class "
Im not sure what that means, I know I should but I dont lol.

Dead Duck

unread,
Feb 22, 2014, 4:45:48 PM2/22/14
to aw...@googlegroups.com
ignore everything i said lol

ended up just doing one typedef to sprite

Reply all
Reply to author
Forward
0 new messages