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

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.
View user's profile Send private message Visit poster's website 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

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

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
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
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
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
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
isnane
Guest





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

useful thread
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
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

Damn straight it would! I've just been writing mine in Moz because of it's debugging tools. There's only a few differences between it and Safari, so it's been going OK thus far.
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

That's what I have been trying but Firefox gives me a

Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

I tried it with dropper but can't get it to the point where he tries to get / write the highscrore.
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. Moz browsers are more strict with XMLHttpRequest. The script has to come from the same domain for it to work (if I remember right). Safari respects that for URL's with ?foo=bar etc stuck on the end - hence why I haven't got internet highscores working yet in dropper.

Also - Moz browsers choke on the if (gadget) bit too, because gadget isn't a defined object. That's a bit annoying...

Out of interest - what are you doing with my code?
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