12 34 <rubyforum / web.knobby.ws> wrote:

> I've written a relatively simple script which has about five
> files/directories that need to be selected and several other options.
> They are currently manually set in the script, i.e., as variables. I'd
> like to have a GUI and here is what I think are my requirements:
> 
> OS X-prefer native, but web would be OK since I don't need a fancy
> interface
> Select files (show the last selection used as the default, even if used
> weeks later)
> Select folders (show the last selection used as the default, even if
> used weeks later)
> Drop down selection for some options
> Check boxes for other options
> A confirmation window listing the options selected with "a go back" or
> "go ahead choice"
> Run the script
> Progress bar
> Report when finished.
> 
> I'm not a programmer. Not obvious to me how to implement this in XCode.
> My XCode experience is pretty much limited to a simple AppleScript app
> about two years ago. I am missing that when creating an AppleScript app
> that after creating the UI (in IB), XCode creates such things "on awake
> from nib" and "on clicked" which got me over one big hump. I'm looking
> for something similar for Ruby--RubyCocoa doesn't seem to do this

You're wrong about that. RubyCocoa is Cocoa; indeed, you get far *more*
events / notifications than you do with AppleScript Studio.

If I were doing what you are doing, though I would just write a native
Objective-C Cocoa app with the Ruby script built in, calling the Ruby
script thru NSTask at the appropriate moment. You could in fact do the
same thing with AppleScript Studio, just as in the example in my book
where AppleScript suddenly turns to Perl to do some heavy lifting.

m.

-- 
matt neuburg, phd = matt / tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com