views:

227

answers:

4

I am unable to get an XMLHttpRequest object to work correctly in a Dashboard widget I am writing. I've isolated it to a trivial example not working in the global scope of the main.js file:

    xhr = new XMLHttpRequest;
    xhr.open( 'GET', "http://google.com", false );
    xhr.send('');

When the last line is executed I get the error "ABORT_ERR: XMLHttpRequest Exception 102" (this is in the Dashcode debugger).

Does anyone have any idea what could be wrong here?

+1  A: 

OK, I've found it (three hours): you need to add the following key to the Info.plist file:

<key>AllowNetworkAccess</key>
<true/>
Peter Zion
A: 

You need to select "Allow Network Access" in the "Widget Attributes" pane.

David Beck
A: 

I've got the same trouble unresolved even after AllowNetworkAccess were added to my info.plist. I've tried to change this key to AllowFullAccess, but nothing changed. After system reboot it worked fine o_O

4pcbr
A: 

The steps to take are: 1. From the menu, choose "Dashcode > Preferences... and click on the Destinations tab. 2. Below the left column, click on the plus sign to create a new destination. 3. For an external website, choose FTP in the Type drop down. Fill out the Server, Path, User name and Password. Close the Preferences pane. 4. Back in Dashcode, click on the Widget Attributes icon in the left column. 5. Check the boxes of Allow network Access and Allow External File Access in the main column.

You should be able to run the widget without the 102 Exception error (if you are online)

Leonardo Borsten