* adapt to new palmos system unit

This commit is contained in:
pierre 2003-01-14 08:20:05 +00:00
parent 4fec8d0699
commit 8797c7ea07

View File

@ -7,6 +7,8 @@
{$APPID FPCA} {$APPID FPCA}
{$APPNAME FPC Demo} {$APPNAME FPC Demo}
{$R pilrctst.rcp}
program pilrctst; program pilrctst;
uses uses
@ -37,10 +39,6 @@ program pilrctst;
var var
kidForm : longint; kidForm : longint;
{function PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;public;[alias: 'PilotMain'];}
var var
b : boolean; b : boolean;
e : EventType; e : EventType;
@ -48,68 +46,61 @@ program pilrctst;
pfrm : PFormType; pfrm : PFormType;
ptbl : PTableType; ptbl : PTableType;
begin begin
{if _cmd=0 then } kidForm:=kidForm3;
begin FrmGotoForm(kidForm);
kidForm:=kidForm1; while true do
FrmGotoForm(kidForm); begin
while true do EvtGetEvent(e,100);
begin if SysHandleEvent(e)<>0 then
EvtGetEvent(e,100); continue;
if SysHandleEvent(e)<>0 then if MenuHandleEvent(nil,e,err)<>0 then
continue; continue;
if MenuHandleEvent(nil,e,err)<>0 then case e.eType of
continue; ctlSelectEvent:
case e.eType of begin
ctlSelectEvent: if e.data.controlID=kidOk then
begin begin
if e.data.controlID=kidOk then inc(kidForm);
begin if kidForm>kidFormLast then
inc(kidForm); kidForm:=kidForm1;
if kidForm>kidFormLast then FrmGotoForm(kidForm);
kidForm:=kidForm1; end;
FrmGotoForm(kidForm); if assigned(FrmGetActiveForm) then
end; FrmHandleEvent(FrmGetActiveForm,e);
if assigned(FrmGetActiveForm) then end;
FrmHandleEvent(FrmGetActiveForm,e); frmLoadEvent:
end; begin
frmLoadEvent: FrmSetActiveForm(FrmInitForm(e.data.formID));
begin end;
FrmSetActiveForm(FrmInitForm(e.data.formID)); frmOpenEvent:
end; begin
frmOpenEvent: pfrm:=FrmGetActiveForm;
begin FrmDrawForm(pfrm);
pfrm:=FrmGetActiveForm; if e.data.formID=kidForm12 then
FrmDrawForm(pfrm); begin
if e.data.formID=kidForm12 then ptbl:=PTableType(FrmGetObjectPtr(pfrm, FrmGetObjectIndex(pfrm, kidTable)));
begin TblSetColumnUsable(ptbl, 0, true);
ptbl:=PTableType(FrmGetObjectPtr(pfrm, FrmGetObjectIndex(pfrm, kidTable))); TblSetColumnUsable(ptbl, 1, true);
TblSetColumnUsable(ptbl, 0, true); TblSetColumnUsable(ptbl, 2, true);
TblSetColumnUsable(ptbl, 1, true); TblSetColumnUsable(ptbl, 3, true);
TblSetColumnUsable(ptbl, 2, true); TblSetColumnUsable(ptbl, 4, true);
TblSetColumnUsable(ptbl, 3, true); TblSetRowUsable(ptbl, 0, true);
TblSetColumnUsable(ptbl, 4, true); TblSetRowUsable(ptbl, 1, true);
TblSetRowUsable(ptbl, 0, true);
TblSetRowUsable(ptbl, 1, true);
TblSetItemStyle(ptbl, 0, 0, textTableItem); TblSetItemStyle(ptbl, 0, 0, textTableItem);
TblSetItemStyle(ptbl, 1, 0, textTableItem); TblSetItemStyle(ptbl, 1, 0, textTableItem);
TblSetItemStyle(ptbl, 2, 0, textTableItem); TblSetItemStyle(ptbl, 2, 0, textTableItem);
TblDrawTable(ptbl); TblDrawTable(ptbl);
end;
end;
menuEvent:
FrmAlert(kidAlert1);
appStopEvent:
break;
else
if assigned(FrmGetActiveForm) then
FrmHandleEvent(FrmGetActiveForm,e);
end; end;
end; end;
end; menuEvent:
{PilotMain:=0; FrmAlert(kidAlert1);
end; appStopEvent:
break;
begin} else
if assigned(FrmGetActiveForm) then
FrmHandleEvent(FrmGetActiveForm,e);
end;
end;
end. end.