05-26-2010 11:54 AM
thanks peter. will have try it out.
RIM should have included all the basic controls like calendar, color picker, file picker, etc.. in the SDK to start with.
08-30-2010 07:32 AM
this is really very nice..![]()
11-01-2010 05:06 AM
thanks peter, this is good one..
just a little bit change when the start day is MONDAY, it think it should be
startAt = 0;
instead of
startAt = -6
switch (workDay) {
case(Calendar.MONDAY): {
startAt = 0;
break;
}
case(Calendar.TUESDAY): {
startAt = -1;
break;
}so when the month start with Monday (just like Nov 2010), the calendar won't show the Tuesday at the left column.
the rest of the code, works just fine.
11-01-2010 07:31 AM
Thanks for that correction.
I think I found this code was very slow, hope you are not finding the same.
11-02-2010 05:04 AM
Yes, it's bit slow.. i'm trying to find another solution... i'll post it here if i find one. (or code one
)
11-02-2010 07:09 AM
The reason I think it is slow is that it adds and deletes fields. One option is to do the adding 'offline' in other words add the Fields to a manager that is NOT connected to a screen, then add the manager to the screen, that way, the layout processing is only done once.
01-05-2011 09:09 PM
Hi Peter,
Very nice calendar implementation. I want to try to get a working version on the Storm. Did you ever figure out why it doesn't work with the Storm? Or do you have any assumptions? When I try to run your application, I receive the following error:
"ArrayIndexOutOfBoundsException"
"Uncaught Exception: Index 1 >= 1"
And stack trace:
Thread [Calendar(188)id=288674816] (Suspended (exception ArrayIndexOutOfBoundsException))
CalendarScreen$1(DateField).prevDateTimeBoundaryS
CalendarScreen$1(DateField).calcLayoutData(int) line: 550
CalendarScreen$1(DateField).calcCachedData() line: 703
CalendarScreen$1(DateField).onFocus(int) line: 2112
VerticalFieldManager(Manager).onFocus(int) line: 3500
TitleStatusManager(Manager).onFocus(int) line: 3500
CalendarScreen(Screen).onFocus(int) line: 3821
CalendarScreen(Screen).onDisplay() line: 3753
CalendarScreen(Screen).callOnUiEngineAttached(boo
UiEngineImpl.addScreen(Screen) line: 1471
UiEngineImpl$UiEngineOldInterfaceAdapter.pushScre
Application(UiApplication).pushScreen(Screen) line: 277
Application.<init>() line: 8
Application.main(String[]) line: 13
Thanks!
05-30-2011 06:01 AM
I get the same error. Which can be the problem?
Thanks,
Albert
05-30-2011 06:51 AM - edited 05-30-2011 06:52 AM
@behrk2 - Sorry missed this.
In OS 4.7 I would use DateTimePicker.
I actually have got this code working in OS 4.7 myself but for OS 4.7 and above push people towards the built in picker.
I can look at trying to fix this if you want, but I think this code is 'dead' for any current OS.
05-30-2011 07:11 AM