In Shoes, whye does ask_open_file run a shoes app?

If I have a bit of code inside Shoes.app block, like this

keypress do |k|
case k

when :alt_o
@contents = File.read(ask_open_file)
end
end

it runs the file (if it is a shoes app). Otherwise, it seems to do
nothing and returns nil.

If you run it outside of the Shoes.app block, pas in the manual
example] it works ok.

Does Shoes.app set the context for ask_open_file to be able to run new
apps? How can I change this?

Thanks,
Ed

Ed Howland


http://twitter.com/ed_howland

Hey Ed-

This is… very strange. And certainly a bug. What platform are you
on, and are you using Policeman or Rasins? I couldn’t recreate this on
OSX Policeman. Using these two scripts: http://gist.github.com/556579
, when I run test1, and open test2, the alert returns the text of
test2.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs