Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » CDateTime bugs and hints
CDateTime bugs and hints [message #583869] Fri, 10 August 2007 12:50
Eclipse User
Originally posted by: kthiele.pi-ag.com

Hallo,

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
date>' appear.

- 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
date
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.

// TimePicker
cdtTime = new CDateTime(group, CDT.TIME_SHORT | ...
cdtTime.setSelection(java.sql.Date.valueOf("1990-01-01")); // to get
"00:00" as default
// DatePicker
cdtDate = new CDateTime(group, CDT.BORDER | CDT.DROP_DOWN ...
cdtDate.setSelection(null); // to get NOT todays date! but then
"<choose.." :-(
[...]
cdtTime.addModifyListener(this);
cdtDate.addModifyListener(this);

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
ModifyEvents!!!

Thanks for reading!

kindly regards
-klaus


--
Klaus Thiele - Personal & Informatik AG
mailto:kthiele@pi-ag.com

"There's got to be more to life than compile-and-go."
Previous Topic:test
Next Topic:SWT Ribbon
Goto Forum:
  


Current Time: Thu Oct 02 10:46:28 GMT 2014

Powered by FUDForum. Page generated in 0.01656 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software