Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FolderDropEvent source in SmartGWT.jar differs from google code source

    Hi guys,

    I'm seeing something weird.

    Here:
    https://code.google.com/p/smartgwt/source/browse/trunk/main/src/com/smartgwt/client/widgets/tree/events/FolderDropEvent.java

    the method getNodes is written as
    Code:
        /**
         * List of nodes being dropped
         *
         * @return List of nodes being dropped
         */
        public  native TreeNode[] getNodes() /*-{
            var jsObj = this.@com.smartgwt.client.event.AbstractSmartEvent::jsObj;
            return @com.smartgwt.client.widgets.tree.Tree::convertToTreeNodeArray(Lcom/google/gwt/core/client/JavaScriptObject;)(jsObj.nodes);
        }-*/;
    but in smartgwtpro-3.1d 08 03.zip\smartgwtpro-3.1d\lib\smartgwt.jar\com\smartgwt\client\widgets\tree\events\FolderDropEvent.java
    it is written as
    Code:
        /**
         * List of nodes being dropped
         *
         * @return List of nodes being dropped
         */
        public  native TreeNode[] getNodes() /*-{
            var jsObj = this.@com.smartgwt.client.event.AbstractSmartEvent::jsObj;
            return jsObj.nodes;
        }-*/;
    How come these are different?
    Is the correct version the first one?


    thanks,

    #2
    3.1d represents true nightlies, SVN represents less frequent checkpoints.

    Let us know if you're having an actual issue related to this method.

    Comment


      #3
      Yes, the one in the nightly gives a class cast exception since it's not converted to a tree node array as the one in SVN does.

      Comment


        #4
        Ah, you're correct, we had a regression here - should be fixed in the next nightly.

        Comment


          #5
          Still have troubles with TreeNode[] getNodes() in v4.0
          when i try to change some attributes it doesn't take changements

          Comment


            #6
            modelTree.addFolderDropHandler(new FolderDropHandler() {
            @Override
            public void onFolderDrop(FolderDropEvent event) {
            event.getNodes()[0].setAttribute(RECORD_NAME, "someName");
            }
            });

            dosn't work, it ignoe droped Nodes and create a new copy. so it ignore changements !!

            Thanks for Help

            Comment

            Working...
            X