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

Username:   Password: 
 RegisterRegister   
 Importing Graphics in Mac version of Turing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Paul Brenek




PostPosted: Sun May 02, 2004 2:32 pm   Post subject: Importing Graphics in Mac version of Turing

Hi,

I am a newbie in using Turing on a Mac. I am using MacTuring 4.05.
I am trying to load an image onto the screen using the following code:

var imgID : int
imgID := Pic.FileNew ("triv.bmp" : string) : int

I am getting an error message saying that Pic has not been declared. Can anyone help me here please?

Also, the following code also generates similar errors.

var screenWidth : int := Config.Display (cdScreenWidth)
var screenHeight : int := Config.Display (cdScreenHeight)

global_windowset := Window.Open ("fullscreen")
global_windowset := Window.Open ("position:top;center,graphics:200;200")
Window.Set (global_windowset, "nocursor")

Please help. Thank you.
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Sun May 02, 2004 3:31 pm   Post subject: (No subject)

Um... I dunno anything about mac version, but in windows version, doing a new pic would be like
code:

var imgID : int
imgID := Pic.FileNew ("triv.bmp")


Is it different in mac version?
Tony




PostPosted: Sun May 02, 2004 5:17 pm   Post subject: (No subject)

well... I think that turing in question here is equivalent to DOS turing, not OOT Thinking

also...
Quote:

imgID := Pic.FileNew ("triv.bmp" : string) : int

the :string and :int are there just to show variable type to be passed/returned. You don't copy those from the help file Rolling Eyes
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Paul Brenek




PostPosted: Sun May 02, 2004 5:40 pm   Post subject: Mac Turing

I think you may be right. I think that MacTuring 4.05 is somehow equivalent to DOS Turing. I also have MacTuring 1.5 which is OOT but I am not using it because:

1. It does not allow you to read input from exteral data files...at least I don't know how to do it in OOT.

2. It does not allow you to use the include command. It has an import command but I don't know how to use it. Is it equivalent to the include command?

Also, don't you have to somehow import the GUI? I don't know how.

Any ideas? Thank you.

What I am trying to do is to write a Turing version of the game Trivial Pursuit.
Tony




PostPosted: Sun May 02, 2004 5:46 pm   Post subject: (No subject)

well import is the 'proper' way for add-ons instead of include Rolling Eyes

and you not suppost to use turing's GUI because it will kill you Twisted Evil well no, but it's bad, you're better off writing your own.

And the best advise I could give you is to run a windows vertual machine (or w/e simulator) on your mac and program in WinOOT 4.0.5 (not to be mistaken with what you using now... it is way different)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Paul Brenek




PostPosted: Sun May 02, 2004 6:00 pm   Post subject: Mac Turing

I don't have Win OOT or virtual PC yet.
In the interim can you please tell me how I can:

1. read data from external files - what is the syntax
2. use the import command in OOT - what is the syntax
3. import graphics into the screen - syntax

Thank you.
Paul Brenek




PostPosted: Sun May 02, 2004 6:41 pm   Post subject: Mac Turing

Another thing:

I have tried to rerun the code in OOT. The problem I have run into is that my OOT compiler is in one directory (folder) and my program and other units are in another folder. When I use import, the main program is looking in the OOT complier folder for the unit programs instead of its own folder. How do I tell the main program to look in its own folder for the subprograms?

Thank you.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: