Announcement

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

    com.smartgwt.client.data.RecordList.add(..) error

    Hi,

    Method add(com.smartgwt.client.data.Record) in class com.smartgwt.client.data.RecordList cannot work:

    JSNI method '@com.smartgwt.client.data.RecordList::add(Lcom/smartgwt/client/data/Record;)' returned a value of type JavaScript object(626) but was declared void; it should not have returned a value at all

    It really has return in JS:
    Code:
        /**
         * Add an object to this list, at the end
         * @param record object to add
         *
         */
        public native void add(Record record) /*-{
            var self = this.@com.smartgwt.client.core.BaseClass::getOrCreateJsObj()();
            return self.add(record.@com.smartgwt.client.data.Record::getJsObj()());
        }-*/;
    Regards,
    Gleb

    #2
    Thanks for the heads-up. This is now fixed

    Comment


      #3
      /**
      * Add list of items list to this array at item pos. All items after array[pos] will slide down to fit new items.
      * @param list new array of items
      * @param pos position in this list to put the new items
      *
      */
      public native void addListAt(Record[] list, int pos) /*-{
      var self = this.@com.smartgwt.client.core.BaseClass::getOrCreateJsObj()();
      return self.addListAt(@com.smartgwt.client.util.JSOHelper::convertToJavaScriptArray([Ljava/lang/Object;)(list), pos);
      }-*/;


      This method has the same problem in smartgwt 2.5

      Comment


        #4
        Thanks for the heads-up this is now resolved in both 2.5 and 3.x branch nightly builds.

        Comment

        Working...
        X