• 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
simple question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simple question


  • Subject: simple question
  • From: Michael Engelhart <email@hidden>
  • Date: Sun, 25 Sep 2005 09:12:05 -0500

Hi -

I'm sorry to bug everyone with this probably dumb question but I'm not
sure what I'm doing wrong.   I have Tiger running with WO 5.3 and
XCode 2.1.   I've tried deleting my build directory and rebuildilng
and running so I don't think the problem is a corrupted build
directory.   I think I'm just forgetting some basic tenet of
WebObjects but I can't figure out what.

So, I create a new project with a single component called
CitySearchForm which is defined in code like this:

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

public class CitySearchForm extends WOComponent {

    protected String queryString;

    public CitySearchForm(WOContext context) {
        super(context);
    }

    public String getQueryString() {
        return queryString;
    }

    public void setQueryString(String newQueryString) {
        queryString = newQueryString;
    }

    public WOComponent doCitySearch() {
		System.out.println(queryString);
        return null;
    }

}

The .wod looks like this:
CITY_SEARCH_FORM: WOForm {
}

CITY_SEARCH_SUBMIT_BUTTON: WOSubmitButton {
	action = doCitySearch;
}

QUERY_STRING_TEXT_FIELD: WOTextField {
	value = queryString;
}


I then add this component to my Main.wo in WOBuilder using the add
Custom element menu selection.   But now when I run the application I
get this error:

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

Reason:	 [<com.webobjects.appserver.WOComponent name: CitySearchForm
subcomponents: null > valueForKey()]: lookup of unknown key:
'queryString'. This WOComponent does not have an instance variable of
the name queryString or _queryString, nor a method of the name
queryString, _queryString, getQueryString, or _getQueryString

Now I know I've been away from WO for a while but I know I've done
this before and it just worked out of the box.   Did something change
in the 5.3 release or am I just forgetting some basic thing.

Thanks for any help.


Mike
 _______________________________________________
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

  • Follow-Ups:
    • AW: simple question
      • From: Helge Staedtler <email@hidden>
    • Re: simple question
      • From: Arturo PĂ©rez <email@hidden>
  • Prev by Date: Re: Why or why not use WODirectAction rather than WOComponent action, in a session based application ?
  • Next by Date: Re: simple question
  • Previous by thread: There are problems with the mail list?
  • Next by thread: Re: simple question
  • Index(es):
    • Date
    • Thread