Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF9 cfscript documentation/examples?

Explorer ,
Oct 16, 2009 Oct 16, 2009

I am in the process of updating the CFML mode in the editor I use for CF development and have spent some time going through the available CF9 documentation. In looking through the downloadable PDFs, I am trying to find either examples or reference material for some of the new stuff and have failed. For example, the "Developing Applications" document, on p. 105-108 lists a number of CFML tag/CFSCRIPT equivalents (some of which are indicated as being new) for which I can find no examples or references describing the syntax or what they look like:

  • savecontent
  • trace
  • location

Can someone point me either to examples or (preferably) to reference material for these elements of CFSCRIPT?

In addition, in looking at exception-related topics in CFSCRIPT, I'm wondering about throw. How does "throw" in CFSCRIPT compare from CFML? p. 18 of the "Developing Applications" document has a single example of

throw "message";

but I'm wondering what throw really looks like in terms of the other attributes (detail, errorCode, extendedInfo, message, object, type).

Is Adobe actively working on the CF9 documentation? These aren't the only areas I have found in trying to go through the docs to see what is new, changed, etc., where they seem a little fuzzy or incomplete, but maybe I'm just not looking in the right places.

Thanks in advance.

--

/ron

1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 17, 2009 Oct 17, 2009

The docs still need some work,  but I can answer your questions in a "non-official" capacity.

1) <cfsavecontent> and <cftrace> have not been ported to CFScript.

2) location has been.  It should simply be:

location(url="someUrl", addtoken=false);

This is not documented.  And I'm presupposing the syntax, and cannnot check as I am not on a PC that has CF installed at present.  Sorry to be vague on that one.

3) There are two THROW constructions (no, I don't know why either: it's not very sensible).  The one you mention which is just a quick and dirty approach to throwing an exception, and the more fully-fledged function version, which takes all the various attributes <cfthrow> does.

I'm pretty sure this IS in the docs.

HTH

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 18, 2009 Oct 18, 2009
LATEST

Thanks for the follow up, Adam. I'll look some more at the throw() stuff to see if I just missed it in the docs.

Given all of the changes to CFSCRIPT in CF9, I would have thought having decent docs would have been a priority for Adobe, particularly given the nature of the changes. I've always liked CFSCRIPT for logic, but have wanted a more complete coverage of the capabilities available via the CF tags to also be available in CFSCRIPT; as a result, I've really been looking forward to CF9 with that in mind.

I've got to say, however, that the expansions to CFSCRIPT feel very ad hoc: poor (as in incomplete, in error, and inconsistent in coverage and format) documentation and lack of consistency in how the expanded coverage is provided: some via component, some via function, and some via a couple of different formats of statement.

I'll keep digging in the docs, and I'm hoping to have a CF9 box fairly soon to start trying some of this against to verify syntax.

--

/ron

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources