-1
如何在Delphi for OSX的代碼中創建NSWindow?從Delphi OSX創建NSWindow
這裏是我試過:
uses Macapi.AppKit,Macapi.CocoaTypes;
...
var
NW : NSWindow;
begin
Nw := TNSWindow.Create;
Nw.initWithContentRect(MakeNSRect(100,100,250,250), NSBorderlessWindowMask, NSBackingStoreBuffered, True);
但在initWithContentRect行我得到PAServer窗口「_setFrameworkScaleFactor調用非空_borderView」運行時錯誤。
我猜我做錯了,但我發現很難找到任何例子。
你看FMX.Platform.Mac.pas看到FMX如何做這個? – Giel
@Giel是的,但它看起來像是在TFMXWindow類中覆蓋了NSWindow。我不明白爲什麼這是必要的,如果可能的話,我希望沒有任何FMX依賴性。 –
您是否嘗試過[this](http://stackoverflow.com/questions/7442131/delphi-xe2-is-it-possible-to-create-mac-gui-applications-without-firemonkey)? – RRUZ