There is a great article over at DevNet on creating custom server behaviors in DWMX. I can say that after suffering through VTML (the language to create tag editors in CFS/HS), the DWMX way looks like a dream. I've been a devout CFS/HS+ user for years, but DWMX 2004 has almost convinced me to move. There is still one little bug that annoys the heck out of me and prevents me from using it... but I'm still on the fence as to what IDE I will use as my primary editor. In the past, HS+ was always the clear winner, now I'm not so sure.
Anyway, if you read the article above, Simon Horwith describes creating a server behior that allows you to create an intelligent comment header. What you may not know is that HS+ 5.5 included a cool new feature that allows you to embed variables in snippets. Consider this snippet:
<!---
Name : $${CURRENTFILE}
Author : Raymond Camden
Created : $${MONTH} $${DAYOFMONTH}, $${YEAR}
--->
When inserted into a document, all the $${..} items will be replaced. This is a handy little feature that I don't think many people know about. It's hard to find in the docs as well. To find the complete list, open up the book, Writing Code and Web Content, and select, "Saving a code block as a snippet"
Archived Comments
Dang! Doesn't work under Studio 5 but have MX 6 at work and MX 2004 at home so...
If Macromedia would just include CVS (or any SCC support for that matter) support in DWMX, maybe I could make the switch. Well, that and the ability to publish to more than one server ala Homesite+'s projects...
Thank you soooo much for the HS+5.5 snippet variable s! DOH! should of gone through the book, just used the web as a reference.
The one reason though im sticking with HS+ for a default IDE is speed of loading in general. I still find it a quicker enviroment to work in (and my PC should easily be able to handle anything), DWMX just tends to be that little (annoyingly) bit more slower. Oh and the file viewer. Actually if MM had this like HS+ then i think id swap.
Great idea, Looked at the book online and do NOT see the list of variables available.
http://livedocs.macromedia....
Any Ideas...
And thx for your blog time... it is a now on my daily read list.
Bartee, the link above is to the CF 5.0 docs concerning CF Studio 5, therefore they are out of date. You need to look in the docs for HS+ itself.
This is the exact same stuff that MM has included in their CF Studio wizards for years. If you ever look at any of those .wml files in the wizards folders, you'll see those vars in there. Works the same, from what you're describing. Launch the wizard, you get a prompt, fill it in, and as the files get created, your info gets plugged in.
I can't believe that MM didn't put SCC support into DWMX2004. That's a stunning omission.
A couple of additional features of the homesite snippet variables:
<p>- You can embed your own variables into the snippet text. When you insert the snippet you are prompted for the values. They take the same form as VTML variables: $${VARNAME}.
<p>- You may also include a list of values for the variable like so: $${COLOR:Blue,Red,Green}.
<p>BTW, the predefined snippet vars are listed in
Andy Jarrett's blog <a href="http://www.andyjarrett.cfde...">here</a>.