OK, this is fixed. If you build the latest from the 1.5.x branch, you now 
should be able to set this property in WTKX.

On Aug 31, 2010, at 1:32 PM, Roger L. Whitcomb wrote:

> Hi,
>                 I’m currently using version 1.5, and I can successfully 
> create a tree with the following snippet of WTKX:
> <TreeView wtkx:id="databasesTree"
>       styles="{backgroundColor:'#E8E8E8'}"
>       xmlns:wtkx="http://pivot.apache.org/wtkx";
>       xmlns:content="org.apache.pivot.wtk.content"
>       xmlns="org.apache.pivot.wtk">
>       <nodeRenderer>
>             <content:TreeViewNodeRenderer showIcon="true"/>
>       </nodeRenderer>
>       <treeData>
>             <content:TreeBranch>
>                   <content:TreeBranch wtkx:id="userdb" text="Databases" 
> icon="images/folder-closed-16.png">
>                
>                 But, I’d like to set the “expandedIcon” in the WTKX file like 
> I can in code by doing this:
>                   <content:TreeBranch wtkx:id="userdb" text="Databases" 
> icon="images/folder-closed-16.png" expandedIcon="images/folder-open-16.png" >
>  
>                 However, when I do this I get the following exception:
> An error occurred while processing  element <content:TreeBranch> starting at 
> line number 11 in file 
> file:/C:/Projects/tooldev/src/director.jar!/com/ingres/director/install_tree.wtkx:
> java.lang.IllegalArgumentException: argument type mismatch
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.pivot.beans.BeanAdapter.put(BeanAdapter.java:317)
>         at org.apache.pivot.beans.BeanAdapter.put(BeanAdapter.java:41)
>         at 
> org.apache.pivot.wtkx.WTKXSerializer.processEndElement(WTKXSerializer.java:771)
>         at 
> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:460)
>         at 
> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:411)
>         at 
> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:398)
>  
> I must be doing something wrong, but I can’t see what it is….  I have tried 
> various other syntax for the image location (like �...@images…” and 
> “%images…” and “../../../images…” all to no avail (I get the same exception 
> all the time).  So, I can’t tell if it just can’t find the image, or if there 
> is some other problem trying to set the “expandedIcon” value.  The image I 
> want to load does exist and is in the same directory as the regular icon file 
> (and is in the .jar file).
>  
> Thanks for any help…. J
>  
> Roger Whitcomb
> Architect, Engineering
> Ingres Corporation
> [email protected]
>  
> PHONE +1 650.587.5596
> FAX +1 650.587.5550
>  
> www.ingres.com
>  
> This transmission is confidential and intended solely for the use of the 
> recipient named above. It may contain confidential, proprietary, or legally 
> privileged information. If you are not the intended recipient, you are hereby 
> notified that any unauthorized review, use, disclosure or distribution is 
> strictly prohibited. If you have received this transmission in error, please 
> contact the sender by reply e-mail and delete the original transmission and 
> all copies from your system.
>  

Reply via email to