RTC Forums
November 24, 2024, 10:53:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Using an array  (Read 4439 times)
classic12
Guest
« on: November 24, 2011, 11:18:11 PM »

I am using the following in an IOS app:

procedure TForm2.Image7Click(Sender: TObject);
  var
  QueryType : String;
  BS: TMemoryStream;
  _Item : TListBoxItem;
  rowcount , i : Integer;
 // StrArray: Array[];
  StrArray : TRtcArray;
  begin


// test ot send to server 'something'
  rowcount := ListBox1.Items.Count;
  with UticketEntry.FormTicketEntry.RtcClientModule1 do
    begin


        SetLength(StrArray, ListBox1.Items.Count);
          for I := 0 to ListBox1.Items.Count - 1 do
            begin
                _Item := ListBox1.ItemByIndex(i);
                StrArray:= _Item.Binding['desc1'];
            end;

      Prepare('DataFromClient');
      Param.asArray['name']:= StrArray;
      Call(UticketEntry.FormTicketEntry.RtcResult1);
    end;
  end;
but I am getting.
[DCC Error] UForm2.pas(504): E2003 Undeclared identifier: 'TRtcArray'
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: November 25, 2011, 02:08:22 AM »

Code:
uses 
  rtcInfo;
...
procedure TForm2.Image7Click(Sender: TObject);
  var
    _Item : TListBoxItem;
    I : Integer;
    StrArray : TRtcArray;
  begin
  with UticketEntry.FormTicketEntry do
    begin
    RtcClientModule1.Prepare('DataFromClient');
    StrArray := RtcClientModule1.Param.newArray('name');
    for I := 0 to ListBox1.Items.Count - 1 do
      begin
      _Item := ListBox1.ItemByIndex(i);
      StrArray.asText[I] := _Item.Binding['desc1'];
      end;
    Call(RtcResult1);
    end;
  end;
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 17 queries.