This produces the following error 'Static reference to instance
select case starty(x)
case is < view1.WaveCanvas.Height/2
g.DrawLine(stime(x)*tx, ver, stime(x)*tx, set(x)4amp)
case is > view1.WaveCanvas.Height/2 ’
g.DrawLine(stime(x)*tx, ver, stime(x)*tx, set(x)0.5amp)
end select
[quote=288063:@Martin Fitzgibbons]This produces the following error 'Static reference to instance
select case starty(x)
case is < view1.WaveCanvas.Height/2
g.DrawLine(stime(x)*tx, ver, stime(x)*tx, set(x)4amp)
case is > view1.WaveCanvas.Height/2 ’
g.DrawLine(stime(x)*tx, ver, stime(x)*tx, set(x)0.5amp)
end select[/quote]
select case true
case starty(x) < view1.WaveCanvas.Height/2
g.DrawLine(stime(x)*tx, ver, stime(x)*tx, set(x)4amp)
case starty(x) > view1.WaveCanvas.Height/2 ’
g.DrawLine(stime(x)*tx, ver, stime(x)*tx, set(x)0.5amp)
end select
The issue is not with the select case, or the use of is. This works
[code] dim starty as integer
select case starty
case is < 0
system.debuglog “minus”
case is >= 0
system.DebugLog “over”
end select[/code]
That leaves only WaveCanvas a possible reason for the static reference exception. I bet WaveCanvas is the name of the custom canvas, and the instance is probably named WaveCanvas1.
I am on a different view to where the WaveCanvas is and want to test if the point in the array is above or below the half way point of the canvas in view1
That is the heart of the problem. In iOS, addressing a control on another view is not as simple as you think. Views do not have implicit instanciation.