Hello,
I'm trying to use dialog.rb to open custom made dialogs (Nibs) in Ruby but so far have not succeeded.
Reading the code, it looks like this should work:
Dialog.new(:nib => "path/to/nib")
but I get an error.
I'm using shell code now, but would love to use the nicer Ruby syntax ;)
Any advice?
Thanks in advance
Hi Ale, On Apr 3, 2007, at 3:58 AM, Ale Muñoz wrote:
Hello,
I'm trying to use dialog.rb to open custom made dialogs (Nibs) in Ruby but so far have not succeeded.
Reading the code, it looks like this should work:
Dialog.new(:nib => "path/to/nib")
but I get an error.
I'm using shell code now, but would love to use the nicer Ruby syntax ;)
Any advice?
You haven't really given us much to go on with here. How about a reproducible example, the nib you are working with and the error you are getting?
Thanks in advance
-- Ale Muñoz http://sofanaranja.com http://bomberstudios.com
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On 4/3/07, Charilaos Skiadas skiadas@hanover.edu wrote:
You haven't really given us much to go on with here. How about a reproducible example, the nib you are working with and the error you are getting?
I should stop asking questions when I'm asleep :)
Here's some code that works, sorry for asking without proper research and tinkering:
support = ENV['TM_SUPPORT_PATH']
require "#{support}/lib/dialog"
my_dialog = TextMate::Dialog.new( :nib => "/Users/ale/Desktop/Test.nib/", :parameters => {} )
What I was doing wrong was calling Dialog.new instead of TextMate::Dialog.new
So far, it seems to work (haven't tested with the real Nib file, but I don't see why it wouldn't work...)
Thanks for making me check again (I found the error while writing an example for this email :)
Followup:
anybody playing with Ruby and custom Nibs should *really* take a look at the Subversion bundle.
svn_revision_chooser.rb has a really nice example of a custom dialog that does some things beyond the basics.
Chris Thomas, you rule :)