Re: NSSearchField crash
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