Pass a cicode global variable argument into a function that is called by a super genie graphic window

 I am having trouble passing a global cicode variable to the BlockedTrnSetPen function, which is called by the trend pop up page (super genie).

//**************************** GLOBAL VARIABLES *****************************
GLOBAL STRING TrendPen1;
GLOBAL STRING TrendPen2;
GLOBAL STRING TrendPen3;
GLOBAL STRING TrendPen4;

Super genie cicode function call by event on 'On page shown'

BlockedTrnSetPen(86,1,( TrendPen1) )

INT
FUNCTION
BlockedTrnSetPen(INT hAN, INT nPen, STRING sTrend)
INT timeout = 5000
INT sleepTime = 10
INT error = -1
INT elapsed = 0
INT currentTime
STRING sPenName
error = TrnSetPen(hAN, nPen, sTrend)
IF error = 0 THEN
error = -1
currentTime = SysTime()
WHILE error <> 0 AND elapsed < timeout DO
sPenName = TrnGetPen(hAN, nPen)
IF sPenName = sTrend THEN
error = 0
ELSE
SleepMS(sleepTime)
elapsed = elapsed + SysTimeDelta(currentTime)
END
END
END
RETURN error
END

In debug first two arguments are passed ok but global variable argument debug shows bad  and value of 0.00 for global variable string argument.

Any thoughts?

Thanks

Daryl

Parents Reply Children
No Data