6 posts
on 9/6/2004
Radio Paradise
Posted Monday, September 06, 2004 9:54:39 PM by Stephanie

Maybe some of you work like I do -- at a computer all day, building web sites and talking to the little people inside your computer, but you enjoy a bit of background noise. Some tunes.
I really love iTunes. We have it on both the Macs and PCs here and we can share playlists on our network. I buy songs as well as listen to the radio. But I had a hard time finding a station I enjoyed consistently and people within listening range were really, really tired of the songs in my library. I don't like run of the mill top 40 stuff at all (does radio still do something called top 40?). Recently I discovered a radio station that works for me about 90% of the time -- Radio Paradise. You don't have to listen with iTunes, you can go to their website to see the other ways to listen.
It's the most interesting eclectic mix. I honestly have no idea what to call it. On iTunes, they have it listed under the category of Alt/Modern Rock but that's not at all where I would put it. Sure, they play some Fountains of Wayne, Coldplay, Wilco, Death Cab for Cutie and similar, but they also play Peter Gabriel, Norah Jones, Guster, Tori Amos, Patti Smith, Dido, Beatles, Beck, Talking Heads, REM, Doors, Red Hot Chili Peppers, Blue Man Group, Rollling Stones and at times they'll even play some old blues, Frank Sinatra or Reggae/International-flavored stuff. How are you going to categorize that list? It's not one genre. And I don't like just one genre. One of the best things is, they're listener supported, so there are no commercials.
Sometimes, they play music in grouped themes. Kinda like in the old days when radio was really DJ's spinning the tunes and not simply corporations marketing the latest 20 songs. (Showing my age again...) They have playlists for the past few days on their site, just in case you want to look for something you heard there. They have areas where you can discuss the music with other people (I never seem to find time for that). They link to the albums on Amazon and, just recently, when iTunes started their affiliate program, RP started linking the songs to the iTunes store as well. In case you simply want to buy single songs. Very cool. If you're bored with your playlist, can't find a station that caters to your eclectic tastes, check out Radio Paradise. It makes those clients ever so much easier to deal with.
Category tags: On the Personal Side, On the Personal Side
Posted by Stephanie
Add comment |
View comments (7) |
Permalink
|
Trackbacks (0)
|
Digg This
Undocumented Dreamweaver: Saving a Copy of a DOM
Posted Monday, September 06, 2004 7:24:26 PM by Paul R. Boon

Latest Posts by Paul R. Boon
- Undocumented Dreamweaver: Getting Snippets as a Collection of TreeNodes
- Undocumented Dreamweaver: A Completely Pointless API Call
- Undocumented Dreamweaver: Getting the Path of the Menus.xml file
- Undocumented Dreamweaver: Changing the Cursor During Time Consuming Code
- Undocumented Dreamweaver: Determining the Location of the All User Configuration Folder
For extension developers it can be a hassle when working with some DW API calls because they popup a dialog by default, a good example of this is dw.saveDocumentAs().
For example you might write an extension to insert code or manipulate the documents dom. You want to save a copy of the document before applying the changes. Now using dw.saveDocumentAs() is out of the question because you don't want the user to choose the location/filename of the file, as you want the extension to work silently in the background when making the backup.
Normally the solution would be to grab the contents of the dom and write this out to a file using DWfile.write() and whilst this is only a couple of lines of code, there is an easier way of handling this situation.
Example using DWfile.write():
var dom = dw.getDocumentDOM();
var path='dw.getConfigurationPath()+'/backup.htm';
var docContents = dom.documentElement.outerHTML;
DWfile.write(path,docContents);
The easier way comes thanks to the undocumented call saveCopyAs(path), this is a child method of the Document Object, so once again we need a reference to the documents DOM.
Example of Use:
var dom=dw.getDocumentDOM();
var path='dw.getConfigurationPath()+'/backup.htm';
dom.saveCopyAs(path)
Category tags: Dreamweaver, Extensibility
Posted by Paul R. Boon
Add comment |
View comments (0) |
Permalink
|
Trackbacks (0)
|
Digg This
Undocumented Dreamweaver: Programmatically Calling a Toolbar Item
Posted Monday, September 06, 2004 3:23:38 PM by Paul R. Boon

