Core Data Bindings Issue
Core Data Bindings Issue
- Subject: Core Data Bindings Issue
- From: "Frank D. Engel, Jr." <email@hidden>
- Date: Wed, 18 Aug 2010 21:00:35 -0400
Hi,
Hoping this is something simple that I'm missing...
I have a controller class which is represented as a simple object
(cube icon) in Interface Builder. This class has an "id" field to
which I assign various instances of core data entities (represented by
a subclass of NSManagedObject by selecting them in an NSBrowser whose
delegate is the controller class.
I then have an NSSlider and an NSCheckbox which both have their value
bindings bound to the same field of the selected object, via the
controller class; in other words:
@interface MyBrowser : NSObject
{
id selectedWhatever;
}
- (id)selectedWhatever;
- (void)setSelectedWhatever:(id)whatever;
Then the "value" bindings of the NSSlider and NSCheckbox are both
"selectedWhatever.someField".
The problem I am having is that if I move the slider, the value of the
field does not change right away, but if I select something else and
then select the modified entity again (changes selectedWhatever to
something else and back), the field shows the modified value.
It almost seems as if the slider is not sending updates to the entity
until the entity is about to change?
Similarly, if I edit the value in the text field, the slider does not
move until I select something else then come back.
How can I get the text field and slider to update in sync with each
other?
If it helps, the class being used for the "selectedWhatever" values
has the field defined as:
@property float someField;
-----------------------------------------------------------
Frank D. Engel, Jr. <email@hidden>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten
Son, that whosoever believeth in him should not perish, but have
everlasting life.
$
_______________________________________________________
Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
http://www.doteasy.com
_______________________________________________
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