Re: control delegate (NSTextField)
Re: control delegate (NSTextField)
- Subject: Re: control delegate (NSTextField)
- From: Brent Gulanowski <email@hidden>
- Date: Thu, 19 Jun 2003 02:05:38 -0400
On Wednesday, June 18, 2003, at 06:18 PM, j o a r wrote:
On Wednesday, Jun 18, 2003, at 23:19 Europe/Stockholm, Brent
Gulanowski wrote:
Also, when the delegates are connected, I get weird errors on the
console about arrays being out of bounds and such.
If your code is generating exceptions, then all bets are off...
You need to run your app in the debugger to find out where the
exceptions are taking place, and then fix that, before doing anything
else.
The delegate methods do only this:
-(BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText
*)fieldEditor {
if( [[control stringValue] isEqualToString:@"enter path here"] )
[control setStringValue:@""];
return YES;
}
-(BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor {
if( [[control stringValue] isEqualToString:@""] )
[control setStringValue:@"enter path here"];
return YES;
}
It's pure prettification, so I just turned disconnected it so I could
concentrate elsewhere. The exceptions stop happening. This is the same
app as my other post about nib loading failure -- nothing but skeleton
code. These are example errors which happen when I type in the text
fields with delegates connected; I would like to know what they mean:
2003-06-19 02:03:08.218 SCatalogue[14519] Access invalid attribute
location 0 (length 0)
2003-06-19 02:03:10.908 SCatalogue[14519] Exception raised during
posting of notification. Ignored. exception: *** NSRunStorage,
_NSBlockNumberForIndex(): index (0) beyond array bounds (0)
What is NSRunStorage?
Brent Gulanowski
--
Mac game development news and discussion
http://www.idevgames.com
_______________________________________________
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.