MenuItem.st
changeset 2987 66fad8f6ad33
parent 2966 5f538729ab69
child 3003 e2177537ecb8
equal deleted inserted replaced
2986:3604b3ca2b42 2987:66fad8f6ad33
   453 
   453 
   454     "Created: / 25.2.1997 / 20:59:28 / cg"
   454     "Created: / 25.2.1997 / 20:59:28 / cg"
   455     "Modified: / 19.6.1998 / 00:33:58 / cg"
   455     "Modified: / 19.6.1998 / 00:33:58 / cg"
   456 !
   456 !
   457 
   457 
   458 submenu:something 
   458 submenu:aMenu 
   459     "set the submenu or nil"
   459     "set the submenu or nil"
   460     
   460     
   461     (something isValueModel or:[ something isBlock ]) ifTrue:[
   461     (aMenu isValueModel or:[ aMenu isBlock ]) ifTrue:[
   462         submenuChannel notNil ifTrue:[
   462         submenuChannel notNil ifTrue:[
   463             "/ programmers error ?
   463             "/ programmers error ?
   464             "/ how can I decide which one to use if there is both
   464             "/ how can I decide which one to use if there is both
   465             "/ a channel and a subMenu ...
   465             "/ a channel and a subMenu ...
   466             self error:'overwriting submenuchannel' mayProceed:true.
   466             self error:'overwriting submenuchannel' mayProceed:true.
   467         ].
   467         ].
   468         submenuChannel := something
   468         submenuChannel := aMenu
   469     ] ifFalse:[
   469     ] ifFalse:[
   470         submenu := something.
   470         submenu := aMenu.
   471     ]
   471     ]
   472 
   472 
   473     "Created: / 25.2.1997 / 20:59:28 / cg"
   473     "Created: / 25.2.1997 / 20:59:28 / cg"
   474     "Modified: / 5.2.2000 / 16:53:28 / cg"
   474     "Modified: / 5.2.2000 / 16:53:28 / cg"
   475 !
   475 !
   478     "get the submenuChannel or nil"
   478     "get the submenuChannel or nil"
   479     
   479     
   480     ^ submenuChannel
   480     ^ submenuChannel
   481 !
   481 !
   482 
   482 
   483 submenuChannel:something 
   483 submenuChannel:aMenuHolder 
   484     "set the submenuChannel or nil"
   484     "set the submenuChannel or nil"
   485     
   485     
   486     submenuChannel := something.
   486     submenuChannel := aMenuHolder.
   487 !
   487 !
   488 
   488 
   489 submenuProvider 
   489 submenuProvider 
   490     "useful if a sub-menu is plugged in from another application (i.e. when
   490     "useful if a sub-menu is plugged in from another application (i.e. when
   491      a submenu is fetched via a channel AND the top-menus application cannot provide
   491      a submenu is fetched via a channel AND the top-menus application cannot provide
  1016 ! !
  1016 ! !
  1017 
  1017 
  1018 !MenuItem class methodsFor:'documentation'!
  1018 !MenuItem class methodsFor:'documentation'!
  1019 
  1019 
  1020 version
  1020 version
  1021     ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.95 2011-10-12 21:03:46 vrany Exp $'
  1021     ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.96 2012-02-14 14:17:29 cg Exp $'
  1022 !
  1022 !
  1023 
  1023 
  1024 version_CVS
  1024 version_CVS
  1025     ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.95 2011-10-12 21:03:46 vrany Exp $'
  1025     ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.96 2012-02-14 14:17:29 cg Exp $'
  1026 ! !
  1026 ! !