traprogram / travariableValue

edited February 2010 in RAP
Hi,

I have to modify RAP-Programs in Code (RB 10, Delphi 7), e.g.

I have to do something in the OnDrawCommandClick-Event of a component by
calling a pass-through function.

I declared this function as function abc(aComponent: tppComponent):
boolean;

depending on the result-value of this function, i want to do something else
in the script, so i have to delcare a local variable for this new script.

Since here, I do like this:

lCodeModule := raGetCodeModule(ppReport1);
lProgram:= lcodemodule.GetEventHandlerForComponent(self..Label1,
'OnDrawCommandClick');

if lProgram = nil then begin
lProgram:= lcodemodule.CreateEventHandler(self.Label1,
'OnDrawCommandClick');
lProgram.BodyText:= 'lb_ok:= abc(Label1);
end;
....

May anyone explain me, how to declare local variables for the program ?

Thanks

Marion

Comments

This discussion has been closed.