Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=JNgGah8swcybokpqmNajWDfhcjn5RzQlKOyjq9/PAOY=; b=PZm5D9v+bBDoxO++axFW9CN0juRF0KKggHlOSGJzGKDttXmWDUWW1nWx9Efazvwzb8WUFNVMwtyTiKtPrNXfd1TYX4/8MRRDRfn3NvlFxQuQvhAVwm77QFixE3JYrJQw1VoX+qsl74zXsASEJksjA3J4i889cdUBVzBoNxBA6eU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ejRzw/OhoCgoqnyOOioM0Hu2pTdohZbR2QJV4Dw5XYDf4FQJwnPETxki2MdCCBDWL9SjpTEC7XMFPpkspkMFxQHtL+JVixTGtvHY7x7b1rfBxWCUzk954dhDStgVvLCFx4tEhU5WXsslEEndEj6a00s9CHf550ibhFFlI7zkeBg= Message-ID: <479A0847.7060808 at gmail.com> Date: Fri, 25 Jan 2008 10:03:19 -0600 From: Edgar Friendly MIME-Version: 1.0 To: Julien Moutinho , lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] Gtk spin button References: <47996A67.2070509 at gmail.com> <20080125093449.GA14983 at localhost> In-Reply-To: <20080125093449.GA14983 at localhost> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 Content-Length: 1067 Julien Moutinho wrote: > Indeed, perhaps a [method entry = new GEdit.entry obj] > would be welcome inside [GEdit.spin_button]. > > Since http://library.gnome.org/devel/gtk/stable/GtkSpinButton.html > says that: "[entry] is the GtkEntry part of the GtkSpinButton widget, > and can be used accordingly." > entry = new GEdit.entry obj? Good thing I didn't try to make guesses as to how to do this, I wouldn't have come up with this. I might have guessed changing the object inheritance or using a #coerce cast to create the entry... > Still, as a workaround, a manual cast is possible with [GtkEdit.Entry.cast]: > > let sb = GEdit.spin_button () ~packing: w#vbox#add > ~digits: 0 ~numeric: true in > > let entry = new GEdit.entry (GtkEdit.Entry.cast sb#as_widget) in > > entry#set_activates_default true; /me is pleasantly surprised this doesn't segfault in some nasty way. Thanks for the workaround. E. _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk