Re: libseed-list question on window.get_size and out arguments



Given that 10.04 is an LTS, and has been working flawlessly for me in
all other ways, I'm not inclined to upgrade. If I just wanted to play
around with 2.31 myself, I would build it from source. The thing I'm
mostly concerned about, however, is whether it would be possible to
use Seed as the development platform in a real software project for
Ubuntu 10.04. Unfortunately, this bug involving out arguments seems
like a pretty big limitation to me. Do you think it would be feasible
to backport Seed 2.31 to 10.04?

Jake

On Thu, Oct 14, 2010 at 6:44 AM, Alan Knowles <alan akbkhome com> wrote:
> I'd upgrade to 10.10 - I did it the other day without any issue (probably the smoothest upgrade i've done in years...)
>
> That has 2.31 included. I doubt you would get much out of a bug report against an old release (although it was supposed to be LTS..)
>
> Regards
> Alan
>
>  --- On 14/Oct/2010, Jacob Beard wrote:
>> Hi,
>>
>> Thanks for the replies. I'm still getting the following error with
>> your code: GInvokeError Too few "out" arguments (handling out)
>>
>> This is on Ubuntu 10.04 using Seed from apt (version 2.28.1-1). I
>> guess this is probably due to it being an older version. Would it be
>> worth filing a bug in Launchpad?
>>
>> Jake
>>
>> On Wed, Oct 13, 2010 at 2:25 PM, Alan Knowles <alan akbkhome com> wrote:
>> > This should get you started.
>> > http://www.roojs.com/seed/Gtk.Window.html#.get_size
>> >
>> > the mapping to C 'out' arguments works in a number of ways (partly due to backward compatibility issues)
>> >
>> > a) Original
>> > - if you put a object where the out argument goes, it will set argument.value to the return value.
>> > eg. x = {};  w.get_size(x,y)  -- x.value and y.value should be set.
>> >
>> > b) the first 'out' argument has it's properties set based on the names of the arguments
>> > eg. x = {}; w.get_size(x) - x.width, x.height should be set.
>> >
>> > c) if the method has no return argument an object is returned with the properties based on the names of the arguments.
>> > eg. x = w.get_size() - x.width and x.height should be set.
>> >
>> > Code below works.
>> > ----------------
>> >
>> >
>> > Gtk = imports.gi.Gtk;
>> > Gtk.init(null,null  );
>> > w = new Gtk.Window();
>> >
>> > w.signal.show.connect(function(wx) {
>> > print("SHOW");
>> >    print(w.get_size().width);
>> >    print(w.get_size().height);
>> > });
>> > w.show();
>> > Gtk.main();
>> >
>> >
>> > Regards
>> > Alan
>> >
>> >  --- On 13/Oct/2010, Jacob Beard wrote:
>> >> Hi,
>> >>
>> >> I've just started using Seed for development. One thing that Seed's
>> >> web page mentions is that it "Maps C-isms (say, out arguments, or
>> >> enums) to things that make sense in JavaScript." Unfortunately, I
>> >> can't find any documentation or examples for how out arguments should
>> >> work. So, for example, the following call in Seed:
>> >>
>> >> window.get_size()
>> >>
>> >> Will return the error "GInvokeError Too few "out" arguments (handling out)"
>> >>
>> >> In C, the call would be expressed by passing in two out arguments:
>> >>
>> >> gtk_window_get_size(GTK_WINDOW(widget), &width, &height);
>> >>
>> >> I've tried various permutations on the JavaScript call without
>> >> success. I've also looked at the documentation and sample code, but
>> >> haven't found any demonstrations of out arguments.
>> >>
>> >> I have also asked this question on stackoverflow:
>> >> http://stackoverflow.com/questions/3916909/how-are-out-parameters-represented-for-seed-javascript-gobject-bindings/3916961#3916961
>> >>
>> >> I'd appreciate any insight anyone can offer into how this call should
>> >> work under the Seed bindings. Thanks,
>> >>
>> >> Jake
>> >> _______________________________________________
>> >> libseed-list mailing list
>> >> libseed-list gnome org
>> >> http://mail.gnome.org/mailman/listinfo/libseed-list
>> >
>> > _______________________________________________
>> > libseed-list mailing list
>> > libseed-list gnome org
>> > http://mail.gnome.org/mailman/listinfo/libseed-list
>> >
>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]