[Chameleon] Re: [Chameleon-dev] Creating your own widget.

Jan Jansen jansen at nieuwland.nl
Fri Sep 9 12:11:04 EDT 2005


Hi all,

I've started to walk through the tutorial for creating an utterly useless 
widget (still utterly usefull), but there's a bug in the following line:

 $szShowReport = strlen( $this->mszReport ) > 
0?'alert(\.$this->mszReport.'\')':;

 Probably has to do with escaping the quotes ?, but when I fix it like this:

$szShowReport = strlen( $this->mszReport ) > 0?'alert("' . $this->mszReport 
. '")':'';

, it gets stuck on the first following quote it finds (in the commented 
text) and produces the error

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting 
T_STRING or T_VARIABLE or T_NUM_STRING ,

ocurring in commented text " |  $aReturn['MyInitFunction'] = 
"MyInitFunction();\n";  "

Any ideas what I am doing wrong?

Thanks in advance

Jan Jansen


----- Original Message ----- 
From: "Paul Spencer" <pspencer at dmsolutions.ca>
To: "Deschamps,Paul [NCR]" <Paul.Deschamps at ec.gc.ca>
Cc: <chameleon-dev at lists.maptools.org>; <chameleon at lists.maptools.org>
Sent: Thursday, September 08, 2005 2:59 PM
Subject: [Chameleon] Re: [Chameleon-dev] Creating your own widget.


> Good news all ... I've finally been shamed into doing something about 
> this.  I've added the content that I presented at MUM3 to the chameleon 
> tiki:
>
> http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a+new+Chameleon+Widget
>
> I'm pretty sure it contains mistakes so feel free to update it with 
> corrections as you find them.
>
> I've attached several files to the page, including a powerpoint 
> presentation and code samples.  As far as I can tell, you need to click 
> the link at the top that says "4 attachments" to see them and download 
> them.
>
> Cheers
>
> Paul
>
> Deschamps,Paul [NCR] wrote:
>> Good day.
>>
>> I am wondering if there is a generic walkthrough on creating your own 
>> widget.
>>
>> I have created some php functions to parse a sld file and it's related 
>> context documents to generate a collapsible legend with JS nodes.
>>
>> All I need to do now is create / modify a widget to output that on the 
>> client.
>>
>> I have seen an document on doing this from one of your seminars however 
>> on my installation of chameleon I do not have a template folder with the 
>> base code for a widget.
>>
>> Any assistance would be appreciated.
>>
>> *Paul Deschamps, UI Design / Graphic Artist*
>> Integrated Environmental Applications Branch / Direction des Applications 
>> Environnementales Intégrés
>> Knowledge Integration Directorate / Direction générale de l'integration 
>> du savoir
>> Environment Canada / Environnement Canada
>> 70 Crémazie, 7th Floor / 7^e étage
>> Gatineau, Québec  K1A 0H3
>> Tel / Tél:* (819) 934-2986*
>> E-mail / Courriel:* Paul.Deschamps at ec.gc.ca***
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Chameleon-dev mailing list
>> Chameleon-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon-dev
>
> -- 
> +-----------------------------------------------------------------+
> |Paul Spencer                           pspencer at dmsolutions.ca   |
> +-----------------------------------------------------------------+
> |Applications & Software Development                              |
> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.19/93 - Release Date: 9/8/2005
> 



More information about the Chameleon-dev mailing list