• 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: control delegate (NSTextField)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: control delegate (NSTextField)
      • From: Daryn <email@hidden>
    • Re: control delegate (NSTextField)
      • From: j o a r <email@hidden>
References: 
 >Re: control delegate (NSTextField) (From: j o a r <email@hidden>)

  • Prev by Date: crash when loading nib
  • Next by Date: sudden linkage problem
  • Previous by thread: Re: control delegate (NSTextField)
  • Next by thread: Re: control delegate (NSTextField)
  • Index(es):
    • Date
    • Thread