Well, worry no more. Glimmer's got the solution.
Check out this syntax:
shell {
text "SWT"
tab_folder {
tab_item {
text "Tab 1"
label {
text "Hello World!"
}
}
tab_item {
text "Tab 2"
label {
text "Bonjour Univers!"
}
}
}
}
The new tab_item in Glimmer acts as a special widget that feels like a composite by allowing you to lay widgets inside it, but still behaves like a tab item by allowing you to set the tab title text. Give it a spin, and let me know what you think.
Here is the interface produced:
Tab 1
Tab 2
By the way, this feature was implemented in response to a suggestion by Tom Robinson. So, if there are any other features that you would like to see in Glimmer, please share in a comment, an email (andy
5 comments:
Hi Andy,
Glimmer is amazing, however, I have't been able to make it run properly. If installed via gem command, glimmer complains that "on_widget_selected" cannot be handled. If I use the version from the SVN, it fails with "undefined method `setInterface' for #<Java::OrgEclipseSwtWidgets::Text".
I tried both swt 3.3 and 3.4. Could you advise which versions combination works fine?
The gem on RubyForge is a little old, and only works with older versions of the Ruby Facets library. When running with the latest version of Ruby Facets (which is what you get from RubyGem by default,) it gives the on_widget_selected error.
The latest version on the Eclipse SVN repository addresses that, but it is only compatible with JRuby 1.1.3 and older. If you run it with JRuby 1.1.4, it gives the setInterface error you mentioned. I received a fix for that issue from a Glimmer user, and I will be applying it soon, but in the meantime, make sure to run Glimmer with JRuby 1.1.3.
Thanks very much for the explanation. I'm using jruby 1.1.4, but it is fine for me to downgrade. Is there a mailing list which I can subscribe to follow news about Glimmer or your blog is the best news source?
Glad I could help.
While there is a Glimmer news mailing list, I'd say my blog is the most active news resource for Glimmer at the moment. If I end up reporting Glimmer news actively in the mailing list, I'll mention that on my blog.
Nice one Andy! Very nice indeed - glimmer gets better every day. :)
Post a Comment