• 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: removeFromSuperview crash - please help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removeFromSuperview crash - please help


  • Subject: Re: removeFromSuperview crash - please help
  • From: Jacob Lukas <email@hidden>
  • Date: Sat, 6 Nov 2004 12:33:52 -0800

- (BOOL)resignFirstResponder
{
	if ([[self string] length] == 0)
	{
		// If there is nothing in the text view, delete the
notecard:

[[self superview] removeFromSuperview];
How about:
		[[[[self superview] retain] autorelease] removeFromSuperview];
		return YES;
	}
	return [super resignFirstResponder];
}

// Remove all the cards from the view
- (void)clear
{
	id sv;
	NSEnumerator *enumerator = [[self subviews]
objectEnumerator];
	while (sv = [enumerator nextObject])
	{
		if ([sv textView] == [[sv window] firstResponder])
			[[sv window] makeFirstResponder:nil];
		[sv removeFromSuperview];
Similarly,
		[[[sv retain] autorelease] removeFromSuperview];
	}
}

Jacob

_______________________________________________
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


  • Follow-Ups:
    • Re: removeFromSuperview crash - please help
      • From: Keith Blount <email@hidden>
References: 
 >removeFromSuperview crash - please help (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: Newbie: cannot find method
  • Next by Date: Re: Newbie: cannot find method
  • Previous by thread: removeFromSuperview crash - please help
  • Next by thread: Re: removeFromSuperview crash - please help
  • Index(es):
    • Date
    • Thread