mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 14:24:24 +02:00
50 lines
675 B
ObjectPascal
50 lines
675 B
ObjectPascal
{ %target=darwin }
|
|
{ %cpu=powerpc,powerpc64,i386,x86_64,arm,aarch64 }
|
|
{ %norun }
|
|
|
|
{ Written by Jonas Maebe in 2010, released into the public domain }
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch objectivec1}
|
|
|
|
unit tobjc37;
|
|
interface
|
|
uses
|
|
CocoaAll;
|
|
|
|
type
|
|
MyWindow = objcclass(NSWindow)
|
|
procedure awakeFromNib; override;
|
|
end;
|
|
|
|
|
|
implementation
|
|
|
|
type
|
|
MyView = objcclass(NSView)
|
|
procedure awakeFromNib; override;
|
|
end;
|
|
|
|
procedure MyWindow.awakeFromNib;
|
|
begin
|
|
end;
|
|
|
|
procedure MyView.awakeFromNib;
|
|
begin
|
|
end;
|
|
|
|
procedure test;
|
|
var
|
|
w: mywindow;
|
|
v: myview;
|
|
begin
|
|
w:=mywindow.alloc.init;
|
|
w.awakefromnib;
|
|
w.release;
|
|
v:=myview.alloc.init;
|
|
v.awakefromnib;
|
|
v.release;
|
|
end;
|
|
|
|
end.
|