Page 1 of 1

Problem Passing Parameters: (Help) Pretty Please!?

Posted: Sun Mar 09, 2008 6:20 pm
by stephenmcnutt
This is just a syntax problem, and I've been using Revolution long enough that this shouldn't be a problem, but I guess I use it sporadically rather than constantly, so I never get beyond these troubles. Anyhow...

I'm trying to pass parameters to a custom handler called iconFlasher. Here's the statement in which I call the handler:

iconFlasher(("space" & whichSpace), 12400+Spaces[whichSpace,1], 12000+Spaces[whichSpace,1], 500, 300, 1000, 3)

Here's the beginning of the custom handler showing the parameters I'm expecting it to receive:

on iconFlasher buttonToFlash, iconBright, iconRegular, intervalFirst, intervalOthers, intervalLast, flashCount

To help troubleshoot, I've put an "answer" statement at the beginning of the handler to see how these parameters are being loaded, and it seems that all the information I'm trying to send the handler is getting loaded into the FIRST parameter (buttonToFlash) only. Here's the answer statement:

answer "buttonToFlash=" & buttonToFlash && "iconBright=" & iconBright && "iconRegular=" & iconRegular && "intervalFirst=" & intervalFirst && "intervalOthers=" & intervalOthers && "intervalLast=" & intervalLast && "flashCount=" & flashCount

and here's the dialog that results:

buttonToFlash=space18,12409,12009,500,300,1000,3 iconBright= iconRegular= intervalFirst= intervalOthers= intervalLast= flashCount=

As you can see, only the first parameter is being loaded, and it's getting everything, which SHOULD be distributed among the other parameters. The statements ARE being evaluated as I intend, though. That is, buttonToFlash SHOULD be space18, and iconRegular SHOULD be 12409, etc.

What simple thing am I doing wrong? By the way, putting spaces or not putting spaces after the commas in the parameter lists doesn't have any effect. Thanks in advance.

Posted: Sun Mar 09, 2008 6:23 pm
by Mark Smith
You seem to have the whole lot in brackets - this will make the handler see the whole lot as one parameter. Remove the outermost brackets and it'll probably be fine...

Best,

Mark