MapTools.org

[Chameleon] Problem with CWC2OnLoadFunction...

Aaron Racicot aaronr@ccalmr.ogi.edu
Wed, 24 Mar 2004 11:28:10 -0800
Jason,

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
    $this->ProcessWidgetIncludes();

    // Debug Added by Aaron Racicot
    echo "PRIORITY_MAXIMUM= ".PRIORITY_MAXIMUM."<br>";
    echo "PRIORITY_MINIMUM= ".PRIORITY_MINIMUM."<br>";

    //process widgets into template
    for ($i=PRIORITY_MAXIMUM; $i>=PRIORITY_MINIMUM; $i--)
    {
      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() );
      }
    }
    $this->oCWCParser->ProcessElements();
++++++++++++++ End Code +++++++++++++++++++++++++

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

PRIORITY_MAXIMUM= 5
PRIORITY_MINIMUM= 0
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

Aaron

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 MapTools.org


-----Original Message-----
From: chameleon-admin@lists.maptools.org
[mailto:chameleon-admin@lists.maptools.org] On Behalf Of Jason Fournier
Sent: Tuesday, March 23, 2004 4:31 PM
To: Aaron Racicot
Cc: chameleon@lists.maptools.org
Subject: Re: [Chameleon] Problem with CWC2OnLoadFunction...

Hi Aaron,

Have you tried downloading and installing (ie, unzipping) the Chameleon 
sample application from Maptools.org 
(http://maptools.org/chameleon/index.phtml?page=downloads.html)?  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

-- 
___________________________
Jason Fournier
DM Solutions Group
Application Developer
Ottawa, ON
613.565.5056 x 18
jfournier@dmsolutions.ca



_______________________________________________
Chameleon mailing list
Chameleon@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon



This archive was generated by Pipermail.