Posted: Thu, 15 Oct 2009 06:29:50 +0000
From: Ingemar Ragnemalm member since Jun 12 2009, has contibuted 79 messages.
You might want to use file dialogs too. Think Pascal had some very elegant and useful calls. They are re-implemented in my unit CarbonStandardFile. Also, TransSkel is very nice for simplifying the GUI.
But the MacPascal community is on the move now, away from Carbon. That is not because Carbon is bad, far from it, but Apple is phasing it out. So we are moving to Cocoa, with the brand new FPC additions that go under the name Objective Pascal. I am reimplementing both the file dialogs and TransSkel under Cocoa using Objective Pascal.
Posted: Wed, 16 Sep 2009 17:21:24 +0000
From: Ozz Nixon member since Jun 12 2009, has contibuted 79 messages.
Hey Roger,
I will help you - as I am doing a similar task - porting all of my old Windows and Linux products to Mac OS X. For the file handle routines. FPC took the approach of TurboPascal for DOS.
Var
FH:File;
Begin
Assign(FH,'mysample.txt');
{$I-} Rewrite(FH,1); {$I_amp_#043;}
If IOResult=0 then begin
BlockWrite(FH,'This is a string',16);
Close(FH);
End;
End.
Rewrite - is used to create (can read after writes)
Reset - is used to open (for read/write).
Append - is used on type TextFile to open/seek EOF.
Per the GUI, I am working on that - so maybe between you and I we can learn together. I have started a DXGUI.pas unit which encompasses a structure like the Delphi guys are used to - creates a TApplication which tracks all TWindows, TButtons, etc.
Ozz
PS. I will email this to you too - so you have my personal email address.
Posted: Tue, 08 Sep 2009 23:06:06 +0000
From: Roger Bailey member since Sep 08 2009, has contibuted 1 messages.
A real rabbit question. I'm new to FPC and to OS X. I'm trying to port a heap of programs written in THINK Pascal and I'm finding the Mac documentation very opaque. Everything seems to be either a summary or jumps right in at the nuts and bolts level (and is targeted at C programmers of course). Basically I need to know where to look to find how to port the file and window handling.