• 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
NSDictionary, EOComboBoxController, and EOAssociation subclassing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDictionary, EOComboBoxController, and EOAssociation subclassing


  • Subject: NSDictionary, EOComboBoxController, and EOAssociation subclassing
  • From: William Butler <email@hidden>
  • Date: Mon, 27 Jan 2003 09:23:44 -0500

I am trying to get EOComboBoxController to work with an NSDictionary, such that the values are displayed to the user but it is the key that is read from and stored to the database according to the selected value. One can override newAssociation in EOComboBoxController to have it use the "SelectedIndex", "SelectedTitle" or "SelectedObject", but neither of these is what I need.

I work in the healthcare field, where there many many grading schemes (I='Stubbed toe without abrasion', Ib='Stubbed toe with epidermis abrasion'...etc--you get the picture). I store the NSDictionaries in userInfo() for each EOAttribute. It was pretty easy to get it to work with html D2W. Out of the box D2JC wants you to use to use a to-one relationship for this, but would entail large numbers of entities for me since many of my fields reflect a grading scheme, so I'd rather use the existing NSDictionaries. One could probably override many accessor methods in the client side enterprise objects to do this, but this seems clunky to me.

So my understanding is the D2JC 'wants' you to override EOValueSelectionAssociation to do this, but there isn't enough documentation on how to do it nor are there examples. I tried it by overriding setValueForAspect and valueForAspect, but this caused the client side program to dump with a 'Bus error' message.

Does anyone else have any ideas on how to do this? I'm coming at things from the WO side, so EOAssociation is a new concept for me. It may be that folks coming from the Cocoa side are fluent with this problem.

Thanks,

Bill Butler
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSDictionary, EOComboBoxController, and EOAssociation subclassing
      • From: Brent Shank <email@hidden>
  • Prev by Date: Re: Web Development Concept question
  • Next by Date: Tomcat/deploy license
  • Previous by thread: Re: Web Development Concept question
  • Next by thread: Re: NSDictionary, EOComboBoxController, and EOAssociation subclassing
  • Index(es):
    • Date
    • Thread