|  | ||||
| 
 | ||||
| [Chameleon] LegendTemplate WidgetPaul Spencer spencer@dmsolutions.caWed, 14 Jan 2004 16:31:08 -0500 
 | ||||
Thanks Rene.  I will commit the changes as soon as I finish up some 
other changes.
Paul
Rene Teniere wrote:
> Paul,
> 
> Sorry for the e-mails, but the following code seems to work now with
> the following changes. Now the legend button is being displayed and the
> popup is working fine. 
> 
> I hope this will help someone else in the future as well.
> 
> Thanks for the help.
> 
> Rene
> 
> 
> 
> 
>>>>pagameba@magma.ca 2004-01-13 10:36:56 PM >>>
> 
> There definitely seems to be something odd here.  These lines of code:
> 
> if (strcmp(substr($this->mszTemplate, 0, 1), "/") ||
>      strcmp(substr($this->mszTemplate, 1, 1), ":") ||
>      strcmp(substr($this->mszTemplate, 0, 1), "\\") )
> {
> 
> seem to be wrong.  I think that the intention of the block following it
> 
> is to calculate the location of the template if a relative path is 
> given.  The if doesn't seem to do that.
> 
> I think it should say:
> 
> if (strcmp(substr($this->mszTemplate, 0, 1), "/") != 0 &&
>      strcmp(substr($this->mszTemplate, 1, 1), ":") != 0 &&
>      strcmp(substr($this->mszTemplate, 0, 1), "\\") != 0 &&
>      strcasecmp(substr($this->mszTemplate, 0, 7), "http://" != 0)
> {
> 
> and the second if which reads:
> 
> if (strtoupper(substr($this->mszTemplate, 0, 7)) == "http://")
> {
> 
> should read:
> 
> if (strtolower(substr($this->mszTemplate, 0, 7)) == "http://")
> {
> 
> Can you try this and let me know if it works?
> 
> Cheers,
> 
> Paul
> _______________________________________________
> Chameleon mailing list
> Chameleon@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 
-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------
   | 
 This archive was generated by Pipermail. | 
|  MapTools.org -- Hosted by DM Solutions Group  |