• 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
Caret Notation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Caret Notation


  • Subject: Caret Notation
  • From: Steven Mark McCraw <email@hidden>
  • Date: Fri, 29 Jun 2007 10:50:23 -0400

Hi all,

I've always thought that using caret notation was a good idea when creating reuseable components, but it only seems to work for me about half the time, so I'm not sure I fully understand it.

I have a component that has a textfield whose "default" binding should be inherited from it's parent component bindings:

<wo:textfield value = "$date" id = "$id" size="~format.length()" dateformat = "$format" default="^default"/>

This textfield is embedded within a component named TextFieldCalendar.  Here's my usage of TextFieldCalendar in another component:

<wo:TextFieldCalendar date = "$maxBidClosingDate" default = "Bid Closing Before"/>

When I run the application, I get the following exception:

Jun 29 10:44:50 LDC[11001] (ERXNSLogLog4jBridge.java:41) WARN  NSLog  - <er.extensions.ERXDirectActionRequestHandler>: Exception while handling action named "advancedSearch" on action class "LDC" :com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [<TextFieldCalendar name: TextFieldCalendar subcomponents: null > takeValueForKey()]: attempt to assign value to unknown key: 'default'.
This WOComponent does not have an instance variable of the name default or _default, nor a method of the name setDefault or _setDefault
[2007-06-29 10:44:50 EDT] <WorkerThread10> com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [<TextFieldCalendar name: TextFieldCalendar subcomponents: null > takeValueForKey()]: attempt to assign value to unknown key: 'default'.
This WOComponent does not have an instance variable of the name default or _default, nor a method of the name setDefault or _setDefault
at com.webobjects.appserver.WOComponent.handleTakeValueForUnboundKey(WOComponent.java:1580)
at com.webobjects.foundation.NSKeyValueCoding$Utility.handleTakeValueForUnboundKey(NSKeyValueCoding.java:568)
at com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.setValueInObject(NSKeyValueCoding.java:925)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1293)
at com.webobjects.appserver.WOComponent.takeValueForKey(WOComponent.java:1550)
...

I thought that the point of using caret notation was that you didn't have to declare a local variable called "default" in the reuseable component.  Am I off track here?  Has anyone else noticed this behavior?

Thanks,
Mark
 _______________________________________________
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: Caret Notation
      • From: Jean-François Veillette <email@hidden>
  • Prev by Date: Re: How to preserve all the states of stateful components?
  • Next by Date: Re: Caret Notation
  • Previous by thread: Re: Pretty printing?
  • Next by thread: Re: Caret Notation
  • Index(es):
    • Date
    • Thread