Win2K Server
IIS 5
CF MX updater 2

Here's the problem:

I have a CF5 compatible user-defined function like this:

function jsqfCommit(formname) {
        arguments[1] = request.tapi.js.qf(formname) & ".commit";
        return request.tapi.call("request.tapi.js.call",arguments);
}

This works beatifully in CF5 (don't get me started on the functions that
used arraydelete() on the arguments array), but in CF MX when the arguments
array is passed to request.tapi.call, it contains the original value of
formname, not modified value provided by the nested function call.

I've also tried this:

function jsqfCommit(formname) {
        arguments[1] = request.tapi.js.qf(formname) & ".commit";
        if (request.tap.cfversion gte 6) { arguments.formname = arguments[1]; }
        return request.tapi.call("request.tapi.js.call",arguments);
}

Thinking that it might have something to do with the new arguments class in
MX and knowing that this class also stores the named argument values.

The only way I've found to make it work in cfmx yet is to change the
function like this:

function jsqfCommit(formname) {
        var args = arraynew(1); var x = 0;
        arrayappend(args,request.tapi.js.qf(formname) & ".commit");
        for (x = 1; x lte arraylen(arguments); x = x + 1) {
arrayappend(args,arguments[x]); }
        return request.tapi.call("request.tapi.js.call",args);
}

However, this seems like it would be considerably less efficient.

Does anybody know if there's another way I can work around it? The
workaround here just strikes me as ghastly and I'm really hoping there's
something better.

Also does anybody know if this is a desired or expected change from CF 5 to
CF MX?

imho the new arguments class in mx was either a bad idea or poorly
implemented -- as is it eliminates functionality that was available in CF 5.


s. isaac dealey                954-776-0046

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to