Validating a non-optional transient Core Data property - it can be erased?!
Validating a non-optional transient Core Data property - it can be erased?!
- Subject: Validating a non-optional transient Core Data property - it can be erased?!
- From: Arthur C. <email@hidden>
- Date: Wed, 12 Nov 2008 22:31:02 +0100
- Importance: Normal
In my Core Data database I have a property called 'target' (double), which is transient and required (i.e. 'non-optional' in the model). It is dependent on another variable 'color'; so for each color there is a 'target'. As I want to show only the target for the selected color, I use this transient variable. It is used as well to set a new target (from the table view) for the selected color.
In the model I have imposed a minimum, maximum and default value for 'target', and the table column is set to validate immediately. This works correctly. However, the feedback in the validation sheet is rather minimal.
So, first question: how can I change the validation message, to include e.g. required range etc.?
Another thing is, I have found that I can erase the value in the table view, without a validation error getting triggered! A nil-value is not acceptable. The easiest solution I've found is just to make it persistent (non-transient). But I think 'non-optional' should mean 'required', meaning the value should never be nil... especially since I gave a min, max and default value.
Is there a better way to do this while keeping the variable transient?
Thanks in advance,
Arthur
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden