NSKeyValueCoding$UnknownKeyException error that is beyond me
NSKeyValueCoding$UnknownKeyException error that is beyond me
- Subject: NSKeyValueCoding$UnknownKeyException error that is beyond me
- From: Ray Ackland <email@hidden>
- Date: Sat, 15 Feb 2003 16:55:13 +1300
I am new to Web Objects, but I have done my best to figure out this
problem, but assume it is just one of those bits of knowledge you pick
up from other people.
I have created a basic Web Application, with only the standard
structure - with the exception of adding JDBC and one EOModel.
I then use WO Builder to create a couple of keys (just test strings)
and add the necessary code to give the strings a value.
I link the values in WO Builder and run the app. Everything goes ok.
However, when I add more variables, or even just change the name of one
(relinking in WO B) and run, I get an error message:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [
valueForKey()]: lookup of unknown key: 'name4'. This WOComponent does
not have an instance variable of the name name4 or _name4, nor a method
of the name name4, _name4, getName4, or _getName4
If I change the name of the variable back, it works again.
To complicate things, sometimes it works and others not. The new
variable always shows up in WO Builder, available to be linked. I have
also tried with accessor methods without any effect.
I am really stuck with this, and would help any suggestions. Here is my
main.java file if that would help.
//
// Main.java: Class file for WO Component 'Main'
// Project test
//
// Created by raya on Sat Feb 15 2003
//
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;
public class Main extends WOComponent
{
public String name1, name2, name4;
public int aNumber;
public Main(WOContext context)
{
super(context);
name1 = "a";
name2 = "b";
name4 = "c";
aNumber = 3;
}
}
Thanks,
Ray.
_______________________________________________
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.