Posted Wednesday, March 30, 2005 12:17:48 AM by Danilo Celic
While it's deprecated, dreamweaver.popupCommand() is used in several places within Dreamweaver, it isn't documented as that method that is supposed to be replacing it, dreamweaver.runCommand(). In the documentation for dw.runCommand() it states that you can pass in option arguments that will be procesed by the receiveArguments() function within the called Command. dw.popupCommand() also can take optional parameters to pass on to the called Command. For example, if you wanted to pass along a first name, last name, and age of a user to a Command, you could use the following code:
dw.popupCommand('MyCoolCommand.htm','Bill', 'Horvath', 97);
Again, this method has apparently been deprecated since Dreamweaver 3, but its still around, at least through Dreamweaver MX 2004, 4 versions later.
Posted Saturday, March 05, 2005 7:08:20 PM by Danilo Celic
Many times you'll need access to similar messages that you present to the user, whether in alerts for errors, or in notes on dialogs in a Dreamweaver extension. You could include the same text over and over again, in all of the extensions you have as part of your project, or you could write your own custom file manipulation functions that would share a common file to store your common text. Well, the great folks that bring you Dreamweaver also thought of this second method, they just happened to not document it just yet, and it's called dreamweaver.loadString().
On my system, I get alerted: iso-8859-1
So, where, and how do you store your strings so that that you can load them when needed?
As usual, you need to get into the Dreamweaver configuration folder. Go to the Configuration/Strings/ folder. You store your data in a specially formatted XML file. See the following code for an example of the format:
<string id="uniqueIdentifier" value="string to store">
You can have multiple <string> tags within the parent <strings> tag.
Make sure that you uniquely identify your strings, preferably by "scoping" the strings by including your company name, or your initials, and also save your strings XML file with a unique name inside the Strings folder. All this is to avoid any naming conflict with other developers, or with built in stings, and strings XML files.
Posted Thursday, March 03, 2005 5:13:43 PM by Stephanie
So hurry over and download sIFR today. :)