Re: Parsing XML in shell extension



On Sat, Oct 17, 2015 at 10:11 PM, Jay Strict <jay strict posteo de> wrote:
const XMLConfigParser = new Lang.Class({
    Name: 'XMLConfigParser',
    Extends: GLib.MarkupParser,

GMarkupParser is not a GObject, so you cannot inherit from it. In
general, support for anything below GObject is fairly limited - it
works for utility functions, types that are boxed by GObject *and*
provide a contructor-like function, and types that have special
treatment in gjs to expose it to JS. Neither is the case for
GMarkupParser, so you cannot use it from an extension (unless you add
support to gjs first).


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