@Dan,
thanks a lot for that, I went round in circles trying to get the pdf file to load using #{ENV['HOME']} but eventually just dragged the file in with out that there and it opens the doc on top of SU, but can I get it to stay on top while I use SU? I want to copy paste bits and bobs straight into ruby console.
john
#
# helpmenu.rb
#
#
# Created by Dan Rathbun on 14/02/2010.
# Copyright (c) 2010 @SCF. No? rights reserved.
#
# helpmenu.rb for PLAT=Mac & OS=OSX
module SU_User
module Menus
helpmenu=UI.menu('Help')
helpmenu.add_separator
# Edit the 'Your TextBook Title' Menu Item Title below
# Edit the pathname to your textbook pdf file below
helpmenu.add_item('TextBook') {
UI.openURL("file;//localhost/Users/johns_iMac/Documents/Learning_rubies/TextBook.pdf")
}
# #{ENV['HOME']} inside a double-quoted string ##### couldn't get #{ENV['HOME']} to work, but just draging the pdf file into the double quotes works
# should return something like; '/Users/John' on the Mac
# For PC, the HOME variable must be changed to USERPROFILE
end # module Menus
end # module SU_User
%(#004000)[So, that just open pdf in preview, but this does what I'm after a modal wd pdf, on a Mac you can work under show_modal
get_dialog = UI;;WebDialog.new
get_dialog.show_modal
(get_dialog.set_url "file;//localhost/Users/johns_iMac/Documents/Learning_rubies/TextBook.pdf")
what I can't figure is how to get the help item (such a good place to put it) to trigger this??]