• 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
NSOutlineView meta-problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView meta-problem


  • Subject: NSOutlineView meta-problem
  • From: David Wood <email@hidden>
  • Date: Wed, 11 Jun 2003 11:03:47 -0400

Problem: Every time I would try to edit the value in an NSOutlineView, the text would outline and highlight, the selection point would appear, and my program would show every indication of being ready to accept text. But every time I did so, and then moved off that text (clicking elsewhere, hitting return, etc.), the text would revert.

Solution: C, even Objective-C, is case-sensitive, and ONE letter in my NSOutlineViewDataSource's outlineView:setObjectValue:forTableColumn:byItem was the wrong case. Consequently, it never got called by the NSOutlineView, even though the outlineView:shouldEditTableColumn:item: said it should. Once I figured this out, it worked exactly as I expected it to. I feel light and clever for figuring this out myself, yee-ha, hoody-hoo, &c.

But this begets another question of MUCH broader scope...

Another occasion when I was building this thing, I used takeValue:forKey: to get into a set of accessors on my data source's data structure, and the system groused because it couldn't find appropriate accessor methods in the referenced objects for the key I was working with -- in this case, I had a setcharacter instead of setCharacter because the key was character and I figured it wanted a method named "set<key>". Nope, it wanted traditional cocoaCaps.

In the case of the takeValue:forKey:, Cocoa complained about not finding an appropriate method to call. In the case of outlineView:setObjectValue:forTableColumn:byItem, it didn't complain, even when outlineView:shouldEditTableColumn: said it was editable. Isn't this inconsistent behavior?

Could it even be a bug, or do I simply wish that it was?

--David http://skipjack.bluecrab.org/~dwood

"The tingling fresh coffee which brings you exciting new cholera,
mange, dropsy, the clap, hard pad, and athlete's head. From the house
of Conquistador."
-Monty Python, episode 24
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSOutlineView meta-problem
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Thread question (volatile needed?)
  • Next by Date: Re: troubling article
  • Previous by thread: Re: Dragging Rect
  • Next by thread: Re: NSOutlineView meta-problem
  • Index(es):
    • Date
    • Thread