Re: Creating custom widget in Perl



/--- On Thu, Feb 22, 2001 at 06:36:14PM +0100, Paolo Molaro wrote:
| On 02/22/01 dLux wrote:
| > | $ perl -MGtk=-init -e 'print UNIVERSAL::can("Gtk::Button","new"),
| > | "\n"' CODE(0x815775c)
| >
| > In my version, it returns still undef! I use the CVS version of
| > gnome-perl. I am now downloading the debian package of 0.7005.
|
| Again, are you sure you call Gtk->init()? What version of Gtk-Perl are
| you using?

Yes, I cut'n'pasted the line from your mail.

I have used the CVS version of 0.7005 from gnome.org. The debian
packages seems to solve that problem, and gives back the proper answer.

| Well, in Gtk+ it's called gtk_type_unique()... There can be two
| different derivation strategies:
| 1) your class simply derives from a Gtk class (you create a new perl
|    class, but not a new Gtk type). In this case simply setting @ISA is
|    sufficent.

Can I use this module as a widget in this case?

| TMTOWTDI. A future GUI builder will be able to query your widget for
| properties for example in a stabdard way an present the user a
| property-editor dialog box. My gspeech module could use your widget's
| properties to present to the blind user more information about the
| state of the widget without having to know in detail how the widget
| works and in what language it was implemented... There are tons of
| other reason for using args (in the next version of gtk, you'll also
| get a property change notification system for free...).

Ok now, thanks.

\---

dLux
--
 "I did a 'zcat /vmlinuz > /dev/audio' and I think I've heard God..."
 (mikecd on #Linux)




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