On Dec 23, 2010, at 10:59 AM, Ramsey Gurley wrote:
On Dec 17, 2010, at 4:26 PM, Jesse Tayler wrote:
Oh thanks - !
On Dec 17, 2010, at 3:53 PM, Ramsey Gurley wrote:
I didn't replicate the ERCore templates identically. I don't have
the static variables wrapped in the Key interface. You should not
need to regenerate anything under ERCore.
To init() an object nicely, I thought I might should say:
setAuthor(User.clazz.currentUser(editingContext()));
Which doesn't resolve for me,
Doesn't resolve? Do you have methods like
public User currentUser(EOEditingContext ec) {
return (User) ERCoreBusinessLogic.actor(ec);
}
public void setCurrentUser(User user) {
ERCoreBusinessLogic.setActor(user);
}
In your user clazz?
so I wrote it out like this instead:
setAuthorRelationship((User)
((User
)ERCoreBusinessLogic.actor()).localInstanceIn(editingContext()));
Which seems to work in testing, but I wanted to adopt the most
modern approach since everything on this project is new.
You are implementing ERCoreUserInterface on your user entity and
you are setting it on the thread local with
ERCoreBusinessLogic.setActor(...)? If you can post the stack
trace, I may be able to tell you why you are crashing.
I setup the actor in the session correctly... _I think_
I gett his error, no crash, I was under an impression that it would
resolve once I got my template in order, but you suggest that the
Core should be ok, so I look forward to insight on this if you have--
Dec 17 16:04:10 WOMan[59945] ERROR
er.corebusinesslogic.ERCoreBusinessLogic - Error while setting
getting actor's preferences: java.lang.RuntimeException:
ERXUtilites: localInstancesOfObjects: Array is null
RuntimeException: ERXUtilites: localInstancesOfObjects: Array is null
at
er
.extensions
.eof
.ERXEOControlUtilities
.localInstancesOfObjects(ERXEOControlUtilities.java:93)
That sounds like you haven't implemented your preferences stuff
correctly. Your user _class_ should have methods similar to:
I forgot to add...
public class User extends _User implements ERCoreUserInterface
public static final String PREFERENCES = "preferences";
public void newPreference(EOEnterpriseObject pref) {
addObjectToBothSidesOfRelationshipWithKey(pref, PREFERENCES);
}
public void setPreferences(NSArray array) {
takeStoredValueForKey(array.mutableClone(), PREFERENCES);
}
public NSArray preferences() {
return (NSArray) storedValueForKey(PREFERENCES);
}
Ramsey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com
This email sent to ram...@xeotech.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com