Re: Another plea for help XCODE PROBLEM!
Re: Another plea for help XCODE PROBLEM!
- Subject: Re: Another plea for help XCODE PROBLEM!
- From: Justin Tocci <email@hidden>
- Date: Fri, 4 Jun 2004 08:19:47 -0500
import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;
import java.math.BigDecimal;
import java.util.*;
public class Xforecasting extends EOGenericRecord {
public Xforecasting() {
super();
}
public String item() {
return (String)storedValueForKey("item");
}
public void setItem(String value) {
takeStoredValueForKey(value, "item");
}
[snip]
The code above is an excerpt from my class. I guess my problem is if I
have a getter method like above then why do I need to use
>(String)xforecasting.storedValueForKey("item")?
Isn't this going around the method? To use the method I thought you did
a
>xforecasting.item()
Someone please correct me.
justin tocci
Fort Wayne, IN
On Jun 4, 2004, at 2:16 AM, Marek Wawrzyczny wrote:
Hello,
Perhaps this is something to do with the scope of your variables and
methods/functions.
session.setkitNumber((String)xforecasting.storedValueForKey("item"));
To access "item" in xforecasting one of the following should be true
about the class xforecasting is an instance of:
a) (not ideal) You have a public instance variable called item
b) (preferred) You have a public getter and setter functions of the
form:
i) public SomeObject getItem() {}
ii) public void setItem(SomeObject x) {}
In both these cases, storedValueForKey("xxx")) should work.
Cheers,
Marek
On 04/06/2004, at 06:35, Justin Tocci wrote:
DRAT!!!
The solution I just sent in isn't working now. For some reason Xcode
won't let it get past debug now, though I tested it and it worked?!?!?
I know how to do a clean all targets, but Xcode is really finicky for
me and this doesn't always help. Can anyone suggest any different ways
of getting it to work when you think your code is right and it turns
out Xcode is just stuck in a glitch?
the code that works now is:
Session session = (Session)session();
session.setkitNumber((String)xforecasting.storedValueForKey("item"));
which is fine, but after writing a method in my Xforecasting class and
trying (xforcasting.methodName()) it worked once and won't work again.
What gives?
And now I get the feeling (xforecasting.item) should have worked too,
but it didn't. I am guessing it is the same glitch. Or am I all wet?
The error I get is "cannot resolve symbol : item"
Thanks
justin tocci
fort wayne, in
_______________________________________________
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.
Marek Wawrzyczny
software engineer
-------------------------->
ish group pty ltd
http://www.ish.com.au
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400 fax +61 2 9660 7400
_______________________________________________
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.