Popups in RB are fundamentally broken. I was told when I bitched
about this same issue that, 'they are working correctly, popups
should not have disabled items in them'. I say BULL and I provided
the Apple print dialog box which contains three popups and they all
can contain disabled items in them, as my defense. Since it is
obviously broken and RS is clueless, I never bother to pursue this
issue. This may be correct for behavior windows but not Mac and I'm
not sure this is even correct for windows.
On the other hand, contextual menus by nature should 'ONLY' contain
valid or enabled menu items as these are supposed to be built on the
fly depending where a contextual menu click was caught. Only relevant
items should be shown.
See the Apple HIG for clarification. Sad RS doesn't know the
difference. To 'Fix' the problem it needs to same enable/disable
property that a standard menu has. Right now I think they have the
contextual menu working double-time as a popup too.
Craig
On Oct 14, 2006, at 10:00 AM, realbasic-nug-
[EMAIL PROTECTED] wrote:
Message: 9
Subject: ConstructContextMenu and Popup
From: Dr Gerard Hammond <[EMAIL PROTECTED]>
Date: Sat, 14 Oct 2006 21:30:04 +1000
Hi,
I need a popupmenu that displays both enabled and disabled rows.
Various NUG threads say that this is impossible with the built-in
popup menu, so I am trying to do this with a contextual menu.
Unfortunately I can't seem to get the simplest ConstructContextMenu
of a popup menu to fire at all.
What am I doing wrong?
PPC IDE 2006R4 on OS X
Here is the ConstructContextualMenu code (from the only Popupmenu
control, on the only window, in a new default project).
Function ConstructContextualMenu(base as MenuItem, x as Integer, y as
Integer) As Boolean
'dim base as new MenuItem
base.Append( EditCut )
base.Append( EditCopy )
base.Append( EditPaste )
base.Append( new MenuItem( MenuItem.TextSeparator ) )
base.Append( new MenuItem( "My menu item text" ) )
base.Append( new MenuItem( "Other text" ) )
dim results as MenuItem
results = base.PopUp
select case results.Text
case "My menu item text"
'DoSomething
dim j as integer = 1
case "Other text"
'DoSomethingElse
dim jj as integer = 2
end select
Return true
End Function
--
Cheers,
Dr Gerard Hammond
MacSOS Solutions
_______________________________________________
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>