• 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: Issue with NSView setFrame
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with NSView setFrame


  • Subject: Re: Issue with NSView setFrame
  • From: Dave Keck <email@hidden>
  • Date: Mon, 12 Oct 2009 11:59:25 -1000

> Thank you, that helps a lot. How would I get a reference to the previous
> NSView object?

On your mouseEntered, send a message to some controlling object - let's call
it MyViewController:

 - (void)mouseEntered:(NSEvent *)theEvent
 {
     [myViewController mouseDidEnterView: self];
 }

 - (void)mouseExited:(NSEvent *)theEvent
 {
     [myViewController mouseDidEnterView: nil];
 }

... and in MyViewController's mouseDidEnterView:

 - (void)mouseDidEnterView: (NSView *)newMouseOverView
 {
     if (mouseOverView)
     {
         [[mouseOverView animator] setFrame: oldMouseOverViewFrame];
     }

     mouseOverView = newMouseOverView;

     if (mouseOverView)
     {
         oldMouseOverViewFrame = [mouseOverView frame];
         [[mouseOverView animator] setFrame: magnifiedFrame];
     }
 }

Untested, etc.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Issue with NSView setFrame
      • From: PCWiz <email@hidden>
References: 
 >Issue with NSView setFrame (From: PCWiz <email@hidden>)
 >Re: Issue with NSView setFrame (From: Dave Keck <email@hidden>)
 >Re: Issue with NSView setFrame (From: PCWiz <email@hidden>)

  • Prev by Date: Re: Thread Safety - A Theoretical Question
  • Next by Date: Re: Thread Safety - A Theoretical Question
  • Previous by thread: Re: Issue with NSView setFrame
  • Next by thread: Re: Issue with NSView setFrame
  • Index(es):
    • Date
    • Thread