Computer Science Canada

OS (office package) help

Author:  void [ Tue May 27, 2003 8:48 am ]
Post subject:  OS (office package) help

code:

import GUI in "%oot/lib/GUI"
var w : int := Window.Open ("fullscreen")

%%MENU PROCEDURES
var typespace : string
procedure mydocs
    put "x"
end mydocs
procedure notepad
    get typespace
end notepad

%%MENU CREATION
var menu : int
var items : array 1 .. 5 of int
var names : array 1 .. 5 of string := init ("My Documents", "Notepad",
    "Paint", "Calculator", "Shut Down")
process menu_run
    loop
        menu := GUI.CreateMenu ("START")
        items (1) := GUI.CreateMenuItem (names (1), mydocs)
        items (2) := GUI.CreateMenuItem (names (2), notepad)
        loop
            exit when GUI.ProcessEvent
        end loop
    end loop
end menu_run

fork menu_run

that program shuts down on me when i use "notepad"...why?..is it coz im using get?....

Author:  Tony [ Tue May 27, 2003 10:53 am ]
Post subject: 

I think you need to use

get text:*

the :* allows you to get more then one word at a time. It still has 255 character limit though


: