mvnForum Homepage Welcome Guest  | Guest Setting  |  Register  |   Login
  Search  
Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help


»

No member browsing this thread
Thread Status: Active
Total posts in this thread: 5
Post new Thread
Author
Previous Thread This topic has been viewed 3273 times and has 4 replies Next Thread
Male Averain
Stranger
Member's Avatar


Joined: Nov 13, 2009
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: HELP WITH MACSWORD

I was definitely seeing the earlier context menu (with "Search in Spotlight" in it). I was able to get the context menus you show by downloading the code and commenting out:

if([event type] == NSRightMouseDown)

in menuForEvent inside of ModuleViewController.m. In debug I had previously noticed that my Ctrl-Click was sending LMouseDown to this event handler.
[Nov 13, 2009 1:39:41 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male mdbergmann
Inventory
Member's Avatar

Germany
Joined: Jun 12, 2008
Post Count: 640
Status: Offline
Reply to this Post  Reply with Quote 
Re: HELP WITH MACSWORD

There is a debug log in this method -menuForEvent:. It always says:

Fri Nov 13 23:59:11 2009 DEBUG [MacSword] [ModuleViewController -menuForEvent:] NSEvent: type=RMouseDown loc=(560,537) time=58551.7 flags=0x100 win=0x0 winNum=1308 ctxt=0x1288b evNum=1715 click=3 buttonNumber=1 pressure=0

here when using my mouse.

Hmm, hold on, indeed when used on a Laptop with Ctrl-Click a LMouseDown is sent.
The question is whether this is a bug in Mac OSX. But even if so, there might be a work around.

@Clerical: do you use Ctrl-Click on a Laptop?
[Nov 13, 2009 5:10:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male mdbergmann
Inventory
Member's Avatar

Germany
Joined: Jun 12, 2008
Post Count: 640
Status: Offline
Reply to this Post  Reply with Quote 
Re: HELP WITH MACSWORD

Commenting out this line brings brings the right context menu always.
But I'm wondering whether there might be any other side effects.
[Nov 13, 2009 5:12:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male Averain
Stranger
Member's Avatar


Joined: Nov 13, 2009
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: HELP WITH MACSWORD

According to the postings at http://www.mackb.com/Uwe/Forum.aspx/mac-hardware/1240/Right-click-mouse it seems that it isn't a bug in OSX but rather sets the left-click and then an NSControlKeyMask flag. That is probably correct and if you have a multi-button mouse then it works right, but I'd always thought of Ctrl-Click as being the equivalent of right-click, which really it isn't.

On my laptop I set the Secondary Tap on the Trackpad and it correctly sends the RMouseDown event.

I agree with you about the side effects. What if you changed the if statement to be:

(([event type] == NSRightMouseDown) ||
(([event type] == NSLeftMouseDown)&&([event modifierFlags]&NSControlKeyMask)))

Would that work?
[Nov 13, 2009 6:47:49 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male mdbergmann
Inventory
Member's Avatar

Germany
Joined: Jun 12, 2008
Post Count: 640
Status: Offline
Reply to this Post  Reply with Quote 
Re: HELP WITH MACSWORD

Yes, I think that would work.
I'll put this in.

Thanks for your help.
[Nov 14, 2009 5:00:24 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Show Printable Version of Thread  Post new Thread