Recent

Author Topic: {$mode objfpc}{$H+} vs. VirtualTreeView  (Read 5436 times)

asdf

  • Sr. Member
  • ****
  • Posts: 310
{$mode objfpc}{$H+} vs. VirtualTreeView
« on: February 24, 2011, 01:03:27 pm »
unit Unit1;

How to use {$mode objfpc}{$H+} and {$MODE Delphi}(for VirtualTreeView) in the same form ?

interface           


Lazarus 1.2.4 / Win 32 / THAILAND

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
Re: {$mode objfpc}{$H+} vs. VirtualTreeView
« Reply #1 on: February 24, 2011, 01:32:28 pm »
??? only the virtualtree unit needs the mode delphi, the other unit can use mode obfpc. there is no need to mix them.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: {$mode objfpc}{$H+} vs. VirtualTreeView
« Reply #2 on: February 24, 2011, 01:38:09 pm »
But unfortunately, my project has only one form.
VirtualTreeView is in the same unit with many other controls of {$mode objfpc}{$H+}.

How can I solve this problem ?
Lazarus 1.2.4 / Win 32 / THAILAND

asdf

  • Sr. Member
  • ****
  • Posts: 310
Re: {$mode objfpc}{$H+} vs. VirtualTreeView
« Reply #3 on: February 24, 2011, 05:14:38 pm »
Finally I just moved to use TreeListView instead.
It looks easier and I could finish learning/practicing the example within 1 hour.
Lazarus 1.2.4 / Win 32 / THAILAND

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
Re: {$mode objfpc}{$H+} vs. VirtualTreeView
« Reply #4 on: February 24, 2011, 07:48:38 pm »
But unfortunately, my project has only one form.
VirtualTreeView is in the same unit with many other controls of {$mode objfpc}{$H+}.

How can I solve this problem ?

Only the VirtualTreeView unit needs to be mode delphi (thats library code, you don't need to touch that), not the unit referring to it (thats your own, you can define any mode you want). I hope you dont decalre your control classes  in the same unit as where the virtual tree is defined.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker