So, I'm guessing there is nothing wrong with using
JavaScriptObject.createArray() in place of the native function??

On Feb 18, 1:30 pm, Patrick Tucker <[email protected]>
wrote:
> I was looking at the code in PreefixTree to see if it would be
> feasible to make it generic so I can pass it values other than a
> String and noticed something that I thought was a little odd.  See
> init() in the following code snippets:
>
> private JavaScriptObject stack;
>
> public PrefixTreeIterator(PrefixTree tree) {
>   init();
>   addTree(tree, "");
>
> }
>
> private native void init() /*-{
>   [email protected]
> $PrefixTreeIterator::stack = [];
>
> }-*/;
>
> This basically got me wondering why the developer chose to assign
> stack with a JNDI call instead of doing the following:
>
> private final JavaScriptObject stack = JavaScriptObject.createArray();
>
> Is there something wrong with using JavaScriptObject.createArray() to
> do this or was this particular function not available when the code
> was written?
>
> This is code from 2.2 BTW.
>
> Thanks,
> Pat

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to