Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development
Goto page 1, 2  Next

Debugging in Safari

Author Message
Walker



Joined: 27 Mar 2005
Posts: 44
Location: Netherlands

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Thanx. Getting there, I managed to crash the SlimServer and Safari 2.0 several times.

I spend a lot of time with trial & error. First Safari wasn't able to process the XML of the SlimServer. This was caused by a namespace definition in the XML. As far as I can tell, Safari 2.0 does not handle this correctly. So if you are working on a Gadget with XMLHttpRequest, be careful with namespaces. Hope to see an update of Tiger incl. Safari soon. With the reqest abort method I have been able to kill Safari. Using the slider input element (for volume and position) was another big problem, since it fires a LOT of events.
View user's profile Send private message Visit poster's website Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Walker, you did it then!
Just seen your gadget on the front page. Looking good
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
isnane
Guest





Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

useful thread
Widgets
Walker



Joined: 27 Mar 2005
Posts: 44
Location: Netherlands

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Thanx for the advice.

The Safari JS Console or the console log turn out to be less useful than the one in Mozilla. At the moment I have the gadget doing most things in Mozilla, while Safari just gives me a Null value undefined error message with out any further information like the line number.
View user's profile Send private message Visit poster's website Widgets
dev_nut



Joined: 27 Mar 2005
Posts: 40
Location: UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Excellent. Thankyou so much. I remember seeing about this ages ago, but must have forgot

It's also available in TinkerTool as an option (does the same thing as the terminal command)
View user's profile Send private message Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Try to enter the following in the terminal and you will get access to the Debug menu of Safari:
defaults write com.apple.Safari IncludeDebugMenu 1
I hope it is what you were looking for...


Excellent. Thankyou so much. I remember seeing about this ages ago, but must have forgot.

View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
Gremlins



Joined: 27 Mar 2005
Posts: 4

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote


Does Safari know a Script Debug Mode like the JavaScript Console in Mozilla? Since the Gadgets are using a lot of scripts, this would be very useful.


Try to enter the following in the terminal and you will get access to the Debug menu of Safari:
defaults write com.apple.Safari IncludeDebugMenu 1
I hope it is what you were looking for...
View user's profile Send private message Widgets
Walker



Joined: 27 Mar 2005
Posts: 44
Location: Netherlands

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Just a quick note: sending data, receiving and interpreting XML works. I will share the results with all as soon as it is ready for a beta-release.
View user's profile Send private message Visit poster's website Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Nah, I don't have one. I'll be using my AirPort express as Wi-Fi for my Hi-Fi when I get it though
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
Walker



Joined: 27 Mar 2005
Posts: 44
Location: Netherlands

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

View user's profile Send private message Visit poster's website Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Well, as I said, if all you need to do is fetch the info, you're sorted.

What's a Squeezebox?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
Walker



Joined: 27 Mar 2005
Posts: 44
Location: Netherlands

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Do you have a Squeezebox? Wink

Well, it's a bit heavy for my first Gadget. Have some other Gadgets in mind, but most of them need to fetch some kind of information from the net.
View user's profile Send private message Visit poster's website Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Ah. Cool. I'd be interested to see if it works.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
Walker



Joined: 27 Mar 2005
Posts: 44
Location: Netherlands

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

It is a dynamic page from the server. You can pass up to 5 paramters and in return you will get a XML page with the results, like the track name which is currently being played.
View user's profile Send private message Visit poster's website Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 05, 2004 - 7:04 am    Post subject: Imported from The Dashboader Reply with quote

Yeah - I've just been playing around. I left those in because I couldn't be bothered taking them out. I've tried a few ways, and that was the state those function were in when i decided to release it

I'm not sure what you're doing. Passing values to an XML document on the server? I'm not sure about that. The XML doc is is just a text document and not a script, so what's going to happen apart form the server receiving header requests? I send the data to a PHP page which'll then save the data. Obviousy, the approach I was trying there is majorly flawed. All someone needs to do is copy and paste the URL into their browser and put in their name and any score they want.... Not good.

I still haven't explored this avenue much - I've been making a patience game, which is now finished apart from some graphics. But, I'm going to muck about tonight some more. I should point out that the methods you see in dropper work just fine locally, but obviously not externally.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Goto page 1, 2  Next
Powered by phpBB © 2001, 2002 phpBB Group