Platforms to show: All Mac Windows Linux Cross-Platform

NSWindowRestoreHandlerMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The class implementing the event to be called for window restoration.
Example
// recreate windows when macOS restores the app state after a restart
// MyRestoreHandler is a subclass of NSWindowRestoreHandlerMBS with the RestoreWindow event implemented.
// RestoreHandler is a property of the app: RestoreHandler As MyRestoreHandler
RestoreHandler = New MyRestoreHandler

// in MyRestoreHandler:
Sub RestoreWindow(identifier As String, state As Variant) Handles RestoreWindow
// identifier is the name you gave the window with NSWindowMBS.identifier
Var w As New DesktopWindow // use your window class here
Me.SetRestoredWindow w
End Sub

This class has no subclasses.

Blog Entries

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS MacBase Plugin.


NSWindowMBS   -   NSWorkspaceAuthorizationMBS


The biggest plugin in space...