foo_ui?

27 views
Skip to first unread message

F. Timur Senguen

unread,
May 17, 2013, 5:03:30 PM5/17/13
to monkeyb...@googlegroups.com
Hi,

it seems like the newest version of monkeybars has an extra component, besides foo_controller, foo_model, and foo_view. I don't know how foo_ui works, but it seems like foo_view points to it (with the set_java_class) and changing that to the typical JForm class created makes the app not work.

Any pointers as to how to use this new-ish framework? Will you update the tutorial to include this change?

James Britt

unread,
May 17, 2013, 6:54:51 PM5/17/13
to monkeyb...@googlegroups.com
"ui" files can be used in place of compiled Swing form classes.

I've been using the Swingset-ng library for simple GUI things; swingset
is a small wrapper around the MiG layout manager and a few Swing form
elements.

Some recent changes in JRuby made a few things stop working (something
to do with failing to locate the correct item when subclassing).


What I have been aiming for is a way to generate basic GUI code without
having to include Java files or compiled class files for the Swing stuff.

All that Java/Swing code can still be used, though.

The difference is that if you are using a compiled Java class for the UI
then in your view file you use:

set_java_class "NameOfUiClass"


That's been the more or less standard way people use Monkeybars.


If, instead, you want to use a Ruby file you pass a class constant:


set_java_class NameOfUiClass

Just make sure that class can be found in a file that's already been
required.

I've been really slack in updating docs. Mostly I find myself making
changes to code either to adjust something to work better for me, or to
fix a bug.


I've started working on some screencasts for Rawr, with the idea of
moving from very simple programs to more complex GUI apps, so as that
progresses there will be more docs.


I should see about at least adding another example to Monkeybars to
example basic usage for using a Ruby file as the GUI class.


Hope this helps some.


James
--

jamesbritt.com - Live curious
justthebestparts.com - Feed your head
neurogami.com - Hack your world
Reply all
Reply to author
Forward
0 new messages