FXRuby: overload FXSlider

In regards to connect() and multiple handlers, have a look at some
recent email on the fxruby list.

http://sourceforge.net/mailarchive/forum.php?thread_id=4142286&forum_id=
33510
http://sourceforge.net/mailarchive/forum.php?thread_id=4197535&forum_id=
33510

What you’ll probably want to do is connect to SEL_UPDATE and modify the
background color there. If you want to make sure that SEL_UPDATE is left
available for use elsewhere, overwrite the connect method so that it
combines your colour changing with whatever is passed for SEL_UPDATE.

def connect(messageType, callableObject=nil, &block)
if messageType == SEL_UPDATE
callableObject = block if not callableObject
super(messageType) { |a,b,c|
callableObject.call (a,b,c)
changeBackgroundColor()
}
else
super(messageType, callableObject, block)
end
end

(above code may be bugridden)

···

-----Original Message-----
From: Martin [mailto:martinankerl@web.de]
Sent: Tuesday, 13 April 2004 7:19 AM
To: ruby-talk ML
Subject: FXRuby: overload FXSlider

Hi all,

I want to create a custom control which changes the
background color of the slider whenever an update happens.
What’s the best way to do this? The control should behave
exactly like FXSilder, so I can not use connect(). And while
I am at it: why doesn’t connect() support multiple message handlers?

regards,
Martin

#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################