Code assist questions

Get help with Spket IDE.
Post Reply
Magisterion
Posts: 3
Joined: Mon May 31, 2010 1:57 pm

Code assist questions

Post by Magisterion » Mon May 31, 2010 2:07 pm

Hello! I have a lot of questions about Spket code assist for JavaScript:

1. When i type "var a = new String();" i got autocomplition
but when i type "var a : String" (for example) there is nothing after i typing "a."
Is there anyway to show commands list anyways, without filtering, when Spket doesn't know type of var?

2. Is there any solution of code assist for functions with one name, but with different parameters and types? (for now shows only first function)

3. How to enable code assist without ctrl+space? I try to use this plugin https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157, but it's doesn't works :(

4. How to add any comments/documentations for library functions, that can be displayed at the code assist list?

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Re: Code assist questions

Post by eric_suen » Mon May 31, 2010 8:24 pm

1. Spket IDE is for JavaScript, not for ActionScript, so it does not support syntax like "var a : String"

2. JavaScript does not support override

Magisterion
Posts: 3
Joined: Mon May 31, 2010 1:57 pm

Re: Code assist questions

Post by Magisterion » Tue Jun 01, 2010 7:27 am

eric_suen wrote:1. Spket IDE is for JavaScript, not for ActionScript, so it does not support syntax like "var a : String"

2. JavaScript does not support override
Thanks for the fast answers, Eric! :)
I try to use spket to edit Mono (.NET) Java Scripts. Anyway - is there any solution to enable Code Assists for unknown vars?
For example - i have function "Substring" of String class.
And then i write:
var a;
a.Sub...
and if Spket can't find class of var "a" - it try to find function or parameter, starting on "Sub". And if i type nothing after dot - it show me full list.
That's really really helps :)

I try to use spket to edit scripts of www.unity3d.com engine. So for now - i add main functions to Profile Explorer. But code assist doesn't work for big part of vars, because of "var a : String" like declaring.

Here is example of class:

class Animation {
var clip : AnimationClip;
var playAutomatically : bool;
var wrapMode : WrapMode;
var isPlaying : bool;
var animatePhysics : bool;
var animateOnlyIfVisible : bool;
function Stop (name : string) : void;
function Rewind (name : string) : void;
function Sample () : void;
function IsPlaying (name : string) : bool;
function Blend (animation : string, targetWeight : float, fadeLength : float) : void;
function CrossFade (animation : string, fadeLength : floa, mode : PlayMode) : void;
function CrossFadeQueued (animation : string, fadeLength : float, queue : QueueMode, mode : PlayMode) : AnimationState;
function PlayQueued (animation : string, queue : QueueMode, mode : PlayMode) : AnimationState;
function AddClip (clip : AnimationClip, newName : string, firstFrame : int, lastFrame : int, addLoopFrame : bool = false) : void;
function RemoveClip (clipName : string) : void;
function GetClipCount () : int;
function SyncLayer (layer : int) : void;
}

so when i type "var a : Animation" - code assist doesn't works. And i hope to find any methods to fix this :) Is this possible?

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Re: Code assist questions

Post by eric_suen » Tue Jun 01, 2010 8:12 am

I suggest you try http://www.flashdevelop.org/ it supports ActionScript which has similar syntax

Magisterion
Posts: 3
Joined: Mon May 31, 2010 1:57 pm

Re: Code assist questions

Post by Magisterion » Tue Jun 01, 2010 8:34 am

eric_suen wrote:I suggest you try http://www.flashdevelop.org/ it supports ActionScript which has similar syntax
Yes, there is similar syntax's, but this is different languages.
More similar is http://msdn.microsoft.com/en-us/library ... 85%29.aspx (.NET JScript)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests