• 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
Little starter help with instance and action of a WOConponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Little starter help with instance and action of a WOConponent


  • Subject: Little starter help with instance and action of a WOConponent
  • From: Webobjects <email@hidden>
  • Date: Fri, 18 Aug 2006 08:38:45 -0700 (PDT)
  • Organization: Downtown Development Authority

Hello,

I have been away from WO for sometime and I picked it up again today.
I am having a problem that any instance variable or method I add using
WOBuilder to my Main component can not be found during runtime, but I
see the method and instance code add to main.java . Note that the access
level of the Person class is public,
the instance variable aPerson in Main.java is public and the method
addPerson in Main.java is public.

Here is the errors I am getting

For a instance variable
--------------------------------------------------------
Error:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [
valueForKey()]: lookup of unknown key: 'aPerson'. This WOComponent does
not have an instance variable of the name aPerson or _aPerson, nor a
method of the name aPerson, _aPerson, getAPerson, or _getAPerson

Reason:
[<Main name: Main subcomponents: null > valueForKey()]: lookup of
unknown key: 'aPerson'. This WOComponent does not have an instance
variable of the name aPerson or _aPerson, nor a method of the name
aPerson, _aPerson, getAPerson, or _getAPerson



------------------------------------------------------------------------------------------


or if I do not used the instance variable in the Main component and just
have a form with a addPerson action I get :

Error:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [
valueForKey()]: lookup of unknown key: 'addPerson'. This WOComponent
does not have an instance variable of the name addPerson or _addPerson,
nor a method of the name addPerson, _addPerson, getAddPerson, or
_getAddPerson

Reason:
[<Main name: Main subcomponents: null > valueForKey()]: lookup of
unknown key: 'addPerson'. This WOComponent does not have an instance
variable of the name addPerson or _addPerson, nor a method of the name
addPerson, _addPerson, getAddPerson, or _getAddPerson


my main.java code

import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;


public class Main extends WOComponent {
public Person aPerson;

public Main(WOContext context) {
super(context);
//aPerson = new Person();
}

public WOComponent addPerson()
{
//aPerson = new Person();
return null;
}

}


Any ideas…..

Thank you,

Richard Whittaker

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: RE Little starter help with instance and action of a WOConponent
  • Next by Date: Re: RE Little starter help with instance and action of a WOConponent
  • Previous by thread: Re: RE Little starter help with instance and action of a WOConponent
  • Next by thread: RE Found the problem Project Target Setting
  • Index(es):
    • Date
    • Thread