When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to load -- /Users/barbara/Library/Application Support/TextMate/Support/lib/dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
TIA for any advice, Barbara
On Aug 12, 2007, at 9:18 AM, logista wrote:
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to load --
/Users/barbara/Library/Application Support/TextMate/Support/lib/dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
Yes, the book is a little behind the times on this point. Man software changes fast!
We've moved this library in TextMate's support libraries and it has undergone some changes. The first step to catching up is to switch your require to:
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
Your code may just work with as little as that. If it doesn't, show the dialog part of the code and we will help you fix that up.
James Edward Gray II
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 9:18 AM, logista wrote:
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to load --
/Users/barbara/Library/Application Support/TextMate/Support/lib/dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
Yes, the book is a little behind the times on this point. Man software changes fast!
We've moved this library in TextMate's support libraries and it has undergone some changes. The first step to catching up is to switch your require to:
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
Your code may just work with as little as that. If it doesn't, show the dialog part of the code and we will help you fix that up.
James Edward Gray II
Ok. Now I get an error
/tmp/temp_textmate.eZSUIK:5: undefined local variable or method `dialog' for main:Object (NameError)
Here's what my dialog box is asking for (takes a selection and indents both ends):
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
rtMargin = dialog.request_string( :prompt => "What is the (absolute) right margin?", :button1 => "OK").to_i indentSize = dialog.request_string( :prompt => "How much left margin indent?", :button1 => "OK").to_i
When I tried the change on my second command I got a slightly different error:
/tmp/temp_textmate.7qLRFt:11: uninitialized constant Dialog (NameError)
And the dialog command (takes a document and changes some numbers):
require "#{ENV["TM_SUPPORT_PATH"]}/lib/ui"
myFirstPage = Dialog.request_string( :prompt => "What is the first page number?", :button1 => "OK").to_i
Thanks for your help! Barbara
On Aug 12, 2007, at 2:21 PM, logista wrote:
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 9:18 AM, logista wrote:
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to
load -- /Users/barbara/Library/Application Support/TextMate/Support/lib/ dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
Yes, the book is a little behind the times on this point. Man software changes fast!
We've moved this library in TextMate's support libraries and it has undergone some changes. The first step to catching up is to switch your require to:
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
Your code may just work with as little as that. If it doesn't, show the dialog part of the code and we will help you fix that up.
James Edward Gray II
Ok. Now I get an error
/tmp/temp_textmate.eZSUIK:5: undefined local variable or method
`dialog' for main:Object (NameError)
Try adding this line after your require and before you build dialogs:
include TextMate::UI
Does that fix it?
James Edward Gray II
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 2:21 PM, logista wrote:
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 9:18 AM, logista wrote:
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to
load -- /Users/barbara/Library/Application Support/TextMate/Support/lib/ dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
Yes, the book is a little behind the times on this point. Man software changes fast!
We've moved this library in TextMate's support libraries and it has undergone some changes. The first step to catching up is to switch your require to:
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
Your code may just work with as little as that. If it doesn't, show the dialog part of the code and we will help you fix that up.
James Edward Gray II
Ok. Now I get an error
/tmp/temp_textmate.eZSUIK:5: undefined local variable or method
`dialog' for main:Object (NameError)
Try adding this line after your require and before you build dialogs:
include TextMate::UI
Does that fix it?
No, I get the same errors on both.
Barbara
On Aug 12, 2007, at 7:54 PM, logista wrote:
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 2:21 PM, logista wrote:
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 9:18 AM, logista wrote:
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to
load -- /Users/barbara/Library/Application Support/TextMate/Support/lib/ dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
Yes, the book is a little behind the times on this point. Man software changes fast!
We've moved this library in TextMate's support libraries and it has undergone some changes. The first step to catching up is to switch your require to:
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
Your code may just work with as little as that. If it doesn't, show the dialog part of the code and we will help you fix that up.
James Edward Gray II
Ok. Now I get an error
/tmp/temp_textmate.eZSUIK:5: undefined local variable or method
`dialog' for main:Object (NameError)
Try adding this line after your require and before you build dialogs:
include TextMate::UI
Does that fix it?
No, I get the same errors on both.
My bad. I should have looked a little better at how that module is built. This code works for me:
#!/usr/bin/env ruby
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
r_margin = TextMate::UI.request_string( :prompt => "What is the (absolute) right margin?", :button1 => "OK" ).to_i indent_size = TextMate::UI.request_string( :prompt => "How much left margin indent?", :button1 => "OK" ).to_i
__END__
James Edward Gray II
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 7:54 PM, logista wrote:
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 2:21 PM, logista wrote:
On 8/12/07, James Edward Gray II james@grayproductions.net wrote:
On Aug 12, 2007, at 9:18 AM, logista wrote:
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to
load -- /Users/barbara/Library/Application Support/TextMate/Support/lib/ dialog (LoadError) from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book for the dialog box, and it worked until this last update to Version 1.5.6 (1414)
How can I fix this, please?
Yes, the book is a little behind the times on this point. Man software changes fast!
We've moved this library in TextMate's support libraries and it has undergone some changes. The first step to catching up is to switch your require to:
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
Your code may just work with as little as that. If it doesn't, show the dialog part of the code and we will help you fix that up.
James Edward Gray II
Ok. Now I get an error
/tmp/temp_textmate.eZSUIK:5: undefined local variable or method
`dialog' for main:Object (NameError)
Try adding this line after your require and before you build dialogs:
include TextMate::UI
Does that fix it?
No, I get the same errors on both.
My bad. I should have looked a little better at how that module is built. This code works for me:
#!/usr/bin/env ruby
require "#{ENV['TM_SUPPORT_PATH']}/lib/ui"
r_margin = TextMate::UI.request_string( :prompt => "What is the (absolute) right margin?", :button1 => "OK" ).to_i indent_size = TextMate::UI.request_string( :prompt => "How much left margin indent?", :button1 => "OK" ).to_i
__END__
James Edward Gray II
YAY! That's done it. Thanks so much for your help :)