Results 1 to 2 of 2

Thread: TStringlist, TStrings

  1. #1
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default TStringlist, TStrings

    Is it not imported in Simba ?
    Any comfortable string reading solutions ?

    Code:
    var
    list:TStringlist;
    begin
    list := TStringlist.Create;
    end;
    Regards
    caused

    Edit:
    NVM. Lape is just not supported. With Pascal Script only it will work.
    Last edited by caused; 05-24-2016 at 12:45 PM.

  2. #2
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by caused View Post
    Edit: NVM. Lape is just not supported. With Pascal Script only it will work.
    It's exported to lape, just not identical to implementation in FPC, due to lack of support for various language features, and a difference in design. Same goes for a lot of other classes exported to lape from Simba.
    Simba Code:
    var
      list:TStringList;
    begin
      list.Init();
      list.Add('works=...');
      WriteLn(list.GetValues('works'));
      list.Free();
    end;

    You know, if you look at the error raised with your code you should see that it exists, but your usage of it is wrong.
    > Error: Unknown declaration "Create" at line 4

    All getter, and setter properties, and all field variables have to be accessed indirectly, due to lack of propertiy support. The general rule is just to add a prefixing "Get" and "Set", and they are now functions. This rules applies to all wrappers of native classes, so TMufasaBitmap, TCanvas, TBitmap, TPen, TStream, TStringStream etc... etc. There are many classes exported, as many of them relies on eachother.
    Last edited by slacky; 05-24-2016 at 01:58 PM.
    !No priv. messages please

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •