• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Handling clipboard

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to get familiar with the system clipboard by building a "clipboard listener" what I want to do is listen to the clipboard and when it changed print the new value that is put into the clipboard[if it is text].

This is what I tried:




Now 2 strange things happen:
1. lostOwnership never runs if I run the code in Mac OS X [it does if I run it in Windows 7].
2. From some reason I get an exception while I'm trying to print what has changed within the clipboard, in lostOwnership.

Please be kind with me=) I'm not professional programmer. [I'm a student]
 
Naftaly Avadiaev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, the following code works in Windows however I still don't understand what I did wrong before... [Would like to hear your comments]
However this still don't work under Mac OS X, ideas?

 
Naftaly Avadiaev
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still need assistance with this one, anyone?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic