From: Tom Sawyer Date: 2002-08-29T17:55:18+09:00 Subject: Re: Ruby/DL with GTK gtk_signal_connect thank you, thank you, thank you! worked like a champ! :) FYI- my step brother is living in japan right now and is teaching english there. i've asked him to translate the Ruby/DL docs into english. hopfully he'll have the time to do it soon. i'll pass them along to you when he's done. oh, i have one more question, if you don't mind. since, i can't read the jp docs :( i'm inserting text into a Text widget. and i need to define the GdkColor. how do i create s Struct to use with Ruby/DL? ex- Gtk.gtk_text_insert(@native, Gtk.gdk_font_load('courier'), GdkColor?, GdkColor?, @meta.value, -1) Ruby/DL is great! thanks again, ~tom On Thu, 2002-08-29 at 02:01, Takaaki Tateishi wrote: > Hello, > > > have a problem. i dont know how to get gtk_signal_connect to reference a > > proc. ex- > > Gtk.gtk_signal_connect(@native, "destroy", proc { @meta.close }, nil) > > How about `DL.callback'? It assigns a Proc object to a callback function. > > sym = DL.callback('0PP', proc) > > `sym' is a Symbol object which represents the callback function, and it > can be used with gtk_signal_connect() as follows: > > Gtk.gtk_signal_connect(@native, "destroy", sym, nil) > > -- > Takaaki Tateishi > > -- ~transami