Ah...  Thank you, Greg!!

 

Roger Whitcomb | Architect, Engineering | [email protected]|
Ingres | 500 Arguello Street | Suite 200 | Redwood City | CA | 94063 |
USA
<http://www.google.com/maps?f=q&hl=en&geocode=&q=500+Arguello+Street+%7C
+Suite+200+%7C+Redwood+City+%7C+CA+%7C+94063+%7C+USA+&sll=37.0625,-95.67
7068&sspn=50.557552,73.037109&ie=UTF8&t=h&z=16&iwloc=addr>  | +1
650-587-5596 | fax: +1 650-587-5550

From: Greg Brown [mailto:[email protected]] 
Sent: Tuesday, August 31, 2010 10:49 AM
To: [email protected]
Subject: Re: Trying to set TreeBranch expandedIcon in WTKX file

 

You're not doing anything wrong - TreeBranch is missing the
setExpandedIcon() overloads that takes a URL and a String. I'll add this
to the 2.0 and 1.5.2 branches.

 

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.ja
va: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 <http://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