Hi,
I am having the following issue (happens only in Safari, in other browsers: IE, Firefox, Chrome works fine):
When new Date object is created in JSNI GWT method, it does not have extended methods in its prototype (for ex., toShortDate() method).
This causes multiple issues later (ex, when this object is used in DateItem element).
I also tried returning
new $wnd.Date();
new $wnd.isc.Date();
with the same result - it always creates a Date object with base prototype methods.
(As a workaround, I have to create Date object outside of the JSNI scope - move part of the JSNI code to a separate *.js file, but it is just ridiculous).
the same issue happens to Array and I guess to other "system" objects as well.
Any ideas what could be wrong? Is it a known issue? Is there a way to "fix" it?
SmartClient: Version SC_SNAPSHOT-2010-12-15/PowerEdition Development Only (2010-12-15)
Safari: 5.0.4
GWT: 2.1.0
I am having the following issue (happens only in Safari, in other browsers: IE, Firefox, Chrome works fine):
When new Date object is created in JSNI GWT method, it does not have extended methods in its prototype (for ex., toShortDate() method).
Code:
// This is just an example, not real code public static native Object newDate() /*-{ return new Date(); }-*/;
I also tried returning
new $wnd.Date();
new $wnd.isc.Date();
with the same result - it always creates a Date object with base prototype methods.
(As a workaround, I have to create Date object outside of the JSNI scope - move part of the JSNI code to a separate *.js file, but it is just ridiculous).
the same issue happens to Array and I guess to other "system" objects as well.
Any ideas what could be wrong? Is it a known issue? Is there a way to "fix" it?
SmartClient: Version SC_SNAPSHOT-2010-12-15/PowerEdition Development Only (2010-12-15)
Safari: 5.0.4
GWT: 2.1.0
Comment