Results 1 to 4 of 4

Thread: Moving from Delphi/Kylix to Lazarus, Free Pascal

  1. #1

    Moving from Delphi/Kylix to Lazarus, Free Pascal

    OK,

    I had a load of trouble with Kylix with my latest SuSE, More trouble than I care to deal with so I've dumped it's Wine Driven bloatedness and installed Lazarus along with Free Pascal.

    The IDE is very nice, Very Delphi like. I managed to find my way around without any problems. Setting up my projects seems the same as Delphi. So no probs there.

    The only problem I'm having is when I try to compile.

    I have a TStringlist and I'm using the GetCount() function to determine the nuber of items.

    Trouble is when I say if GetCount() > 0 , it gives an error "Incompatible types: got "TStringList.GetCount:LongInt" expected "LongInt"

    This is obviously a newbie problem, can anyone give me a clue so I can fix this?

    This code compiled fine under Kylix on my old Linux partition.

    Cheers

  2. #2

    GetCount

    TStringList.GetCount is a protected function should be used only internally. You can use TStringList.Count to get the same results.
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  3. #3

    Moving from Delphi/Kylix to Lazarus, Free Pascal

    You are a complete genius. That was the problem. Changing to Count instead of GetCount fixed that particular compilation problem. I don't recall why I'd used GetCount in the first place now.

    Told you it was a newbie question

    Many Thanks.

  4. #4

    Moving from Delphi/Kylix to Lazarus, Free Pascal

    fpc sometimes gives f*cked up error messages.

Bookmarks

Posting Permissions

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