Return-Path: Delivered-To: apmail-incubator-pivot-user-archive@minotaur.apache.org Received: (qmail 75595 invoked from network); 3 Aug 2009 23:27:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Aug 2009 23:27:15 -0000 Received: (qmail 84602 invoked by uid 500); 3 Aug 2009 23:27:20 -0000 Delivered-To: apmail-incubator-pivot-user-archive@incubator.apache.org Received: (qmail 84570 invoked by uid 500); 3 Aug 2009 23:27:20 -0000 Mailing-List: contact pivot-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pivot-user@incubator.apache.org Delivered-To: mailing list pivot-user@incubator.apache.org Received: (qmail 84561 invoked by uid 99); 3 Aug 2009 23:27:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2009 23:27:20 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gkbrown@mac.com designates 17.148.16.95 as permitted sender) Received: from [17.148.16.95] (HELO asmtpout020.mac.com) (17.148.16.95) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2009 23:27:09 +0000 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_hTKC6euprI8Uj3l6kTbQLg)" Received: from laptop.home ([173.76.182.188]) by asmtp020.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KNT00MM9QGL61I0@asmtp020.mac.com> for pivot-user@incubator.apache.org; Mon, 03 Aug 2009 16:26:47 -0700 (PDT) Message-id: From: Greg Brown To: pivot-user@incubator.apache.org In-reply-to: <168ef9ac0908031551l44220404oa413df6275d2f3f0@mail.gmail.com> Subject: Re: Tutorial Runtime Error Date: Mon, 03 Aug 2009 19:26:45 -0400 References: <200908040840.13031.lists@sael.com.au> <168ef9ac0908031550v1022c8e2t25fc62ba73a89ef7@mail.gmail.com> <168ef9ac0908031551l44220404oa413df6275d2f3f0@mail.gmail.com> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org --Boundary_(ID_hTKC6euprI8Uj3l6kTbQLg) Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-transfer-encoding: 7BIT As Todd mentioned earlier, you may be better off working through the tutorials from SVN. Quite a few things have changed between 1.2 and 1.3, particularly in the area of WTKX. I'd recommend that you get the latest source and run the deploy target, since that will build the latest version of the tutorial apps and documentation. However, if you just want to read the WTKX Primer, you can get it here: http://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/www/wtkx_primer.template.html Greg On Aug 3, 2009, at 6:51 PM, Todd Volkert wrote: > Actually, in case you haven't read it yet, the WTKX primer on the > Wiki is a really good resource. It can be found at http://cwiki.apache.org/PIVOT/wtkx-primer.html > > Cheers, > -T > > On Mon, Aug 3, 2009 at 6:50 PM, Todd Volkert > wrote: > Hi Scott, > > translates to ImageView.setImage(String) (http://incubator.apache.org/pivot/1.3/docs/api/org/apache/pivot/wtk/ImageView.html#setImage(java.lang.String) > ), where the string is a resource name as per > ClassLoader.getResource(String) (http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String) > ). > > Thus, the path to your image must be found on your classpath. > > Alternatively, you can prepend the string with "@" and use a > relative path, in which case the value will be converted to a URL > relative to your WTKX file, and Imageview.setImage(URL) will be > called. > > Hope that helps, > -T > > > On Mon, Aug 3, 2009 at 6:40 PM, Scott Lanham > wrote: > Hello, > > I am up to the part of the tutorial: http://cwiki.apache.org/PIVOT/labels- > image-views.html and am doing something wrong but can't figure it out. > > Instead of just using the tutorial code as is I like to change > things slightly > so that I get a better feel for the toolkit. So I changed the > location of the > clock.png file but I get a "Null Image Alert" from the following code: > > xmlns:wtkx="http://incubator.apache.org/pivot/wtkx/1.1" > xmlns="pivot.wtk"> > > > cursor="crosshair"/> > > > > > The file does exist in that location as I can take the path and > paste it into a > graphics editor. Any help appreciated. > > Cheers, > > Scott. > > --Boundary_(ID_hTKC6euprI8Uj3l6kTbQLg) Content-type: text/html; charset=US-ASCII Content-transfer-encoding: quoted-printable As Todd mentioned earlier, you = may be better off working through the tutorials from SVN. Quite a few = things have changed between 1.2 and 1.3, particularly in the area of = WTKX.

I'd recommend that you get the latest source = and run the deploy target, since that will build the latest version of = the tutorial apps and documentation. However, if you just want to = read the WTKX Primer, you can get it here:



On Aug 3, 2009, at 6:51 PM, Todd = Volkert wrote:

Actually, in case you haven't read it yet, the WTKX primer = on the Wiki is a really good resource.  It can be found at http://cwiki.apach= e.org/PIVOT/wtkx-primer.html
=
Cheers,
-T

On = Mon, Aug 3, 2009 at 6:50 PM, Todd Volkert <tvolkert@gmail.com> = wrote:
Hi = Scott,

<ImageView image=3D"..." /> translates = to ImageView.setImage(String) (http://incubator.apache.org/pivot/1.3/docs/api/org/apach= e/pivot/wtk/ImageView.html#setImage(java.lang.String)), where the = string is a resource name as per ClassLoader.getResource(String) (http://java.sun.com/javase/6/docs/api/java/lang/ClassLoa= der.html#getResource(java.lang.String)).
=

Thus, the path to your image must be found on your = classpath.

Alternatively, you can prepend the = string with "@" and use a relative path, in which case the value will be = converted to a URL relative to your WTKX file, and = Imageview.setImage(URL) will be called.

Hope = that helps,
-T


On Mon, Aug 3, 2009 at 6:40 PM, Scott Lanham <lists@sael.com.au> wrote:
=
Hello,

I am = up to the part of the tutorial: http://cwiki.apache.org/PIVOT/labels-
= image-views.html
and am doing something wrong but can't figure it = out.

Instead of just using the tutorial code as is I like to = change things slightly
so that I get a better feel for the toolkit. = So I changed the location of the
clock.png file but I get a "Null = Image Alert" from the following code:

<Window title=3D"Labels"= maximized=3D"true"
   xmlns:wtkx=3D"http://incubator.apache.org/pivot/wtkx/1.1" = xmlns=3D"pivot.wtk">
   <content>
  =      <FlowPane styles=3D"{padding:4, = verticalAlignment:'center'}">
          =  <ImageView image=3D"/home/scott/devel/src/clock.png"
= cursor=3D"crosshair"/>
          =  <Label text=3D"What time is it?"/>
      =  </FlowPane>
   </content>
= </Window>

The file does exist in that location as I can = take the path and paste it into a
graphics editor. Any help = appreciated.

Cheers,

= Scott.

=


= --Boundary_(ID_hTKC6euprI8Uj3l6kTbQLg)--