Assuming that you're using the "button" player and the "text box" with limelight 0.5.*, you can reach into the native Swing components like so:
button_prop.button.disable
text_box_prop.text_box.disable
Micah
I'm doing:
def mouse_clicked(event)
... bunch of stuff
self.button.disable
end
When I inspect self.button it looks correct to me.
#<Java::LimelightUiModelInputs::Button:0x4574aee5>
Is there anything else I need to do to get the button to update and disconnect it from future events?
BTW, this is against the last gem release on JRuby 1.6.3.
Chuck
scene.refresh
Micah
It *does* grey out like it should be disabled, but I can still click it. Clicking it also delivers mouse_clicked events.
Also, the text boxes do not display as disabled until I click on them. When I do, the box repaints.
This is on OSX 10.6.8, latest Apple JVM.
cr
On Oct 6, 2011, at 3:51 PM, Chuck Remes wrote:
Please keep in mind that limelight is still beta. Disabling props is not fleshed out at all in limelight. It should work but you might find some quirks. You'll probably want to check if the button is disabled in the mouse_clicked action to behave properly.
Micah
I searched through some of the examples and saw a call to "screen.update" where screen is a scene. That worked. The Scene docs and Prop docs do not document this method.
cr
Micah
As you suggest, I'll do my own state tracking in the event handlers and ignore double clicks out that way.
Any particular plans for future development of Limelight? The github repository has been rather quiet for about a year...
cr
The newest efforts also involve removing all traces of Swing from the framework. So widgets like buttons and text boxes are managed and drawn by limelight.
Although there was a big gap in effort on Limelight.. it has been renewed in the last month. So much to do….
Micah