Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » DateTimeCalender null date
DateTimeCalender null date [message #1014680] Tue, 26 February 2013 09:16 Go to next message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
Hey!

We have a "drop-down" DateTimeCalender implementation in our application. Basically it opens a shell containing a DateTimeCalender plus some more widgets. When closing the shell it applies the values from the calender to a text box. It all works perfect, but in the case when i press ESC to close the shell, this happens:

TypeError: Cannot call method 'getDate' of null
    at [object Object]._onChangeDate (http://127.0.0.1:10080/rwt-resources/rap-client.js:66120:31)
    at [object Object]._dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6476:18)
    at [object Object].dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6406:12)
    at [object Object].createDispatchChangeEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6373:14)
    at [object Object].setDate (eval at <anonymous> (http://127.0.0.1:10080/rwt-resources/rap-client.js:4511:28))
    at [object Object]._onkeypress (http://127.0.0.1:10080/rwt-resources/rap-client.js:62926:20)
    at [object Object]._onKeyPress (http://127.0.0.1:10080/rwt-resources/rap-client.js:66134:22)
    at [object Object]._dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6476:18)
    at [object Object].dispatchEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:6406:12)
    at Object._processKeyEvent (http://127.0.0.1:10080/rwt-resources/rap-client.js:17290:17)


I know it's kind of foggy to you what we do, but nevertheless: ideas? i had a quick look and can verify that dispose() on the script side is called /after/ this call, so nothing that interferes. Also interesting: /sometimes/ it works, but most of the time it crashes, so timing also seems to matter somehow.

i'm thankful for all pointers, and i will happily debug if i know where.
Re: DateTimeCalender null date [message #1014693 is a reply to message #1014680] Tue, 26 February 2013 09:43 Go to previous messageGo to next message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
ok, seems this is the "bad" (?) code in rwt.widgets.base.Calender:

         case "Escape":
            if (this.getDate() != null) {
              this.setDate(null);
              evt.preventDefault();
              evt.stopPropagation();
              return true;
            }


the this.setDate(null) is the one that causes the exception. i debugged it, and it is obvious what happens. the DateTimeCalendar has a listener _onChangeDate registered which cannot handle null as it directly dereferences the value, and the ESC handler sets to null always -> Boom Smile ideas?
Re: DateTimeCalender null date [message #1014708 is a reply to message #1014693] Tue, 26 February 2013 10:16 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Markup,
please open a bugzilla and we will handle it.
Thanks,
Ivan

On 2/26/2013 11:43 AM, Markus Duft wrote:
> ok, seems this is the "bad" (?) code in rwt.widgets.base.Calender:
>
>
> case "Escape":
> if (this.getDate() != null) {
> this.setDate(null);
> evt.preventDefault();
> evt.stopPropagation();
> return true;
> }
>
>
> the this.setDate(null) is the one that causes the exception. i
> debugged it, and it is obvious what happens. the DateTimeCalendar has
> a listener _onChangeDate registered which cannot handle null as it
> directly dereferences the value, and the ESC handler sets to null
> always -> Boom :) ideas?

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: DateTimeCalender null date [message #1014764 is a reply to message #1014708] Tue, 26 February 2013 12:22 Go to previous messageGo to next message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=401780
Re: DateTimeCalender null date [message #1014884 is a reply to message #1014764] Tue, 26 February 2013 16:39 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Thanks for the report. Just fixed it in Git master.
Best,
Ivan

On 2/26/2013 2:22 PM, Markus Duft wrote:
> done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=401780

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: DateTimeCalender null date [message #1015128 is a reply to message #1014884] Wed, 27 February 2013 14:33 Go to previous message
Markus Duft is currently offline Markus DuftFriend
Messages: 148
Registered: February 2013
Senior Member
thanks a lot, will test it with 2.1M1 then Wink
Previous Topic:RAP 2.0: Executing ActionFactory.QUIT leads to client exception
Next Topic:Persist workbench for each user session in RAP
Goto Forum:
  


Current Time: Thu Oct 21 17:39:28 GMT 2021

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

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

Back to the top