For Programmers: Free Programming Magazines  


Home > Archive > Clipper > June 2004 > problem with selfmade get









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author problem with selfmade get
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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com