[Chameleon-dev] [Bug 1522] New: "eval" after ROI event not executed properly

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Sun Jul 9 20:05:08 EDT 2006


           Summary: "eval" after ROI event not executed properly
           Product: Chameleon
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Widget
        AssignedTo: chameleon-dev at lists.maptools.org
        ReportedBy: jacob.delfos at maunsell.com

It appears that the syntax for the "eval" command on line 208 of cwc_roi.js
might not be correct. It lacks the "()" part, and does not include arguments.
After trying to get a function registered with the goCWCROIManager, it wouldn't

I have adjusted the code using bits from the cwc_events.js file, which allow for
parameter passing as well. The adjusted (and functioning) code of
CWCROIManager_TriggerEvent becomes then:

function CWCROIManager_TriggerEvent( event )
        var args = "(";
        var sep = "";
        for(i=1; i<arguments.length; i++)
            args = args + sep + "'" + arguments[i] + "'";
            sep = ",";
        args = args + ")";

    var i = 0;
    var nEvents = (this.events[ event ]).length;
    for (i=0; i<nEvents; i++)
        szFunction =  this.events[ event ][ i ];
        if (szFunction != "")
                var rx_params = /\(.*\)/i;
                if (!rx_params.test( szFunction ))
                szFunction = szFunction + args;
    return true;

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.

More information about the Chameleon-dev mailing list