• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Object property initialization problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Object property initialization problem


  • Subject: Object property initialization problem
  • From: Randall Perry <email@hidden>
  • Date: Tue, 20 Apr 2004 17:41:58 -0400

Got a Direct Action that calls a component page, ResultPage, passing it a
EOGenericRecord object, CustView, that's populated with data.

Am able to access properties of the CustView object in the component (via
.wod file). But need to access a property of the object in a method in
ResultPage.java.

So, tried to access it and got 'Cannot resolve symbol' error. Thought ok, so
I need to create a dummy instance of the class object because the compiler
doesn't know it's going to be set by the Direct Action, so I created it.

    public CustView custInfo = new CustView();
    String custDir = "/Users" + custInfo.userName;

Then I got the same error trying to access the object property 'userName'.
So tried initializing userName to an empty string but couldn't find a way to
do it without error:

    public CustView custInfo = new CustView();
    custInfo.setUserName("");

2nd line above generates error "<identifier> expected"


Any help is appreciated.



--
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Object property initialization problem
      • From: Jonathan Rochkind <email@hidden>
    • Re: Object property initialization problem
      • From: Arturo Perez <email@hidden>
  • Prev by Date: Re: EditingContext problem
  • Next by Date: Re: Object property initialization problem
  • Previous by thread: RE: EditingContext problem
  • Next by thread: Re: Object property initialization problem
  • Index(es):
    • Date
    • Thread