Latest Posts by Paul R. Boon
- Undocumented Dreamweaver: Getting Snippets as a Collection of TreeNodes
- Undocumented Dreamweaver: A Completely Pointless API Call
- Undocumented Dreamweaver: Getting the Path of the Menus.xml file
- Undocumented Dreamweaver: Changing the Cursor During Time Consuming Code
- Undocumented Dreamweaver: Determining the Location of the All User Configuration Folder
Following on from my blog entry titled Programmatically calling a Menu item, i thought i would pass on another little gem for calling other DW extension types programmatically.
This time as i am sure you can guess we are dealing with toolbar items.
First if you have not already read the blog about calling Menu Items programmatically, i would advise reading it then coming back and reading this blog, mainly so i don't have to re-type the intro about dw.runCommand() :-).
Ok, Ok, i admit it, i am lazy, but name me a programmer who does not reuse code.
Anyway the method to call a Toolbar Item programmatically is a child method of the Document Object, so as normal first we get a reference to a DOM, then we use the undocumented call activateToolbarItem('toolbarID','ToolbarITemID').
Example of use:
var dom=dw.getDocumentDOM();
dom.activateToolbarItem("DW_Toolbar_Main","DW_CodeView");
The example above simulates the user clicking on the 'Code' toolbar item of the main Document Toolbar (the button that puts Dreamweaver into code view). As with calling a menu item, for this method to work you must first make sure that the toolbars items enabler would return true, that is the toolbar item could be clicked by the user during normal operation.
Category tags: Dreamweaver, Extensibility
Posted by Paul R. Boon
Add comment |
View comments (0) |
Permalink
|
Trackbacks (0)
|
Digg This
Getting info for a defined site from Dreamweaver's preferences
Posted Monday, September 06, 2004 2:28:30 PM by Danilo Celic

To access info for a site, let's say the default image folder, you can use: dw.getPreferenceString('Sites\\-SiteXX', 'Image Directory'); where XX is the site number that DW has assigned to the site. The site listing is in the same order as the list of sites with the Files panel, however, deleting and adding sites within a session can throw this order off within the preferences, so you can't jut take site.getSites(); and cycle through the site lists to find the index of the proper site to use in the preference API calls. So you have to do something a little different, and walk your way through the keys for the defined sites. To do this, I've writing the following function to find the index within the defined sites the specified site is located at.
function getSiteNumberFromPrefs(siteName){
var siteIdx = -1;
var numSites = dw.getPreferenceInt('Sites\\-Summary', 'Number Of Sites');
for(var i=0;i<numSites;i++){
var s = dw.getPreferenceString('Sites\\-Site'+i,'Site Name');
if(s == siteName){
siteIdx = i;
break;
}
}
return siteIdx;
}
Example code usage:
var siteIdx = getSiteNumberFromPrefs('CommunityMX');
alert(dw.getPreferenceString('Sites\\-Site'+siteIdx, 'Image Directory'));
This code first grabs the number of available sites, and then cycles through each of the defined sites until it reaches the appropriate site name, and then it sets siteIdx to the current index and then drops out of the loop, and returns the found index. If the site isn't found, then -1 is returned.
Note: The Dreamweaver MX 2004 release changed the location of the site definition preferences settings, however, the 7.0 initial version did not update the preference API calls to be able to pull from the new location. The 7.0.1 updater release corrected this issue. So be sure to check for the application version number before relying on this method. You can obtain the version of Dreamweaver that the extension is working within by using: dw.appVersion
Category tags: Dreamweaver, Extensibility
Posted by Danilo Celic
Add comment |
View comments (2) |
Permalink
|
Trackbacks (0)
|
Digg This
Undocumented Dreamweaver: Finding Out the File Extensions DW Supports
Posted Monday, September 06, 2004 6:49:46 AM by Paul R. Boon

