Am 03.05.2012 05:42 schrieb "jena peoples" <jena.p...@gmail.com>:
>
> Did anyone notice that the URL/URI class definitions in /Library/Ruby/Gems/1.8/gems/origami-1.2.3/lib/origami
>
> are just that? What is this URI deal?
>
> When I use URL in the command I get an error:
>
> >>> Action::URL(www.google.com)
> NameError: undefined local variable or method `www' for main:Object
> from (irb):2
> >>>
>
You forgot the quotation marks around the string 'www.Google.com'
>
> Also, I looked at the class definition so I tried to use URI:
>
> >>> Action::URI(www.google.com)
> NameError: undefined local variable or method `www' for main:Object
> from (irb):2
> >>>
>
Ditto
Am 03.05.2012 19:51 schrieb "jena peoples" <jena.p...@gmail.com>:
>
> Not sure why I didn't put them in here when I wrote the email but I have tried both with quotations and get the same error.
It's a completely different error now, if you look at it a bit closer. ;-)
>
>
>
>
> >>> Action::URI("www.google.com")
> NoMethodError: undefined method `URI' for Origami::Action:Class
> from (irb):2
>
> >>> Action::URL.new("www.google.com")
> <<
> /F (www.google.com)
> >>
> >>> pdf.onDocumentOpen Action::URL("www.google.com")
> NoMethodError: undefined method `URL' for Origami::Action:Class
> from (irb):3
> >>> pdf.onDocumentOpen Action::URI("www.google.com")
> NoMethodError: undefined method `URI' for Origami::Action:Class
> from (irb):4
> >>>
>
You need to call the constructor for the action object to be created, so don't forget the ".new" in the end
Action::URI.new("www.Google.com")
Btw here you can find an example for your problem: http://esec-lab.sogeti.com/pages/Origami
