unit UPACObju;
{ Generated by MakeComp 1.03 from UPACTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, SysUtils, Graphics, UlanType, ULRecTyp, ULObju, 
  UPACType;

type
  TUPACObj = class(TULObj)
  protected
    function GetActionName: TULPrgActionName;
    procedure SetActionName(AActionName: TULPrgActionName);
    function GetCommand: String;
    procedure SetCommand(ACommand: String);
    function GetMethod: TNotifyEvent;
    procedure SetMethod(AMethod: TNotifyEvent);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
  published
    property ActionName: TULPrgActionName
      read GetActionName write SetActionName;
    property Command: String
      read GetCommand write SetCommand;
    property Method: TNotifyEvent
      read GetMethod write SetMethod;
  end;

const
  UPACFldDescs: array[0..2] of TULFldDesc = (
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'ActionName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TULPrgActionName';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Command';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'String';
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4224;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Method';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TNotifyEvent';
    )
  );

  UPACRecDesc: TULRecDesc = (
    Caption: 'Command Action';
    ChildRecIDsStr: '';
    ChildRecIDs: nil;
    ChildRecIDCount: 0;
    FldCount: 3;
    Flds: @UPACFldDescs;
    Flags: rfHasRecName OR rfEnabled OR rfVisible;
    SortExp: '';
    EditFieldList: '';
    BrowseFieldList: '';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: '';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TUPACObj}
function TUPACObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TUPACRec);
end;

constructor TUPACObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), UPACID);
end;

function TUPACObj.GetULRecDesc: PULRecDesc;
begin
  Result := @UPACRecDesc;
end;

procedure TUPACObj.SetActionName(AActionName: TULPrgActionName);
begin
  if PUPACRec(Rec)^.ActionName <> AActionName then begin
    PUPACRec(Rec)^.ActionName := AActionName;
    if UPACFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUPACObj.GetActionName: TULPrgActionName;
begin
  GetActionName := PUPACRec(Rec)^.ActionName;
end;

procedure TUPACObj.SetCommand(ACommand: String);
begin
  if PUPACRec(Rec)^.Command <> ACommand then begin
    PUPACRec(Rec)^.Command := ACommand;
    if UPACFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUPACObj.GetCommand: String;
begin
  GetCommand := PUPACRec(Rec)^.Command;
end;

procedure TUPACObj.SetMethod(AMethod: TNotifyEvent);
begin
    PUPACRec(Rec)^.Method := AMethod;
    if UPACFldDescs[2].VarSize then 
      ClearFieldsLen;
    DoChange;
    {$IFNDEF CONSOLE}
    Fields[2].Method := TMethod(AMethod);
    {$ENDIF}
end;

function TUPACObj.GetMethod: TNotifyEvent;
begin
  GetMethod := PUPACRec(Rec)^.Method;
end;

{/TUPACObj}

end.
