Compile Problem with TAdvGroupBox

I am using Delphi XE2 and TMS Component Pack.  My application generates a compile error when i use a TAdvGroupBox and the following code (the problems/errors are highlighted red):

procedure TFormJobs.FormClose(Sender: TObject; var Action: TCloseAction);
   if not CheckOkToExit(sqlJob) then Action := caNone;
   if not CheckOkToExit(sqlPlanner) then Action := caNone;
    If Action = caNone then Exit;
    Action := caFree;

The error is: E2010 Incompatible types:  TCloseAction and TCheckBoxAction

caNone is declared as a constant  caNone = 0 AdvGroupBox.TcheckBoxAction   

How do i resolve this?


Tim Murfitt

Please use the correct namespace prefix,

explained at: :

Problem with constants declared in different units with the same name

Delphi or C++Builder supports that constants in different units with the same name are used simultaneously. For example, the constant psOffice2003Blue is declared in both AdvPanel.pas & AdvOfficePagerStylers.pas. To use these constants in an application that uses both units, prefix the constant with its namespace, ie:

For a TAdvPanel style, use AdvPanel.psOffice2003Blue and for a TAdvOfficePager style use AdvOfficePagerStylers.psOffice2003Blue