• 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
Re: NSSearchField crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSearchField crash


  • Subject: Re: NSSearchField crash
  • From: Thomas Davie <email@hidden>
  • Date: Mon, 7 Feb 2005 00:30:52 +0000

Hm. What string would that be, I wonder. From what I can see, NSSearchField emits "controlTextDidChange" messages. I listen to those, in order to set the state of a button, save the current search criteria in a dictionary (called 'search' in the code below), and notify other parts of the program that the user wishes to search for something. Those other parts take the data in the dictionary (currently three search keys, one being the string value of the search field) and act on them. Running queries, for example. I'm not providing NSSearchField with a pointer to anything while doing this. The backtrace indicates that the crash is happening in relation to the drawing of the searchfield. It looks like the crash involves NSSearchFieldCell, NSStringDrawingTextStorage, etc. Am I messing up memory by taking the stringValue of the search field and shipping it around? Should I copy the string first?
Don't use the controlTextDidChange message, just set the action method of the control.

Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSSearchField crash (From: Michael Rothwell <email@hidden>)
 >Re: NSSearchField crash (From: Thomas Davie <email@hidden>)
 >Re: NSSearchField crash (From: Michael Rothwell <email@hidden>)

  • Prev by Date: Re: NSSearchField crash
  • Next by Date: Re: CFDateFormatter + time zone = failure or crash
  • Previous by thread: Re: NSSearchField crash
  • Next by thread: replaceTextStorage (second text view) and undo difficulties
  • Index(es):
    • Date
    • Thread