I am writing an xpcom component using JavaScript.  I have touble in
returning an array from the component.

Here is what i did.

IDL :
   void getCalendars(out PRUint32 count,
                      [array, size_is(count), retval] out calICalendar
aCalendars);

Component's JS:
    getCalendars: function(cnt) {
     return this.calManager.getCalendars({});
  },

Usage :
 var calInterface = Components.classes["@test.com/calappinterface;1"]
                  .createInstance(Components.interfaces.omICalAppInterface);
var arr = calInterface.getCalendars({});
alert(arr.length);

Now, it always returns zero sized array. I have checked the call
this.calManager.getCalendars({}) in the components js - it works fine.
The problem is only in returning it.

Any help will be higly appreciated.

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to