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

Username:   Password: 
 RegisterRegister   
 Unable to open file "Mouse". Trying to import Mouse into a .tu class.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GreatPumpkin




PostPosted: Tue Mar 18, 2014 8:31 pm   Post subject: Unable to open file "Mouse". Trying to import Mouse into a .tu class.

What is it you are trying to achieve?
I've made a fairly simple button class, it all seemed to work fine, then I saved it as a .tu with unit at the begining and I'm having issues. It's giving me the error (Unable to open file "Mouse" [C:\Users.....\MyProject\Classes\GUIClass\Mouse")

I'd like to import the mouse module to use, how do other people do this in home-made button class'?

If I remove the unit and save as a .t it runs properly. I'm assuming I have to change the directory to where the default Mouse module or class is, but I'm not sure where that would be.
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Tue Mar 18, 2014 9:29 pm   Post subject: RE:Unable to open file "Mouse". Trying to import Mouse into a .tu class.

Turing:

unit

class btn
    export update
   
    proc update()
        var x, y, b : int
        cls
        Mouse.Where(x, y, b)
        put x, " ", y, " ", b
    end update
end btn

Turing:

import btn

setscreen("offscreenonly")

var b : ^btn
new btn, b

loop
    b -> update
    View.Update
end loop



this seems to work.
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: