realbasic-nug
[Top] [All Lists]

MenuItem.popup And Menu handlers

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: MenuItem.popup And Menu handlers
From: Karen <keatk at comcast dot net>
Date: Thu, 30 Jun 2005 18:43:12 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Ok some real weirdness... (Max OSX 10.3.9 - RB2005R1)

New style CM menus have suddenly stopped calling handlers on my Mac...

I could swear this was working OK last night, and i know it was working as expected on at work today on RB2005R1 Win2K...

But now on my Mac when using Menuitem.Popup the menu handler for the menu item is ignored... I thought maybe my project got munged - so I exported to XML and read it back in.. no luck... Thought maybe it was my system.. So rebooted... No luck... So compiled to both carbon And Mach-) - still broken...

So I created a simple new project;

1) New project
2) In Window1.Open put:
  Dim Base, item, Rtn As MenuItem

  If Not IsContextualClick Then return false

  Base = New MenuItem("baseCM")

  Item = New MenuItem("test")
  Item.Text = "Test"
  item.Enabled = true
  Base.Append item

  Rtn = Base.PopUp
  If Rtn IS NIL  Then
    MsgBox "nil"
  Else
    MsgBox "Returned MenuItem: " + Rtn.Text
  End if

  Return True

3) Create a Menu handler named "test" with the following code:
  MsgBox " Handler Worked"
  Return True

When i run it and right click (yes i have 2 button mouse on my Mac) or Control Click on window1 the contextual menu pops up and and i select the "test" menuItem

If things were working right I should :
First get a MsgBox with: " Handler Worked"
Then a second MsgBox with "nil"

What I see is only one message box that says : "Returned MenuItem: Test"

For the heck of it I dragged the menu handler to the desktop to produce a text clipping .. what I got was:

Function test() As Boolean
  MsgBox " Handler Worked"
  Return True
End Function

Don't know if that should say MenuHandler or Function...

Am i going crazy? Does anyone else see this?

A Frustrated Karen...

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • MenuItem.popup And Menu handlers, Karen <=