• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with Resuable Component and ^ "operator"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with Resuable Component and ^ "operator"


  • Subject: Problem with Resuable Component and ^ "operator"
  • From: "YL" <email@hidden>
  • Date: Fri, 30 Jun 2006 18:51:12 -0600

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with Resuable Component and ^ "operator"
      • From: Art Isbell <email@hidden>
    • Re: Problem with Resuable Component and ^ "operator"
      • From: Art Isbell <email@hidden>
  • Prev by Date: Re: JavaMail Props Not Being Set
  • Next by Date: Re: Problem with Resuable Component and ^ "operator"
  • Previous by thread: Host in WO URL (was "No Instance available" message)
  • Next by thread: Re: Problem with Resuable Component and ^ "operator"
  • Index(es):
    • Date
    • Thread