Re: Gnome2 0.90 and GnomeUIInfo

On Tue, 2003-12-23 at 18:05, Jörn Reder wrote:

Looking at the source of 0.32, I don't see how one would be able to use
user_data with it.  Do you have some example code that uses user_data
and used to work?  (Pun not intended.)

I don't know the Gnome stuff, but I think it's not Gnome specific... 
AFAIRC the user_data binding was restricted to elementary data types 
(integers, strings) some time ago, because adding support for complex 
Perl types was difficult. Instead all Perl objects turned into hashes, 
which are "magically" bound to the correspondent C objects internally. 
This way you can add arbitrary user data the Perl way: just add your 
values to the hashes.

You can put any scalar into every user_data in gtk2-perl-xs land.  Any
scalar means that you can also store references to complex data
structures like hashes, lists, hashes of hashes, list of lists, etc.

The problem with GnomeUIInfo is different though.  The C API provides a
user_data field but the Perl bindings need that field for their own
purposes and therefor it's not available to the Perl developer at all.


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