products forums blog support careers about
  History | Log In     View a printable version of the current page.  
PRO USERS, to ensure 'PRIORITY SUPPORT' make sure that your ASAP account is "tagged" when you file the request. Click here for instructions on how to tag your account.
Issue Details (XML | Word | Printable)

Key: JXR-109
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Unprioritized Unprioritized
Assignee: Davey Waterson
Reporter: Tony Issakov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Aptana Jaxer

In callback state, externally loaded functions don't have correct global access

Created: 05/Mar/08 08:01 PM   Updated: 24/Mar/08 08:12 PM
Component/s: Callbacks
Affects Version/s: 0.9.4
Fix Version/s: 0.9.5

File Attachments: 1. File testFunc.js (0.1 kb)
2. HTML File testFunc_TestCase.html (1 kb)


Impact on Workflow: Major
Studio Install Type: Standalone
Operating System: Mac OS X, Windows XP
Participants: Davey Waterson, Dima Geller, Tony Issakov and Uri Sarid


 Description  « Hide
I'm looking at getting the dojo toolkit working in Jaxers callback state in a similar way to the JQuery example. I can make things work correctly if I reload dojo with every "oncallback" but i was looking to make it more efficient with the 'define once' approach.

What I'm finding is that when you load a file, the functions defined in that file are present for that current callback and the global environment is correct. Following callbacks we use the "if" statement to check if the object is present in the global state and if it is we don't reload the file. But it seems the global environment is not quite right as if inside one of the loaded functions we call to a global variable, it is never found.

Please see the example case.

clicking reload1 the first time will load the testFunc.js file and run the callback correctly. Clicking it again fails as we don't reload the file and the global state is not right.

restarting the server to clear out the page state..

clicking reload2, the first time and all following times work correctly.

the only difference in the functions is function 2 uses 'this' to internally reference while function 1 calls itself.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Change by Ingo Muschenetz - 07/Mar/08 01:20 PM
Field Original Value New Value
Status Open [ 1 ] Reviewed [ 10000 ]

Change by Ingo Muschenetz - 07/Mar/08 01:20 PM
Fix Version/s 0.9.5 [ 10075 ]

Change by Uri Sarid - 11/Mar/08 07:15 PM
Status Reviewed [ 10000 ] Awaiting User Response [ 10001 ]

Change by Uri Sarid - 11/Mar/08 07:16 PM
Assignee Uri Sarid [ uri ] Davey Waterson [ davey ]

Change by Dima Geller - 18/Mar/08 01:09 PM
Status Awaiting User Response [ 10001 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]

Change by Dima Geller - 24/Mar/08 04:19 PM
Status Resolved [ 5 ] Awaiting User Response [ 10001 ]

Change by Dima Geller - 24/Mar/08 08:12 PM
Status Awaiting User Response [ 10001 ] Closed [ 6 ]

Change by Ingo Muschenetz - 27/May/08 05:37 PM
Workflow External-Open [ 13164 ] External-Open v2 [ 14808 ]