Forum Navigation
You need to log in to create posts and topics.

Re: Suggestions for FB^3

Posted by: tatewake <tatewake@...>

>First, thanks to everyone who clarified volume refnums for me. 🙂
>
>Second, I was reading over the cool new features for FB^3 and I had an
>idea. Making menus with the standard MENU command can get a little
>annoying because you have to assign each item an ID number. I was
>thinking of something like:

Have you seen PG yet? Play with it a little...

>This would provide a few advantages:
>
>1: It's easier to look at
>2: ItemRefNums don't have to be in any particular order, as long as
> they're unique
>3: This would make contextual menus really easy, because you could do

Here's some existing code that does it even better:
_MenuFile = 1
_MenuEdit = 2
_MenuWindow = 3

_MenuFileOpen = 1
_MenuFileClose = 2
_MenuFileQuit = 3
_MenuEditCut = 1
_MenuEditCopy = 2
_MenuEditLine1 = 3
_MenuEditUndo = 4

END GLOBALS
TRON X
LOCAL FN SetUpMenus
MENU _MenuFile,0,_enable, "File"
MENU _MenuFile,_MenuFileOpen ,_enable, "Open"
MENU _MenuFile,_MenuFileClose,_enable, "Close"
MENU _MenuFile,_MenuFileQuit ,_checked,"Quit"

MENU _MenuEdit,0,_enable, "Edit"
MENU _MenuEdit,_MenuEditCut ,_enable, "Cut"
MENU _MenuEdit,_MenuEditCopy ,_enable, "Copy"
MENU _MenuEdit,_MenuEditLine1 ,_enable, "-"
MENU _MenuEdit,_MenuEditUndo ,_enable, "Undo"

MENU _MenuWindow,0,_disable, "Window"

END FN

FN SetUpMenus
DO
HANDLEEVENTS
UNTIL INKEY$="A"

>BEGIN MENU "My Example Menu"
> ITEM "First Item", 1
> ITEM "Second Item", 2, checkedBoolean 'Checked if true
> IF ConditionExists THEN ITEM "Third Item", 3
> ITEM "Fourth Item", 4
> ...
>END MENU

Sure, but we can say that with everything...
BEGIN PRINT
STRING "HELLO"
INTEGER 5
END PRINT

But by making it too structured, do we also make it too complicated?

-- Terence Jordan (tatewake@usa.net)
Inspired Software. inspired.netstreet.net/
Macintosh, Dos, Windows, and BeOS software solutions.
Phone: 407-728-7563
............................................
. New: Renegade Space Ninja for Macintosh! .
. Visit our page for more info. .
............................................