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() /*-{
  th...@com.google.gwt.user.client.ui.PrefixTree
$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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to