Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Handling clipboard

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
    Bookmark Topic Watch Topic
  • New Topic