Cocoa Java: this class is not key value coding-compliant
Cocoa Java: this class is not key value coding-compliant
- Subject: Cocoa Java: this class is not key value coding-compliant
- From: Les Vogel <email@hidden>
- Date: Wed, 24 Sep 2003 10:19:47 -1000
In a very simple Cocoa Java application, I get the following:
2003-09-23 22:14:46.946 CurCvtr[1215] [<MyDocument 0x352ef0>
valueForUndefinedKey:]: this class is not key value coding-compliant
for the key exchangeRate.
I've tried it with Double instead of double, but all to no avail. Any ideas?
Thanks,
Les
public class MyDocument extends NSDocument
{
public double dollarsToConvert;
public double exchangeRate;
public MyDocument() {
super();
}
public MyDocument(String fileName, String fileType) {
super(fileName, fileType);
}
public String windowNibName() {
return "MyDocument";
}
public void windowControllerDidLoadNib(NSWindowController aController) {
super.windowControllerDidLoadNib(aController);
// Add any code here that needs to be executed once the
windowController has loaded the document's window.
}
public NSData dataRepresentationOfType(String aType) {
// Insert code here to create and return the data for your document.
return null;
}
public boolean loadDataRepresentation(NSData data, String aType) {
// Insert code here to read your document from the given data.
return true;
}
public void setDollarsToConvert (double dollars)
{
dollarsToConvert = dollars;
}
public void setExchangeRate (double rate)
{
exchangeRate = rate;
}
public double amountInOtherCurrency ( )
{
return dollarsToConvert / exchangeRate;
}
}
--
Les Vogel email@hidden (808) 870-0418
723 Kupulau (808) 891-8518 Fax
Kihei, HI 96753-9349 AIM: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.