• 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: Context menu over WebView always showing up in bottom left corner of screen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Context menu over WebView always showing up in bottom left corner of screen


  • Subject: Re: Context menu over WebView always showing up in bottom left corner of screen
  • From: Jonas Oberschweiber <email@hidden>
  • Date: Tue, 8 Aug 2006 13:27:58 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Just wanted to let you know that I just solved my problem. The event I was using to construct the new one was corrupt. I created my event from scratch and now it works like a charm.

Jonas

Am 08.08.2006 um 10:52 schrieb Jonas Oberschweiber:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

That doesn't work either. It still keeps showing up in the bottom left corner of the screen. I also tried NSMakePoint with values ranging from 0 to 100000000 and convertPoint:toView: in NSView but the position just doesn't change.

Jonas

Am 08.08.2006 um 03:34 schrieb Michael Nickerson:


On Aug 7, 2006, at 7:49 AM, Jonas Oberschweiber wrote:

Hi,

In my app, I have a WebView (subclassed) over which I want to display a context menu. To do that, I create a new NSEvent with the properties of an older one and set the location to [self frame].origin, which should make it show up in some corner of the WebView, but when I call [NSMenu popUpContextMenu:aMenu withEvent:aEvent forView:self] the menu appears in the bottom left corner of the screens. I already tried several different locations and tried to call [NSMenu popUpContextMenu:aMenu withEvent:aEvent forView:[self superview]].

Is there anybody who has had the same problem and/or knows how to solve it?

Best Regards

Jonas

You need to convert the mouse location to screen coordinates.

<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#// apple_ref/occ/instm/NSWindow/convertBaseToScreen:>


Darkshadow (aka Michael Nickerson)




-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)

iD8DBQFE2FDi/WfZICoqOucRAqhUAKCdUwAYlqJ3KXxbP9iUnKrjLQXiQwCg6oUR
GdB6zrq8HNcwsNQ68PjneB0=
=pDag
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40frozenbeetle.net


This email sent to email@hidden


-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)

iD8DBQFE2HVV/WfZICoqOucRAhKZAJ9OJbz9w/PFCs0mFHQGaEY1D4PMcwCgoeQJ
QA0ksrhsGngHlQPl8/GLjPM=
=KYHx
-----END PGP SIGNATURE-----
_______________________________________________
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


References: 
 >Context menu over WebView always showing up in bottom left corner of screen (From: Jonas Oberschweiber <email@hidden>)
 >Re: Context menu over WebView always showing up in bottom left corner of screen (From: Michael Nickerson <email@hidden>)
 >Re: Context menu over WebView always showing up in bottom left corner of screen (From: Jonas Oberschweiber <email@hidden>)

  • Prev by Date: Re: Biting off too much?
  • Next by Date: MacOSX Programming in The Netherlands
  • Previous by thread: Re: Context menu over WebView always showing up in bottom left corner of screen
  • Next by thread: Using in CoreData an SQLite database created in a non CoreData app
  • Index(es):
    • Date
    • Thread