My application frequently recreates a window which involves deleting all the subviews and adding new ones (while keeping the window open). It used to work, but now when it reloads, it fails to accept the one view I designate to the be the first view.

After the window is recreated I perform a delayed method and use

   if(firstCell!=nil)
   {   id aView = [firstCell theView];
       if([aView acceptsFirstResponder])
       {   [[self window] makeFirstResponder:aView];
       }
       else
           NSLog(@"does not accept to be responder");
   }

This used to work, but has recently stopped working. When the window displays, the view (firstCell is my object and the views are all NSTextField views) does get selected. If I tab, one of two things happens:

1. It tabs to the next view making it look like the view is partially made the first responded, but never selected

2. Other times the window freezes up with this error message

*** NSRunStorage, _NSBlockNumberForIndex(): index (4294967294) beyond array bounds (30)

which I do not recognize in my code.

---------------
John Nairn
GEDitCOM - Genealogy Software for the Macintosh
http://www.geditcom.com


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to