View unanswered posts | View active topics



Reply to topic  [ 6 posts ] 
Small improvement to code completion 
Author Message
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Hi,

Unfortunately the code completion does not take the current imports into account properly, causing some poor suggestions like flash.events.TouchEvent whereas I have already imported startling.events.TouchEvent (yes, using the same names in Starling was a very poor choice, i agree..). Furthermore, after importing, code completion sometimes still replaces TouchEvent by flash.events.TouchEvent while typing due to the order problem.

Simply suggesting the current imports first would really really improve the code completion.

Moreover, suggesting child classes of included packages first would also largely improve code completion. Ex: suggesting ui.controls.Button before starling.Button if ui.subpackage.ClassName is included.

Thanks for reading,

Nx


Last edited by neuronix on Fri Jun 14, 2013 10:56 am, edited 2 times in total.



Wed Jun 12, 2013 8:28 am
Profile
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Another small improvement would be to favor variable names over Class names. Autocomplete keeps on replacing "event" variables by "Event" which is very annoying :(


Fri Jun 14, 2013 9:02 am
Profile
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Does anyone agree or did I say something dumb ? :D


Mon Jun 17, 2013 2:14 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Thanks, those are good suggestions (which are kind of aware of).

However about event/Event, FD should suggest 'event' first - maybe you have the opposite problem?


Mon Jun 24, 2013 9:19 pm
Profile WWW
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Thanks for your answer.

Regarding event/Event, FD sometimes does not even suggest "event" as if it cannot find the local variable. I have the same problem with json/JSON where since the json variable is not suggested, it automatically completes with JSON unless I press escape.

In some cases, the absence of local variables is due to a syntax error somewhere, but in many cases I double checked my code and could not find any error.


Tue Jun 25, 2013 4:56 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
FD doesn't pick arguments of inner functions - for instance when using an anonymous function as a event handler.
Solution is to create a class function instead.


Tue Jun 25, 2013 8:41 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.