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
Uri Sarid - 11/Mar/08 07:16 PM
This should be addressed in the 0.9.5 version that's about to be released, please let us know if it is and we can look again.

Dima Geller - 24/Mar/08 04:19 PM
Hi,

We just released Aptana Studio 1.1.5 and jaxer 0.9.5, which should contain a fix for your issue. Could you please let us know if problem is solved or not

Thank you,
Dima


Tony Issakov - 24/Mar/08 08:03 PM
Quick tests under OSX and Windows show that the callback state is working MUCH more as expected resolving this issue and other minor quirks.

Thanks.