Re: [Fxruby-users] Re: to get list of messages for widget
Status: Inactive
Brought to you by:
lyle
|
From: meinrad r. <mei...@gm...> - 2004-05-14 14:17:13
|
ly...@kn... wrote:
> On Wed, 12 May 2004 07:41:32 -0700 (PDT), Vladislav Guzov
> <vl...@ya...> wrote :
>
>
>>I know about documentation but a tool like GUI builder
>>is not. Is it possible to get list using method or
>>some other way?
>
>
> No.
>
>
well, i think there is a (rather complicated) way!
i have thought about this too, because i wrote a gui builder and i think
i have an idea how to do it.
first you need a list of all messages that exist. that is fairly easy
with ruby:
messages = Fox.constants.grep /SEL_/ # or something like that
second you need to generate connectors for all messages in your widget
that you want to test. for instance:
b = Button.new( parent, "text", ... )
messages.each{|const_string|
const = Object.const_get(const_string)
b.connect(const) { puts "received message: #{const_string}" }
}
third, test to which messages your widged responded
as far as i know, it is possible to send messages programmatically to a
custom fox widget of your choice (lyle will correct me if i am wrong.),
but unfortunately i don't have a piece of code ready here.
if you really managed to do this, i would be very interested in the
script to use it for my gui builder.
cheers,
- henon
|