| Andreas Moroder 2004-06-25, 6:50 pm |
| Hello,
I have this self made get
#xcommand @ <row>,<col>, <down>, <right> GETMEMO <var>, ;
[COLOR <clr>] => ;
SETCOLOR(<clr> ); ;
@ <row>,<col> clear to <down>, <right>; ;
SETPOS(<row>,<col> ); ;
AADD( GetList, GetNew(<row>, <col>, ;
{|x| IF(x == NIL, <var>, <var> := x)}, <"var"> ) ); ;
ATAIL(GetList):reader := {|get| SETPOS(<row>,<col> ),;
ReaderMemo(get, <clr> )};;
ATAIL(GetList):cargo:={<row>,<col>, <down>, <right>}
It works well, but I have the problem that where I call it
@ zeile,spalte+len(trim(cText)),nUnten,nRe
chts getmemo p_cMemoText color
xp_color2
i must pass a macro &myfield instead of the fixed variable.
This macro contains nothing but the name of the variable.
I need this to create a get/read at runtime.
With the standard get this works well, but not with my getmemo.
The compiler tells me this:
TIAMDRU.PRG(199) Error C2050 Code block contains both macro and
declared symbol references
How can I avoid this ?
Is the {|x| IF(x == NIL, <var>, <var> := x)} really necessary ?
Thanks
Andreas
|