[Gambas-user] Event in Menu
    Rizky Tahara Shita 
    rizky at ...225...
       
    Wed Aug 20 10:55:51 CEST 2003
    
    
  
hi fabien,
i've tried your example script about the menu...
i create a project and paste your code.. i'm using gambas 0.63
here are the codes that i've paste from your script:
' Gambas class file
PRIVATE mnuTab AS Object[] 'to store the menu.id's
PRIVATE mnuFile AS Menu
PUBLIC SUB MenuCreating()
DIM hMenu AS Menu
DIM MnuParent AS Object
mnuParent = ME
mnuFile = NewMenu(mnuParent) AS "MnuFileEvent"
mnuFile.Text = "File"
hMenu = NewMenu(hMenu) AS "MnuEvent"
hMenu.Text = "Open"
hMenu.Tag = mnuTab.Count
mnuTab.Add(hMenu)
hMenu = NewMenu(hMenu) AS "MnuEvent"
hMenu.Text = "Quit"
hMenu.Tag = mnuTab.Count
mnuTab.Add(hMenu)
PUBLIC SUB mnexit_Click()
  ME.CLOSE
END
PUBLIC SUB mnuEvent_Click()
SELECT CASE LAST.Tag
    CASE 0
      Dialog.OpenFile
      mnuTab[LAST.Tag].Enabled = FALSE 'This switch the menu open to not 
enabled!
  
    CASE 1
      QUIT
END
but when i press F5 button, it raise error that pointed to these line :
mnuFile = NewMenu(mnuParent) AS "MnuFileEvent"
the error is:
"Syntax Error. End of line expected at line 10 in class Fmain.class"
do you have the source of that example ? please attach...
or is it because i compile with different version of gambas ???
    
    
More information about the User
mailing list