Wow. Quite the storm! Oh well.
I guess I should clarify a bit.
I _am_ using monkeybars (and therefore NetBeans) to create my GUI. It's
pretty good. My second choice would be Glade(Is there a way for Glade 3
to be used?). It's still a little hit or miss though in NetBeans. I
put some controls down and the rest _move_ ... even after I put a panel
in. Of course it could be that I'm an idiot and I don't know how to
make a GUI with it. The more I use it the more I'll get used to
those quirks.
By default in Netbeans, all panels, frames, dialogs, and other containers are set to "Free Design", which is the GroupLayout. GroupLayout is very quirky, and takes some time to learn. For forms of any complexity, you may want to use a different layout (right click on the container in question, and you can set the new layout). If you're looking for something akin to Visual Studio's absolute layout, you can set the layout to null (Null Layout). This isn't cross-platform friendly, and the form won't move/stretch when the user goes to resize it, but at least it'll get you going. You can also isolate some components by putting them in another panel, and different panels, even if nested, can have their own layout. Netbeans also has a handy feature where you can select one or more components, and right click, and select "Enclose In..." and select a JPanel.
GroupLayout does some really cool things, but sometimes it's like working with a mule. It's very tricky.
I also don't care if the GUI itself is written in Ruby. The GUI could
be written in LOGO for all I care. I just want to write an app, click a
button and have some Ruby code execute behind it.
Q: If I write a swing GUI in NetBeans can I then copy that somehow to a
ruby project(using Monkeybars somehow)? Or do I have to start from
scratch every time. I’m also not entirely sure how to create a project
with _two_ or more forms.
We've got a whole more than two forms going in some of our projects:
http://www.happycamperstudios.com/monkeybars/charlotte%20interface.png
I'm not exactly sure what's going on here, but I'd gather that you created a Ruby project. Unfortunately, Netbeans doesn't support a true JRuby project, where you can freely dance between JRuby and Java. The next best thing is to make your project a Java project. Here you can have Ruby files but also Java files and forms. You'll need a Main.java, which kicks off JRuby, as well as the JRuby complete jar. We've got a tutorial on setting a lot of this stuff up in our tutorials section: http://monkeybars.rubyforge.org/tutorials.html
My GUI first app is either going to be a pared down media library/grep
tool for people who like to download (open source of course!) shows and
ask themselves, “Do I download that show? Or do I have it already?” I'm
using JRuby, Monkeybars, NetBeans and Postgres. I'm not too sure about
Activerecord yet and I find SQL rather trivial so I'm accessing the db
directly.
We have a couple of internal Monkeybars project that need their own local database. We used Derby + ActiveRecord for this. While I didn't work a ton on these projects myself, I know we'd be more than happy to share what we did to get it working. Derby is SQLite in Java, so it's just a file that you can load as your database, and there's no need for anyone to set up a full on database server on their machine.
···
On Sep 10, 2008, at 7:02 AM, Jason Cameron wrote:
My first Ruby script (which made me fall in love with Ruby) transcoded
all of the avi files in a directory to 320x200 in _1_ line of code.
I'm just trying to have fun.
M
=:)
--
Posted via http://www.ruby-forum.com/\.