Bug 354 - [Chameleon] UpdateMap widget - using relative images
: [Chameleon] UpdateMap widget - using relative images
Status: RESOLVED FIXED
: Chameleon
Widget
: 1.99
: PC Windows XP
: P2 normal
: 1.99 beta 4
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-04-16 17:52 by
Modified: 2004-12-02 21:29 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-04-16 17:52:55
So according to Bug#127, for relative image paths the logic for the code is 1)
look in app directory, 2) use web path, and 3) look in chameleon relative to
chameleon.php. 
I'm attempting to use an UpdateMap widget without buttonizer (no
styleresource)..here is my widget tag:

<cwc2 type="UpdateMap" visible="true" imagetip="Update Map" label="Update"
imagewidth="20" imageheight="20">
   <image state="normal" image="images/icon_update.png"/>
   <image state="selected" image="images/icon_update.png"/>
   <image state="hover" image="images/icon_update.png"/>
</cwc2>

produces a broken image.  In this case "icon_update.png" is located in the
chameleon/images directory and not in the app/images directory.  A properties on
the broken image gives:

http://127.0.0.1/msapps/chameleon1.1/chameleon_sample/htdocs/images/icon_update.png 

which means it's looking in the app for the image.  A view/source on the page gives:

<img NAME="cwcimage_11" ID="cwcimage_11" SRC="images/icon_update.png"
ALT="Update Map" TITLE="Update Map" BORDER="0" WIDTH="20" HEIGHT="20">

which looks right.

any ideas?
------- Comment #1 From 2004-04-16 17:57:31 -------
note that if i copy the image to my app's images folder it appears magically.
------- Comment #2 From 2004-05-21 10:21:39 -------
Set Target Milestone to 1.99 RC
------- Comment #3 From 2004-11-03 14:23:21 -------
this seems to work now, however in this case it would produce unexpected results
I think.  Because you are not using a styleresource in the widget tag, chameleon
will use the images you supply as the whole button image.  The
images/icon_update.png file is not a button but an icon to be placed on a
button.  The correct way to do this would be to use
buttons/button_update_<x>.png where x = 1,2,3 for normal, selected and hover
states (respectively).  That is a convention used by Fred when designing the skins.