Latest Posts by Paul R. Boon
- Undocumented Dreamweaver: Getting Snippets as a Collection of TreeNodes
- Undocumented Dreamweaver: A Completely Pointless API Call
- Undocumented Dreamweaver: Getting the Path of the Menus.xml file
- Undocumented Dreamweaver: Changing the Cursor During Time Consuming Code
- Undocumented Dreamweaver: Determining the Location of the All User Configuration Folder
You may have seen the message 'Can't find a valid editor for this file extension' whilst using Dreamweaver. All files Dreamweaver can edit are listed in one of three places.
These being.
Extension.txt file: Located in the root of Dreamweaver's configuration folder.
This file contains a list of file extensions recognized by Dreamweaver.
Grouped into types, these groupings are used within Dreamweaver's file dialogs.
Document Types: Defined in the MMDocumentTypes.xml located in the Configuration/DocumentTypes folder. This contains a list of defined document types that Dreamweaver can create and is linked to a default document for each type held within the Configuration/DocumentTypes/NewDocuments Folder.
Editor Preferences: Accessible from the 'Edit' > 'Preferences' > 'File Types/ Editor' option. This is used to set external editors to a file extension, informing Dreamweaver of the editor (external application) that a file type should be open or passed to for editing.
I have sometimes needed to know what file extensions Dreamweaver can edit when writing an extension. This is particularly helpful when developing an extension that checks file extensions during a function that manipulates large collections of files.
Luckily an undocumented API call comes in handy for getting a list of file types that Dreamweaver understands, this is dw.getExtensionsList()
Example of use:
var fileExtensions=dw.getExtensionsList();
This call returns an array of file extensions Dreamweaver currently supports.
Example of the alerted return is below:
HTM,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,AS,ASC,ASR,XML,
XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX, CONFIG,CS,CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,
TPL,LASSO,JSP,JSF,VB,VBS,VTM,VTML,INC,JAVA,EDML,WML,HTM,
HTA,HTC,XHTML,SHTM,SHTML,STM,SSI,INC,JS,XML,DTD,XSD,XSL,
XSLT,RSS,RDF,LBI,DWT,CSS,ASP,ASA,ASPX,ASCX,ASMX,CS,VB,
CONFIG,CFM,CFML,CFC,AS,ASC,ASR,TXT,PHP,PHP3,PHP4,PHP5,
TPL,LASSO,JSP,JST,JSF,TLD,JAVA,WML,EDML,VBS,VTM,VTML,MXI
The list of supported file extension will change between different installs, so this is the list my installation of Dreamweaver understands as i have extended my copy of Dreamweaver to understand some new file extensions and document types.
Category tags: Dreamweaver, Extensibility
Posted by Paul R. Boon
Add comment |
View comments (0) |
Permalink
|
Trackbacks (0)
|
Digg This
Cleanup Day
Posted Monday, September 06, 2004 6:42:57 AM by Kim

We’re digging out down here in South Florida today. The winds have finally died down to just a stiff breeze, and the rain has stopped (for the most part), and the real cleanup can begin today.
I hope to have some time later on to write about some of the things that happen in a storm like this. I thought it would be interesting to listen to a call-in radio show last night, just to listen to what people around the state were doing and what they were worried or angry about. I was struck by the number of people calling in to complain that “they” weren’t doing enough to take care of things--the “they” of government agencies or the “they” of the local power company. That and all of the people calling in to find out where the government would be setting up relief centers. These are the people who ignored the warnings, did nothing to prepare, and are now without water, food, or electricity. I can understand how you’d be frightened in a situation like that, but how about some personal responsibility folks. Take care of yourself, take care of your family, help your neighbors, and then if you need assistance beyond that you can turn to the government. (And this from an avowed liberal.)
As for myself I’ll be helping to clean up here in Stuart this morning before heading home to West Palm Beach this afternoon. My sister reports that my house made it through the storm without a scratch, so mostly today will be about taking some plywood down and wishing for electricity. I was kind of hoping a big branch would spear our in-need-of-repair hot tub so we could get a little insurance help on that one, but not even the screens on the patio were damaged. Darn.
Lots of good sweaty manly labor ahead of me today, involving chain saws, drills, hammers and 90+ degree weather. Nothing like a good natural disaster to get that testosterone pumping. I can hardly wait.
Category tags: On the Personal Side
Posted by Kim
Add comment |
View comments (5) |
Permalink
|
Trackbacks (0)
|
Digg This
6 posts
on 9/6/2004


Blog RSS feed












