Re: CoreData min and max entity settings
Re: CoreData min and max entity settings
- Subject: Re: CoreData min and max entity settings
- From: Tony Becker <email@hidden>
- Date: Tue, 31 Jul 2007 16:41:31 -0400
This is doing what it should, I think, but maybe not what you want it
to do...
On Jul 31, 2007, at 1:58 PM, Steve Israelson wrote:
I have a CoreData app that has an entity in its data model to type
float.
I have entered 100 for the min value and 1000 for the max value in
the data model editor.
You might want to consider also setting a default value.
This works fine.
When I run the app and enter a value of less than 100 I get a
generic error dialog stating "Value less than minimum".
As expected - the data is outside the limits you have set.
Model stored in directory <project>.xcdatamodel/ as two
binary .plists layout and elements, not searchable (and gives svn
head aches - no merging)
When re-compiled, you'll get a <project>.mom file, in the build
directory (bundle) which is XML plist and you'll find the min/max
values in there.
Now, later, I find I want the minimum relaxed to 1.
So, in the model editor I set the min value to 1.
Rebuild, and run the app - new .mom file required.
I run the app, and the min value remains 100.
Are you saying the value is still 100 (which it should be), or that
you can't enter a number less then 100 (assuming a model change with
min == 1)
I have tried deleting the prefs file, a full from scratch build,
deleting the whole data model and re-entering it from scratch using
the same entity names and still it is limited to a minimum of 100.
As always, may sure you're running the new (re-compiled) version,
and not from a sym link pointing to an old version (like from the dock)
Make sure model was saved (Apple-S) - there are a few cases where
the UI doesn't update - like when you tab or hit enter. Manually do
Apple+S
I have scoured my few lines of code to see if there is a check for
"100.0", but there is nothing even closely related.
Subtly, it's a value in the .mom file, interpreted by the framework.
I have the edit field bound to a singleton entity instance (object
controller) and nothing else touches that entity.
Is there some sort of cache somewhere that core data is using?
Without a cache, how is it even possible for this to happen?
_______________________________________________
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
_______________________________________________
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