CanvasGraphics complains "too many function params

BlitzMax Forums/BlitzMax Programming/CanvasGraphics complains "too many function params

Rozek(Posted 2010) [#1]
Hello!

I'm currently stuck with my development because the (BlitzMAX 1.38) compiler does not get beyond a CanvasGraphics call, complaining

"Too many function parameters"

The code is actually quite simple: within a TProxyGadget subtype, I have



which simply does not compile...From some refactoring experiments, I know, that it is the CanvasGraphics call, which causes problems.

[edit]I meanwhile moved from pixmaps to images since I do not intend to edit the images but have to display them only - however, the problem persists[/edit]

Does anybody have any idea? I might be s.th. simple - but I don't get it!

I'm working on an Intel Mac running MacOS X 10.4.11

Thanks in advance for any help!


Rozek(Posted 2010) [#2]
Well,

I solved it (or better: I found a workaround, as I don't know the reason for this strange behavour):

I simply made a new function
  function setGraphicsContextFor (Proxy:TGadget)
    setGraphics(CanvasGraphics(Proxy))
  end function

and (within my method from above) used
setGraphicsContextFor(Proxy)

instead of
setGraphics(CanvasGraphics(Proxy))

(looks like a compiler error)