Types In use with Module Functions

BlitzMax Forums/BlitzMax Programming/Types In use with Module Functions

Thats very bad OO design. If the functions are used on letters only, then they should be part of the letter class and not an external thing.


Yeah, unfortunately, the function that my methods use are common functions that are used in many other places outside the class.

You'll need to post some code.


Well, to make a long story short....

type letter
       field stuff

      method draw()
            stuff = a()
      end method
end type

function a()
        'Do stuff
end function

function b()
        local l:letter = new letter      '<----- Compiler stops here
        l.stuff = 2
end function