Hi Daniel, I've just tried it with the CreateMenu example and it worked fine as long as I used the CreateMenu(...) with parameters in brackets function?
menuItem should be defined as TGadget, I think all objects should be extensions of the type object e.g.
' Example setup a gui menu then delete a menu item
Framework MaxGui.Drivers
Import BRL.Event
Import BRL.EventQueue
SuperStrict
Local menuList:TList = New TList
Local window:TGadget
Local filemenu:TGadget
Local editmenu:TGadget
Local helpmenu:TGadget
Const MENU_ABOUT:Int=109
Const MENU_DELETE_ME:Int=110
window=CreateWindow("My Window",40,40,320,240)
filemenu=CreateMenu("&File",0,WindowMenu(window))
menuList.AddLast(filemenu)
Local menuItem:TGadget
menuItem = CreateMenu("&About",MENU_ABOUT,filemenu,KEY_N,MODIFIER_COMMAND)
menuList.AddLast(menuItem)
menuItem = CreateMenu("&DeleteMe!",MENU_DELETE_ME,filemenu,KEY_W,MODIFIER_COMMAND)
menuList.AddLast(menuItem)
UpdateWindowMenu window
While True
WaitEvent
Select EventID()
Case EVENT_WINDOWCLOSE
End
Case EVENT_MENUACTION
Select EventData()
Case MENU_ABOUT
Notify "Arowx~n(C)2008 Amazing Software"
Case MENU_DELETE_ME
For Local menuItem:TGadget = EachIn menuList
If menuItem.GetText() = "&DeleteMe!" Then
Notify "Found it"
FreeGadget(menuItem)
UpdateWindowMenu(window)
Exit
EndIf
Next
End Select
End Select
Wend
The Null Object would indicate that the the menu item failed to create, did you provide it with valid parameters e.g. parent ect?
Regards
Merx