Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 OS (office package) help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
void




PostPosted: 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?....
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue May 27, 2003 10:53 am   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: