Elements. Build native projects for any modern development platform, using the language(s) of your choice. Oxygene (Object Pascal), C#, Swift, Java, Go. | RemObjects Software

Documents

Language: Oxygene, Platform: Toffee, Category: OS X
https://github.com/remobjects/ElementsSamples/tree/master/Oxygene/Toffee/OS X/Documents

FooDocumentWindowController.pas

namespace Documents;

interface

uses
  AppKit;

type
  [IBObject]
  FooDocumentWindowController = public class(NSWindowController)
  private
	var _document: FooDocument;
  public
	property data: nullable FooDocumentData read _document.data;
	constructor withDocument(document: FooDocument);
	method windowDidLoad; override;
  end;

implementation

constructor FooDocumentWindowController withDocument(document: FooDocument);
begin
  inherited constructor withWindowNibName('FooDocumentWindow');
  _document := document;
end;

method FooDocumentWindowController.windowDidLoad;
begin
  inherited windowDidLoad();
  //  Implement this method to handle any initialization after your window controller's
  //  window has been loaded from its nib file.
end;

end.