[Chameleon] Template/widget questions (Visible=false?)
Mike Leahy
mgleahy at fes.uwaterloo.ca
Fri Oct 29 10:08:54 EDT 2004
Hello list,
I'm just getting started using one of the chameleon samples to try building my
own template. My first question is whether there is anyone who can imagine
how I might be able to dynamically change the content of a template prior to
its use by chameleon. An simple example of what I mean would be the map
title...in the samples, the text for the map title is set in a "title"
widget. If i use the same template to display a different mapfile, however,
the title should appropriately change. Similarly, I may want to change the
content of other labels, and include/exclude or enable/disable various widgets
depending on the current map or user context. Should I be considering
developing my own widgets from scratch or by modifying those distributed with
Chameleon? (a side note: I found that replacing '$szLabel = ""'
with '$szLabel = $this->mszLabel;' to the beginning of the DrawPublish
function of the CWCLabel class made the NAME property of a mapfile the default
value for the Title widget).
Another issue I'm wondering about is related to my attempt modify one of the
chameleon samples to remove some of the widgets that I don't plan to use in my
application. Deleting them doesn't seem to cause problems, but I thought I
might try leaving some in and just setting the visible property of the widget
to "false", for example:
<cwc2 type="BoundingBoxPopup" image="icons/icon_zoombounds.png"
visible="false" styleresource="NavButtons" popupstyleresource="TextButtons"
imagetip="Zoom to Bounding Box or Point" imagewidth="24" imageheight="24"
popupwidth="490" popupheight="450" toolbar="false" status="false"
menubar="false">
<image state="normal"/>
<image state="selected"/>
<image state="hover"/>
</cwc2>
When I did this, however, I got an alert message saying "image object for
cwcimage_16 not found?". I'm not sure what's causing this, since when I
delete the same widget from the template I get no error at all. Any ideas
what might cause this?
Thanks in advance for any comments,
Mike
----------------------------------------
This mail sent through www.mywaterloo.ca
More information about the Chameleon
mailing list