View unanswered posts | View active topics



Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4  Next
Methods and variables generation patch 
Author Message
Member

Joined: Sat Nov 15, 2008 4:00 am
Posts: 171
Reply with quote
Ok. Not so right. :)
I see that if memeber name all is uppercase than you generate event type variable (hope all flashers declare event types in upper case :)), but in this case it sould be a constant, i jus mistake in my post.
so instead
Code:
public static var NEW_EVENT_TYPE:String = "SomeEvent.NEW_EVENT_TYPE";

should be a
Code:
public static const NEW_EVENT_TYPE:String = "SomeEvent.NEW_EVENT_TYPE";


Thanks again. :wink:

P.S. If nobody need this feature there are no need to update the patch, I'll do it for myself (just add a constant flag to member in case it name in uppercase). Cheers.


Fri Jul 02, 2010 4:46 pm
Profile
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
I'll fix that on Monday


Fri Jul 02, 2010 7:38 pm
Profile
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
new version with some new fixes (constant generation is now available through context menu)


Mon Jul 05, 2010 7:29 am
Profile
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
new fix for AS2 project (there are no constants)


Tue Jul 06, 2010 9:50 am
Profile
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 337
Location: Lviv, Ukraine
Reply with quote
it does not show "Create new class" for "RemoveItemsAction"
Code:
_scene.pushAction(new RemoveItemsAction(player));


possible additional features to implement:
- surround selection with.. (for, for...each, do, if, try...catch)
- extract method from selected lines
- introduce variable (from selection)


Tue Jul 06, 2010 10:42 am
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
Canab wrote:
possible additional features to implement:
- surround selection with.. (for, for...each, do, if, try...catch)
- extract method from selected lines
- introduce variable (from selection)

these look good! Will definitely implement these when I have time


Thu Jul 08, 2010 7:01 am
Profile
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
Canab wrote:
it does not show "Create new class" for "RemoveItemsAction"
Code:
_scene.pushAction(new RemoveItemsAction(player));


added fix for that


Thu Jul 08, 2010 7:40 am
Profile
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 337
Location: Lviv, Ukraine
Reply with quote
Exception appears when generate public method for "showLargeTip"
"yourTurnNow" is node in XML "appData.messages"
if remove "yourTurnNow" ant leave "appData.messages" it works fine

Code:
mainWindow.showLargeTip(appData.messages.yourTurnNow);


Code:
Object reference not set to an instance of an object.

   at ASCompletion.Completion.ASGenerator.getQualifiedType(String type, ClassModel aType) in D:\flash\FD3\External\Plugins\ASCompletion\Completion\ASGenerator.cs:line 1115
   at ASCompletion.Completion.ASGenerator.ParseFunctionParameters(ScintillaControl Sci, Int32 p) in D:\flash\FD3\External\Plugins\ASCompletion\Completion\ASGenerator.cs:line 950
   at ASCompletion.Completion.ASGenerator.GenerateJob(GeneratorJobType job, MemberModel member, ClassModel inClass, String itemLabel) in D:\flash\FD3\External\Plugins\ASCompletion\Completion\ASGenerator.cs:line 608
   at ASCompletion.Completion.GeneratorItem.get_Value() in D:\flash\FD3\External\Plugins\ASCompletion\Completion\ASGenerator.cs:line 2003
   at PluginCore.Controls.CompletionList.ReplaceText(ScintillaControl sci, String tail, Char trigger) in D:\flash\FD3\PluginCore\PluginCore\Controls\CompletionList.cs:line 725
   at PluginCore.Controls.CompletionList.ReplaceText(ScintillaControl sci, Char trigger) in D:\flash\FD3\PluginCore\PluginCore\Controls\CompletionList.cs:line 706
   at PluginCore.Controls.CompletionList.HandleKeys(ScintillaControl sci, Keys key) in D:\flash\FD3\PluginCore\PluginCore\Controls\CompletionList.cs:line 809
   at PluginCore.Controls.UITools.HandleKeys(Keys key) in D:\flash\FD3\PluginCore\PluginCore\Controls\UITools.cs:line 399
   at PluginCore.Controls.UITools.HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority) in D:\flash\FD3\PluginCore\PluginCore\Controls\UITools.cs:line 136
   at PluginCore.Managers.EventManager.DispatchEvent(Object sender, NotifyEvent e) in D:\flash\FD3\PluginCore\PluginCore\Managers\EventManager.cs:line 144


PS. if you parse "dot" sequence in first parameter and on some step it is XML/XMLList, then whole parameter should have XMLLIst type. This is possible workflow for this exception, I think


Thu Jul 08, 2010 12:05 pm
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
thanks for posting the bug, it's fixed now.


Thu Jul 08, 2010 12:42 pm
Profile
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
updated for the latest trunk


Mon Jul 26, 2010 3:11 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
I've applied your patch... finally ;)

I fixed a little parsing bug when generating a function from a non-function token (ie. without parenthesis) and added detection of literal number/int/string/array/object/xml values and function callbacks.

This is a great addition I think :)


Thu Jul 29, 2010 8:50 pm
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
Thanks a lot! However, I see that you have removed constant related logic (GeneratorJobType.Constant). Do you think that it's not necessary? This might actually be quite convenient when you have

Config.SOME_CONST and you get
Quote:
static public const SOME_CONST:String = "SOME_CONST";

this is good especially for event types generation.


Fri Jul 30, 2010 6:31 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Convention for consts is:
Code:
static public const SOME_CONST:String = "someConst";


Fri Jul 30, 2010 7:20 am
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
Reply with quote
Philippe wrote:
Convention for consts is:
Code:
static public const SOME_CONST:String = "someConst";

ok, so that was the reason you did not include that? I can make a fix if you want.


Fri Jul 30, 2010 7:48 am
Profile
Member

Joined: Thu Mar 27, 2008 2:13 pm
Posts: 211
Reply with quote
will this be released with whatever there is as 3.2.3 any time soon? for this would save me loads of time right now.

p.s. and if not, this could be the 1st time ever I will install devbuild ;)

_________________
Was seen using 4.0.4 RTM b2 rev. 2337 on Win7 .NET 2.0 on July 29th, 2012


Fri Jul 30, 2010 9:58 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 52 posts ]  Go to page Previous  1, 2, 3, 4  Next

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:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.