--- On 22/Mar/2016, Andrea Giammarchi wrote:
> Awesome, thanks!!!
>
> One final question: do you know why I cannot discover interfaces such
> `GLocalFile`, returned as example from `File.new_from_path('./file')` ?
not sure GLocalFile exists?
https://developer.gnome.org/gio/stable/GFile.html#g-file-new-for-path
returns GFile
Regards
Alan
> I've tried to discover it on Gio namespace through all info I could get and
> yet it's missing from my parsing.
>
> Thanks
>
> On Tue, Mar 22, 2016 at 4:41 AM, Alan Knowles <[email protected]> wrote:
>
> > You have to check the class'es interfaces, and inheritance.
> >
> > There is seed code that does this here.
> > https://git.gnome.org/browse/introspection-doc-generator/tree/Introspect
> >
> > the core bit that extracts class info is in Class.js and Base.js
> >
> > Regards
> > Alan
> >
> >
> > On Monday, March 21, 2016 11:25 PM, Andrea Giammarchi wrote:
> >
> > I've noticed that `seed` exposes all JS "classes", properties, and both
> > public static or prototype methods correctly.
> >
> > My first attempt to have similar info in gjs was based on Proxies on the
> > whole namespace and runtime discovery.
> >
> > Thankfully, but only recently, I've realized I could introspect upfront
> > instead of runtime.
> >
> > Although, I wonder if:
> >
> > 1. it is planned to expose static and proottype methods and prototypes
> > in gjs "classes", similar way seed already does?
> > 2. is there some 1 => 1 description of a possible gir => JS
> > translation?
> >
> > About second point, I'm apparently able to discover pretty much everything
> > by simply using `GIRepository.object_info_get_n_methods(info)` , loop each
> > of them, and define it eventually wrapped or transformed in the Class (e.g.
> > Gtk.Window) or its prototype comparing `function_info_get_flags`.
> >
> > However, I've see there's much more coming out via
> > `object_info_get_n_properties` and relative loop but I'm not sure it's
> > needed, it makes sense ... or if I'm missing something.
> >
> > TL;DR does anybody know if in order to discover a generic "Class"
> > properties and methods a loop over all `object_info_get_n_methods` is
> > enough?
> >
> > Thank you and Best Regards
> >
> >
> > _______________________________________________
> > javascript-list mailing
> > [email protected]https://mail.gnome.org/mailman/listinfo/javascript-list
> >
> >
> >
_______________________________________________
javascript-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/javascript-list