Return-Path: Delivered-To: apmail-pivot-user-archive@www.apache.org Received: (qmail 49194 invoked from network); 6 Feb 2011 23:58:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Feb 2011 23:58:20 -0000 Received: (qmail 2354 invoked by uid 500); 6 Feb 2011 23:58:19 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 2341 invoked by uid 500); 6 Feb 2011 23:58:19 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 2333 invoked by uid 99); 6 Feb 2011 23:58:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Feb 2011 23:58:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gk_brown@verizon.net designates 206.46.173.1 as permitted sender) Received: from [206.46.173.1] (HELO vms173001pub.verizon.net) (206.46.173.1) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Feb 2011 23:58:10 +0000 Received: from [172.17.74.163] ([unknown] [64.211.20.2]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LG700CGUZW0UHS0@vms173001.mailsrvcs.net> for user@pivot.apache.org; Sun, 06 Feb 2011 17:57:37 -0600 (CST) From: Greg Brown MIME-version: 1.0 (Apple Message framework v1082) Content-type: multipart/alternative; boundary=Apple-Mail-2-901875859 Subject: Re: Class loading question Date: Sun, 06 Feb 2011 15:57:35 -0800 In-reply-to: To: user@pivot.apache.org References: <224C99B8-DAA9-483E-B4E0-30F8C252F46A@verizon.net> Message-id: X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-2-901875859 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 If I understand you correctly, you are trying to bind to variables = declared in a base class - is that correct? I thought we had coded = support for that. How are you performing the bind? Are you using the = bind() method or the Bindable interface? On Feb 6, 2011, at 3:12 PM, Roger L. Whitcomb wrote: > Okay, I see what you=92re saying. So, actually my problem is deeper = than what I thought: > What I=92m actually having trouble with (apart from the superficial = question of finding the resources, which I get now) is that I have a = =93GenericDialog=94 class with a bunch of variables, and then a subclass = =93DeleteDialog extends GenericDialog=94. In the GenericDialog = constructor (called via =93super(String)=94 from DeleteDialog = constructor), I want to load a generic dialog template which has space = for a subclass dialog part (which is named by the =93String=94 = parameter). The problem is that =93this=94 in the GenericDialog = constructor refers to the subclass variable (as it should), so none of = the @BXML annotations within GenericDialog itself get filled in (because = the only object I have is the subclass object). Even making the = variables =93protected=94 doesn=92t help. So, is there any way to = gracefully handle this situation? Do you need to see some code to see = what I=92m trying to do?? Thanks. > =20 > Roger Whitcomb | Architect, Engineering | Roger.Whitcomb@ingres.com| = Ingres | 500 Arguello Street | Suite 200 | Redwood City | CA | 94063 | = USA | +1 650-587-5596 | fax: +1 650-587-5550 > From: Greg Brown [mailto:gk_brown@verizon.net]=20 > Sent: Friday, February 04, 2011 11:34 PM > To: user@pivot.apache.org > Subject: Re: Class loading question > =20 > I wish I hadn't introduced that version of = BXMLSerializer#readObject(). :-) It seems to cause more confusion than = anything else. > =20 > Resources in Pivot behave the same as resource bundles in the JDK. If = you use the readObject(URL, Resources) signature rather than = readObject(Class, String) it will probably make more sense. Apologies = for the confusion. > =20 > G > =20 > On Feb 4, 2011, at 3:52 PM, Roger L. Whitcomb wrote: >=20 >=20 > Hi all, > Let me see if I can even ask this question = intelligently: > - I=92ve got a package hierarchy where my main program lives = in package =93a.b.c=94. In this directory I have Main.java, Main.json = (with the resources) and some =93g.bxml=94 files. > - In this main program I have a helper function that loads an = object from a =93bxml=94 file and binds to whatever object you give it. = It uses a.b.c.Main as the class and a.b.c.Main for the resources. > - There is a =93Sheet1.java=94 that loads =93sheet1.bxml=94 = (all residing in =93a.b.c=94 package) and all works fine and the @BXML = variables get set correctly. > - Now I introduce a =93a.b.c.d=94 package and want to load a = =93dialog.bxml=94 from this directory from =93Dialog1.java=94 = (a.b.c.d.Dialog class) using my same helper function (from a.b.c.Main). = First off, using a name of =93d/dialog.bxml=94 loads the file fine and I = can see it on screen, BUT none of my @BXML variables inside = =93a.b.c.d.Dialog=94 get set, and I get no errors or exceptions. > - Fine =96 I=92m thinking it=92s just a package problem, so I = copy the helper function into Dialog.java and try to use the same = resources from =93a.b.c.Main=94 and it starts giving me =93Can=92t find = resource for base name a.b.c.d.Dialog, locale en_US=94 messages. Okay, = so I have to move the resources into there too, which means more = initialization, etc., etc. > =20 > So, I guess my question is this: what is the best way to organize the = markup files and resource file(s) in this package hierarchy? And what = is the =93right=94 way to use the class names to load resources and send = to the BXMLSerializer so that my annotated variables get set correctly? = Should I always pass the same class name to the serializer (and hence = put the resources and bxml files in the same directory(ies)) as the Java = classes? If I want to put stuff in a common places (or places) where = should that be? > =20 > Am I making sense here or is more detail needed? Thanks much! > =20 > Roger Whitcomb > Architect, Engineering > Ingres Corporation > roger.whitcomb@ingres.com > =20 > PHONE +1 650.587.5596 > FAX +1 650.587.5550 > =20 > www.ingres.com > =20 > 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. > =20 > =20 --Apple-Mail-2-901875859 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 If I understand you correctly, you are trying to = bind to variables declared in a base class - is that correct? I thought = we had coded support for that. How are you performing the bind? Are you = using the bind() method or the Bindable interface?

On = Feb 6, 2011, at 3:12 PM, Roger L. Whitcomb wrote:

Okay, I see what you=92re = saying.  So, actually my problem is deeper than what I = thought:
What = I=92m actually having trouble with (apart from the superficial question = of finding the resources, which I get now) is that I have a = =93GenericDialog=94 class with a bunch of variables, and then a subclass = =93DeleteDialog extends GenericDialog=94.  In the GenericDialog = constructor (called via =93super(String)=94 from DeleteDialog = constructor), I want to load a generic dialog template which has space = for a subclass dialog part (which is named by the =93String=94 = parameter).  The problem is that =93this=94 in the GenericDialog = constructor refers to the subclass variable (as it should), so none of = the @BXML annotations within GenericDialog itself get filled in (because = the only object I have is the subclass object).  Even making the = variables =93protected=94 doesn=92t help.  So, is there any way to = gracefully handle this situation?  Do you need to see some code to = see what I=92m trying to do??  Thanks.
 Roger.Whitcomb@ingres.com| Ingres = | 500 Arguello Street | Suite 200 | Redwood = City | CA | 94063 | USA  | +1 650-587-5596 | = fax: +1 650-587-5550
From: Greg Brown = [mailto:gk_brown@verizon.net] 
Sent: Friday, February 04, 2011 = 11:34 PM
To:  
Re: Class loading = question



<= /div>= --Apple-Mail-2-901875859--