Hi List,
Consider DateTimeField as a reusable component that displays / admits
an NSCalendarDate value.
 
In a wod file, it may appear like
 
ScheduledTime: DateTimeField {
 value = scheduledTime;
 timeZone = session.preferedTimeZone;
 editable = isEditing;
 language = session.language;
......
}
 
The component takes a value from binding and presents the value as a value set
(year, month, day,... in specified language/format/locale ), and takes the updated
value set to update the binded value accordingly.
 
Now suppose I put a DateTimeField into a component, say AdminBox, and embed
the AdminBox in an EventEditor page. Then in AdminBox.wod, Date Field may
be defined like
 
ScheduledTime: DateTimeField {
 value = ^scheduledTime;
 timeZone = session.preferedTimeZone;
 editable = ^isEditing;
 language = session.language;
......
}
 
the operator ^ means that its following keyPath is relative to the parent component
(in our case, AdminBox is supposed to have bindings scheduedTime and isEditing)
 
The trouble that I encountered is that when form submitted, the case where direct
bindings are used worked as expected, but the latter case (using ^)yields exception:
 
*** object is unsettable for keyPath ^scheduledTime...
 
Replace DateTimeField with something simpler like WOTextField, both cases worked
just fine. This is understandable: In my DateTimeField, I used
[self setValue: _date forBinding: @"value"]
to set the value with the nornalized date object. But
-(void)setValue:forBinding:
doesn't work well with the operator ^
 
Any ideas? Thanks in advance
 
 
 
 
 
 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to