|CDateTime bugs and hints [message #583869]
||Fri, 10 August 2007 12:50
Originally posted by: kthiele.pi-ag.com|
i've using SWTPlus for a long time in my application and yesterday i had to
implement time-fields in some dialogs. while looking for 'time pickers' i
discovered the CDateTime control.
But i detect some small errors. in short:
new CDateTime(mygroup, CDT.TIME_SHORT | CDT.CLOCK_24_HOUR |...
- When using CLOCK_24_HOUR (the default here in germany), the nice analog
clock is scaled from 1-24! looks funny!
- some texts are not internationalized "<choose date>" and "Today is
Freitag, the 10th" ;-)
- not usable for me is that the combobox ist setup with the default date or
time. i would prefer that nothing ist selected and *no* text '<choose
- ok, i can initialize with "myfield.setSelection(null);", but then there
ist this the text '<choose....' which dont fit in my small 'hh:mm' fields!
- a TimePicker has to initialized with
cdtLoginFrom.setSelection(java.sql.Date.valueOf("1990-01-01 ")); // any
to get a "00:00:00" time.
- the biggest problem for me is following: i have forms where all fields
have listeners to maintain a dirtyFlag to detect changes.
cdtTime = new CDateTime(group, CDT.TIME_SHORT | ...
cdtTime.setSelection(java.sql.Date.valueOf("1990-01-01")); // to get
"00:00" as default
cdtDate = new CDateTime(group, CDT.BORDER | CDT.DROP_DOWN ...
cdtDate.setSelection(null); // to get NOT todays date! but then
I set the default values before the listeners where added BUT nevertheless i
get two! ModifyEvents for each CDateTime! I think, it is not common
behavior that the set*Methods generate events (and that they are queued
until a listener has added). So my freshley instanciated forms get
Thanks for reading!
Klaus Thiele - Personal & Informatik AG
"There's got to be more to life than compile-and-go."
Powered by FUDForum
. Page generated in 0.01938 seconds