
-----------------------------------
GreatPumpkin
Tue Mar 18, 2014 8:31 pm

Unable to open file &quot;Mouse&quot;. 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.

-----------------------------------
Raknarg
Tue Mar 18, 2014 9:29 pm

RE:Unable to open file &quot;Mouse&quot;. Trying to import Mouse into a .tu class.
-----------------------------------

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


import btn

setscreen("offscreenonly")

var b : ^btn
new btn, b

loop
    b -> update
    View.Update
end loop



this seems to work.
