Re: help needed because of 5.3
Re: help needed because of 5.3
- Subject: Re: help needed because of 5.3
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 4 Aug 2005 12:38:45 -0400
Hi Brian,
Something like this.....
public Number resultID() {
return (Number)storedValueForKey("resultID");
}
public void setResultID(Number value) {
takeStoredValueForKey(value, "resultID");
}
usage:
int result = myEO.resultID().intValue();
result++;
result = 2 + result;
myEO.setResultID( new Integer( result ) );
I recommend this book for learning and reference. It's very easy to use.
http://homepage.mac.com/kelleherk/iblog/C981504028/E1931110183/
index.html
Regards,
-Kieran
________________________________________________________________
Blog: http://webobjects.webhop.org/
On Aug 4, 2005, at 10:45 AM, Anjo Krank wrote:
Actually that code has one error in every line (except for the ones
with only a brace)... you really need to read a Java book first...
Cheers, Anjo
Am 04.08.2005 um 15:28 schrieb brian day:
Hi,
Im sure all of you know about WO 5.3's inability to generate the java
files from EOModeler due to missing templets if your not upgrading
from 5.2, if you don't trust me. I have been able to generate my own
so far but now i need an int. I need to put a int into the column
resultID and i need to be able to return it. Here is my code:
public String resultID() {
return (int)storedValueForKey("resultID");
}
public void setresultID(int value) {
takeStoredValueForKey(value, "resultID");
}
it is the standard send and return String, but changed to int
I get the error takeValueForKey(java.lang.Object,java.lang.String) in
com.webobjects.eocontrol.EOCustomObject cannot be applied to
(int.java.lang.String)
Would anyone send me the lines of code to add to my .java file?
thanks
brian
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
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