[Chameleon] Problem with CWC2OnLoadFunction...

Aaron Racicot
Wed, 24 Mar 2004 11:28:10 -0800

I have been going through the chameleon code to try and locate where I am
having problems.  I have taken your advise and gone back to the downloaded
demo from the MapTools web site.  

I have started to systematically walk through the code to try to debug my
problem.  What I have come up with is that in the UIManager.php file I am
getting a JS runtime error at the following piece of code:

+++++++++++++ Start code +++++++++++++++++++++++
function DrawPublish()

    //get javascript code from widgets

    // Debug Added by Aaron Racicot

    //process widgets into template
      foreach( $this->manPriorities[$i] as $nWidgetIndex )
	  // Debug Added by Aaron Racicot
        echo "Loop i= ".$i."   nWidgetIndex= ".$nWidgetIndex."<br>";

        $oWidget =& $this->maoWidgets[$nWidgetIndex];
        $this->oCWCParser->SetElement( $nWidgetIndex,
$oWidget->DrawPublish() );
++++++++++++++ End Code +++++++++++++++++++++++++

I added some debug output to show the looping indexes and widget index and I
get the following:

Loop i= 4 nWidgetIndex= 12
Loop i= 3 nWidgetIndex= 17
Loop i= 2 nWidgetIndex= 0
Loop i= 2 nWidgetIndex= 1
Loop i= 2 nWidgetIndex= 2
Loop i= 2 nWidgetIndex= 3
Loop i= 2 nWidgetIndex= 4
Loop i= 2 nWidgetIndex= 5
Loop i= 2 nWidgetIndex= 9
Loop i= 2 nWidgetIndex= 13
Loop i= 2 nWidgetIndex= 14
Loop i= 2 nWidgetIndex= 15
Loop i= 2 nWidgetIndex= 16
Loop i= 2 nWidgetIndex= 18
Loop i= 2 nWidgetIndex= 19

At this point I get an error which is from the CWC2OnLoadFunction never
getting created just after this in the DrawPublish function.  The
interesting thing is that the index $i never reaches 1 or 0.  

Does this ring a bell for you?  I am very confused why my installation seems
to have this problem (which now does not seem to be path or permissions
related).  Thanks


Again, my setup is:
RedHat Enterprise Linux 3.0 AS on Intel Box (2.8gHz,1G,Dual 40G drives)
Mapserver/Mapscript - 4.0.1 
Postgresql - 7.4.2 
Postgis - 0.8.1 
PHP - 4.3.4 
Maplab - 2.1-rc3 
Chameleon 1.1alpha-20031031
chameleon-sample - From

-----Original Message-----
[] On Behalf Of Jason Fournier
Sent: Tuesday, March 23, 2004 4:31 PM
To: Aaron Racicot
Subject: Re: [Chameleon] Problem with CWC2OnLoadFunction...

Hi Aaron,

Have you tried downloading and installing (ie, unzipping) the Chameleon 
sample application from 
(  It's 
located at the bottom of the page.  At the very least it will give you 
an indication of the files required for an application as well as a 
suggested directory structure. 

Generally speaking a Chameleon application will reside outside your core 
Chameleon installation.

Best Regards,

Jason Fournier
DM Solutions Group
Application Developer
Ottawa, ON
613.565.5056 x 18

Chameleon mailing list

This archive was generated by Pipermail.