RubyCocoa question

E

Ezra Zygmuntowicz

Hey list-

Does anyone have an example of using rubycocoa to create a simple
app that can display a file open dialog or sheet and then return a
stirng of the file path to ruby so I can do some text processing on
it? I would really appreciate some pointers. I couldn't find anything
that deals with files in the sample programs.

Thanks-

-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
(e-mail address removed)
 
L

Logan Capaldo

--Apple-Mail-1--720576998
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed

Hey list-

Does anyone have an example of using rubycocoa to create a simple
app that can display a file open dialog or sheet and then return a
stirng of the file path to ruby so I can do some text processing on
it? I would really appreciate some pointers. I couldn't find
anything that deals with files in the sample programs.

Thanks-

-Ezra Zygmuntowicz
Yakima Herald-Republic



See the NSOpenPanel documentation. I haven't used RubyCocoa much but
I would imagine it would look like

require 'osx/cocoa'

opanel = OSX::NSOpenPanel.openPanel
opanel.runModalForDirectory_file_types_(nil, nil, nil)
results = opanel.URLs


--Apple-Mail-1--720576998--
 
E

Ezra Zygmuntowicz

Note that that particular demo (a GUI to the tar comamnd) is
missing one step of configuration.
You need to connect the NSTableView to the Controller Instance
using the
dataSource outlet from the NSTableView.
J-P


Thanks for the help to everyone who replied. I was able to get up
and running with the app I needed to create. RubyCocoa is very cool.


I have one more question about rubycocoa. Is there any way to bundle
a ruby interpreter inside the .app bundle so my app can run on
another OS X machine without ruby installer? Is there a built in way
to do this with rubycocoa? Or would rubyscript2exe work to do this
somehow?

Thanks for any feedback-

Cheers-

-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
(e-mail address removed)
 
T

Tanner Burson

------=_Part_11041_26709623.1132345249459
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thanks for the help to everyone who replied. I was able to get up
and running with the app I needed to create. RubyCocoa is very cool.


I have one more question about rubycocoa. Is there any way to bundle
a ruby interpreter inside the .app bundle so my app can run on
another OS X machine without ruby installer? Is there a built in way
to do this with rubycocoa? Or would rubyscript2exe work to do this
somehow?

Thanks for any feedback-


This is just wild speculation but you could build a prefix'd install of rub=
y
and rubycocoa on your machine, and put it into your app bundle. Then write =
a
little shell script that launches ruby and your script and use that as what
the bundle calls to start your app. Again, I haven't actually TRIED this
approach, but in theory it should work :)

Cheers-
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
(e-mail address removed)


--
=3D=3D=3DTanner Burson=3D=3D=3D
(e-mail address removed)
http://tannerburson.com <---Might even work one day...

------=_Part_11041_26709623.1132345249459--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Double posts? 7
RubyConf 05 Audio and Video files resurrected! 1
Re RubyConf Presentation Audio 2
rubyforge down? 3
Regex help 5
Qt 4.0 ruby bindings? 3
RubyConf Presentations! 6
Re RubyConf for Stragglers 2

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top