[fxruby-users] clipboard example?

Jason Wang randomtalk at gmail.com
Sun Apr 10 16:39:01 EDT 2005

On Apr 10, 2005 4:31 PM, Jason Wang <randomtalk at gmail.com> wrote:
> hi, i'm trying out the different examples included in the doc,
> however, i'm stuck on one example, the clip board tutorial.. on the
> second page, u have one code snippet:
> # User clicks Copy
> copyButton.connect(SEL_COMMAND) do
>   customer = customerList.getItemData(customerList.currentItem)
>   types = [ FXWindow.stringType ]
>   if acquireClipboard(types)
>     @clippedCustomer = customer
>   end
> end
> where do u put that in the over all code? i tried everywhere and it
> doesn't work for some reason :| thanks alot :D
> Jason

well, i tried to put it right under the creation of copy button.. but
when i run it, and click copy button, it returns the following error:
clipboard.rb:19:in `initialize': undefined local variable or method
`customerList' for #<ClipMainWindow:0xb73e44f0> (NameError)
        from clipboard.rb:18:in `call'
        from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.5/lib/fox12/responder2.rb:57:in
        from clipboard.rb:48:in `run'
        from clipboard.rb:48
        from clipboard.rb:45:in `initialize'
        from clipboard.rb:45:in `new'
        from clipboard.rb:45

no idea wat's wrong :|
www.programer.name - my own personal blog : )

More information about the fxruby-users mailing list