[Chameleon] Re: Tutorial Developing new chameleon Widget - Problem

Paul Spencer pspencer at dmsolutions.ca
Mon Oct 23 18:49:05 EDT 2006


Ines,

please use the mailing list to ensure maximum chance of getting a  
useful response.

I know that there were some bugs in that code, and it seems to me  
that this was one of them but I don't recall the resolution.   
Hopefully someone else does!

Cheers

Paul

On 23-Oct-06, at 11:20 AM, Ines wrote:

> Hello, Paul Spencer, I'm trying to make my own widget whit this  
> tutorial:
> http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a 
> +new+Chameleon+Widget
>
> But I have some problem, when I add this code in the  
> GetJavascriptFunctions(): Can you help me please?
>
> // show the report
> $szShowReport = strlen( $this->mszReport ) > 0?"alert('".$this- 
> >mszReport."')":"";
> $szJsFunctionName = "showReport";
> $szFunction = <<<EOT   
> --------------------------------------------------->ERROR in this line
> function {$szJsFunctionName}()
> {
> {$szShowReport};
> return true;
> }
> EOT;
> $aReturn$szJsFunctionName = $szFunction;
>
> The error says:
> Parse error: parse error, unexpected T_SL in D:\ms4w\apps\wmsviewer 
> \htdocs\widgets\UUW\UUW.widget.php on line 342
>
> This is my complete "GetJavascriptFunctions() " in UUUW.widget.php:
>
>
> function GetJavascriptFunctions()
>     {
>         // init vars
>         $aReturn = parent::GetJavascriptFunctions();
>
>         // show the report
>                 $szShowReport = strlen( $this->mszReport ) >  
> 0?"alert('".$this->mszReport."')":"";
>                 $szJsFunctionName = "showReport";
>                 $szFunction = <<<EOT
>                 function {$szJsFunctionName}()
>                 {
>                    {$szShowReport};
>                    return true;
>                 }
>                 EOT;
>                 $aReturn$szJsFunctionName = $szFunction;
>
>
>         // return
>         return $aReturn;
>
>     // end GetJavascriptFunctions() function
>     }
>
>
> Can You help me width this? Thank You very much
>
> Ma. Inés Etchichury - Argentina
>
>

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+







More information about the Chameleon mailing list