Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; bh=KdTLoWjPkuFTA79kZUY1A+WLCO6dRwnq84MpU4+CpFw=; b=LmD5X+RUtmbyokO+DEBmKvW8Y7piaAz2Hiz9RKx8WUA1TsCs9jzsJGgo1mNh0SN+wH/jm3SjgA3scyZnFKOb4UMJXO39Zx75ADn0Lds5KhbEemVAezYa6BQMwRC+HgVfUooWbDs7FpSK4lMaQ9IkByIPYZQAyPgYniHFx1u2QtQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=thu9Q7nAalUOlCEVTH38x0qVTfaD/TGLbchrCoUbnDq/8QYP1S33vyWuhD25cIy37NlchIRObvgOM4W7bwJ50tTI/Kgua3tKFU8OI3bRhjdIq9fwpy0lF1lzAnorBoJm4SU2gK/vh6jTgnl9dHptSYftnb+SpuNIo46OfsUFLr4= Date: Wed, 31 Oct 2007 17:48:37 +0100 To: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] Re: Signals - how to inherit GObj.gobject_signals properly? Message-ID: <20071031164837.GA24273 at localhost> Mail-Followup-To: Julien Moutinho , lablgtk@yquem.inria.fr References: <20071030044841.GB29836 at localhost> <20071031062514.GA26132@localhost> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20071031062514.GA26132 at localhost> From: Julien Moutinho Content-Type: text/plain; charset=utf-8 Content-Length: 1084 On Wed, Oct 31, 2007 at 07:25:14AM +0100, Julien Moutinho wrote: > What we would need is to apply (new print_settings) on an open p.v.t. > but unless we use a little bit of Obj.magic... I see no way. Hum, there is always the possibility to use a wrapper: # type -'a obj;; type -'a obj # let copy : [>`X] obj -> [`X] obj = fun x -> (x :> [`X] obj);; val copy : [> `X ] obj -> [ `X ] obj = # class c_skel obj = object method copy = new c (copy obj) end and c obj = object inherit c_skel obj end let c obj = new c (obj :> [`X] obj);; class c_skel : [ `X ] obj -> object method copy : c end and c : [ `X ] obj -> object method copy : c end val c : [> `X ] obj -> c = Which seems to be the normal scheme (cf. val GTree.view creating class GTree.view for instance). My bad, I guess I was misleaded when reading gPrintOperation.mli two days ago, seeing all those [> ... ] I then deducted they were required. Regards, Julien. _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk