Date: Mon, 13 Oct 2003 12:13:49 +0200 To: Olivier Andrieu Cc: lablgtk at kaba.or.jp Subject: Re: ANNOUNCE: lablGL, LablGTK1, LablGTK2 combined release Message-ID: <20031013101349.GA19951 at iliana> References: <20031010185936H.garrigue at kurims.kyoto-u.ac.jp> <20031010134222.GA12891 at iliana> <20031010205947.GA31778 at cs.unibo.it> <16266.31074.688738.837862 at akasha.ijm.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <16266.31074.688738.837862 at akasha.ijm.jussieu.fr> From: Sven Luther On Mon, Oct 13, 2003 at 12:07:30PM +0200, Olivier Andrieu wrote: > Claudio Sacerdoti Coen [Friday 10 October 2003] : > > > > Hi Sven, > > > > > Saddly, Olivier's patch which add support for set/get_label on buttons > > > was not included, this means people using this feature cannot use the > > > prebuilt windows libaries, and i was wanting to do just that :(( > > > > I can not really understand your concerns. > > "label" is a property of a button and you can always use properties > > by means of set/get. Indeed the patch of Olivier boils down to: > > > > method set_label = set Button.P.label obj > > method label = get Button.P.label obj > > > > that means that, given a button b, you should always be able to > > set Button.P.label b#as_widget and > > get Button.P.label b#as_widget > > actually you have to do a downcast because #as_widget returns a > [`gtk|`widget] obj and the property setter/getter needs a [> `button] > obj. So that would be : > > Gobject.set > GtkButtonProps.Button.P.label > (GtkButtonProps.Button.cast b#as_widget) BTW, it should be easy to have a button2 object which would inherit from button and add these two methods. This could easily be done in my app, and i could then reuse the 2.2.0 windows pre-built library. Furthermore, i could have a button2 constructor, which would have the text argument as non-option, thus removing any chance that a button2 is created without adding a label. (Not used to the OO stuff in ocaml yet). Friendly, Sven Luther