• 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: re Hiding controls and another question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: re Hiding controls and another question


  • Subject: Re: re Hiding controls and another question
  • From: Graeme Hiebert <email@hidden>
  • Date: Fri, 1 Mar 2002 21:45:15 -0800

On Friday, March 1, 2002, at 09:14 PM, John Saccente wrote:

Not quite yet! :o)

I think this:

if ( ![gViewDict objectForKey:self] )

should be

if ( ![gViewDict objectForKey:[self description]] )

Thanks. You caught a glimpse of my first failed attempt. I forgot to fix one instance apparently. :^)


Anyway, one possible problem might be that if the superview is destroyed, the detached subview will be left floating in limbo, no? Plus, any messages sent to the hidden subview will go to the proxy and will be lost (like a setStringValue: or something.) Perhaps you'd want a special NSView subclass for your proxy object which was aware of its disembodied doppelganger and would forward messages accordingly?

True, it's not perfect. Messages should still go to the original object though, I think, unless they were going through the responder chain. Like you say, using a special View class instead of a global dictionary would pretty much take care of the biggest issues: memory management.

-g
_______________________________________________
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: re Hiding controls and another question
      • From: Andy Lee <email@hidden>
    • Re: re Hiding controls and another question
      • From: John Saccente <email@hidden>
References: 
 >Re: re Hiding controls and another question (From: John Saccente <email@hidden>)

  • Prev by Date: Re: re Hiding controls and another question
  • Next by Date: Re: Cocoa, Java vs. Objective-C
  • Previous by thread: Re: re Hiding controls and another question
  • Next by thread: Re: re Hiding controls and another question
  • Index(es):
    • Date
    • Thread