Page 1 of 1

JavaScript TypeError on IPad

PostPosted: Tue Jan 29, 2013 6:19 pm
by jgarfield
After logging into the mobile client in Safari on an iPad (original), an error happens during the initial sync process, causing no data to load and the actual client pages to not appear.

When you turn on the error console, the following message is displayed
Code: Select all
TypeError : Attempting to configurable attribute of configurable property.


Further attempts to login yield the same results.

After exiting the tab and attempting to reconnect, the mobile client appears to try and auto-login, and a similar error results in the console
Code: Select all
com.google.gwt.event.shared.UmbrellaException: Exception Caught: (TypeError) : Attempting to configurable attribute of configurable property.


When attempting to run the same client on an Android in either Chrome or the stock browser everything works fine.

Support Case https://support.servoy.com/browse/SVY-3853

Re: JavaScript TypeError on IPad

PostPosted: Thu Feb 07, 2013 6:11 pm
by jcompagner
this is fixed but as a warning

if you program then try to reference column names or relations always as:

record.column
or
foundset.relationname

even for the selected record.
try to avoid

if (column == 10)

this is because if column had the name "status" this would cause a collision with window.status property of the browser.
and just "status" in mobile scripting must be a top level property for us to access it.

Because of all this you also have to be careful with the variable names that you give to form or scope/global variables
also there don't use "status" (we now have warnings for that)

because if you would have "status" as a form variable
the only way to get that would be to use the forms prefix:

forms.myform.status

even if you are in myform itself..

Re: JavaScript TypeError on IPad

PostPosted: Thu Feb 07, 2013 7:35 pm
by jgarfield
Thanks!

Regarding the care with coding, I believe this was already a requirement, was it not? Or has this changed something else we should be watching out for?