riddle me this (Nulls and committedSnapshotValueForKey)
riddle me this (Nulls and committedSnapshotValueForKey)
- Subject: riddle me this (Nulls and committedSnapshotValueForKey)
- From: Theodore Petrosky <email@hidden>
- Date: Wed, 01 Aug 2012 08:01:51 -0700 (PDT)
if (committedSnapshotValueForKey(PROJECT_DESCRIPTION_KEY) == null) {
NSLog.out.appendln(" == null ****** ");
setOldPD("Null");
} else {
NSLog.out.appendln(" != null " + committedSnapshotValueForKey(PROJECT_DESCRIPTION_KEY));
setOldPD("sdsd");
//setOldPD((String) committedSnapshotValueForKey(PROJECT_DESCRIPTION_KEY));
}
if the old value is null I want to print something. but my error message is driving me to riddles.
ERMODInspectPage - Configuration: EditProject - != null <com.webobjects.foundation.NSKeyValueCoding$Null>
if the value was null why did this fall through to the else logic?
API:
Object er.extensions.eof.ERXEnterpriseObject.committedSnapshotValueForKey(String key)
Determines what the value of the given key is in the committed snapshot
Parameters:
key to be checked in committed snapshot
Returns:
the committed snapshot value for the given key
it says it returns a value, but when NULL returns com.webobjects.foundation.NSKeyValueCoding$Null
And if when there is a value it returns: != null class class java.lang.String
I guess I don't understand how to check for null.
Ted
_______________________________________________
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