[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: strange behaviour of Spinner control

A quick follow-up: I cannot use a trick suggested elsewhere, to take away focus from the Spinner before reading the value. The reason is another strange problem which I also found for Text controls: when copying values *from* the Spinner (or Text), it sends a ModifyEvent even though nothing was modified. Therefore, I need the "modified" value immediately to check if there was a real modification, and I don't want to take away focus while the user is editing the value of the Spinner.

Martin Geisse wrote:
Hello everybody,

I am trying to use a Spinner control in my application, and I'm encountering a strange problem: When I change the value by entering something into the text field of the Spinner, it sends ModifyEvents, but getSelection() still returns the old (unmodified) value. Only when I click on some other control, the new value is returned (this is probably as soon as the Spinner loses focus). Does anyone know this problem? In case it is platform-specific, I'm using Mac OSX.

Thanks in advance,
Martin Geisse