Home RAP

Arrays

edited July 2014 in RAP
Hi
Is it posible to use arrays in rap code. I need an array that allows me
access to a specific position to read or manipulate its value
I'm using RB 14.08

Thanks

Comments

  • edited July 2014
    Hi Ignacio,

    Arrays are not supported in RAP. If you need to keep a list of values,
    I suggest using a TStringList object to do so in RAP.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2014
    Thanks Nico
    Could you please give me an example about accessing and modifying a
    specific value in the x position?



    El 03/07/2014 13:46, Nico Cizik (Digital Metaphors) escribió:
  • edited July 2014
    Hi Ignacio,

    I'm sorry but I'm unclear about what you are trying to accomplish. Are
    you trying to manipulate the horizontal location of a report component
    in RAP code? If so, this should be fairly simple to do before the
    component (or band) is printed.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2014
    Hi
    I asked an example of simulating arrays manipulation with TStringList
    because I couldn't use many properties of the TStringList component as
    in delphi. For example delimiter property, delimitedtext property, and
    others. It seems that not all TStringList properties and methods are
    able in rap code. I think I solved it using the available methods
    Thank for asking and answering



    El 08/07/2014 10:13, Nico Cizik (Digital Metaphors) escribió:
  • edited July 2014
    Hi.

    For check what properties (methods) available in RAP I used next code:

    uses
    ppRTTI,
    raObjectRTTI;


    procedure TTestForm.StringListRTTIPropsToFile;
    begin
    ClassRTTIPropsToFile(TStringList, 'c:\Test\StringListRTTI.txt');
    end;

    procedure TTestForm.ClassRTTIPropsToFile(AClass: TClass; const AFileName:
    string;
    Encoding: TEncoding = nil);
    var
    PropList: TraPropList;
    begin
    PropList := TraPropList.Create;
    try
    TraTStringListRTTI.GetPropList(TStringList, PropList);

    PropList.SaveToFile(AFileName);


    // you can put memo on form and used next code
    // Memo1.Text := PropList.Text;
    finally
    PropList.Free;
    end;
    end;
  • edited July 2014
    Thanks!
    I solved the array capability using basics methods of TStringList and
    those methods that RAP code doesn't accept or recognize as delimeter or
    delimeted text, I did it with traversing through the list with a FOR
    sentence and concatenating strings


    El 09/07/2014 06:21, Dima escribió:
This discussion has been closed.