Re: Custom Class Problems
Re: Custom Class Problems
- Subject: Re: Custom Class Problems
- From: Ken Anderson <email@hidden>
- Date: Fri, 17 Feb 2006 07:24:50 -0500
OK David, so it seems like you have a type issue somewhere. Can you
please post:
1. The section of Label.plist that deals with the part relationship
2. The code that's calling setPart.
Is #2 being done with KeyValue Coding, or by calling the method? Or
maybe by addObjectsToBothSidesOfRelationshipWithKey ? It seems like
you've having a problem where the method signatures don't match.
Ken
On Feb 17, 2006, at 1:22 AM, David Avendasora wrote:
I've dug through the .plist files and everything looks right.
Here's the code that is generated (I've added a println() to it so
I can see when it executes:
public com.bestmaid.erp.client.Part part() {
return (com.bestmaid.erp.client.Part)storedValueForKey
("part");
}
public void setPart(com.bestmaid.erp.client.Part aValue) {
System.out.println("setPart");
takeStoredValueForKey(aValue, "part");
}
I get *nothing* in the console.
If I simply change the class from com.bestmaid.erp.client.Part to
EOGenericRecord below, it works.
public EOGenericRecord part() {
return (EOGenericRecord)storedValueForKey("part");
}
public void setPart(EOGenericRecord aValue) {
System.out.println("setPart");
takeStoredValueForKey(aValue, "part");
}
The Part is correctly set, and I get "setPart" in the console.
I am a newbie. Is there something wrong with the
"com.bestmaid.erp.client.Part" ?
Dave
On Feb 16, 2006, at 3:10 PM, Ken Anderson wrote:
David,
In general, I find that weird problems warrant a model review -
that would be my first task. I would examine the model plist
files directly for Label & Part, to make sure that all of the java
classes are correct (sometimes you might not be showing an
important column in EOModeler).
If that all looks OK, I would add some code to the setPart method
that prints out the fact that it's setting the part and the part's
details. I would then, after setting the value, inspect it.
Good luck!
Ken
On Feb 16, 2006, at 10:05 AM, David Avendasora wrote:
Is there anyone out there with any ideas on this one?
If I have just the one custom class everything works fine. It
doesn't matter if I use EOGenerator or EOModeler to generate the
java files. As soon as I add the custom Part class, I can no
longer sucessfully call addPart(Part value) in the Label custom
class. It just fails with no message anywhere.
I can, however, add a Part to any other non-custom class in my
application.
Thanks,
Dave
On Feb 15, 2006, at 10:27 AM, David Avendasora wrote:
Hi all,
I am building a D2JC application and up until now I have been
simply using EOGenericRecord and Assistant to build most of the
back-end data management functionality.
I'm now adding custom classes to handle the business logic. My
first custom class (Label) worked just fine on it's own and I
successfully added a new method an called it from the UI. Now I
want to add logic to a related class (Part) but as soon as I
convert it to a custom class I can no longer set the Part
relationship of Label. I get no error messages in the app, in
XCode or in the console.
EOGenerator updated the Label.setPart(EOGenericRecord aValue)
method to Label.setPart(com.bestmaid.erp.client.Part aValue) but
it just doesn't work and I get no error in the console. I've
cleaned, rebuilt the index, deleted the build directories to be
sure that I'm getting a brand-new build, but it just doesn't work.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40avendasora.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com
This email sent to email@hidden
_______________________________________________
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