Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWindowMBS class.

Next items

NSWindowMBS.addChildWindow(win as DesktopWindow, order as integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 22.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds a given window as a child window of the window.

win: The child window to order.
order: Either NSWindowAbove: childWindow is ordered immediately in front of the window, or NSWindowBelow: childWindow is ordered immediately behind the window.

After the childWindow is added as a child of the window, it is maintained in relative position indicated by order mode for subsequent ordering operations involving either window. While this attachment is active, moving childWindow will not cause the window to move (as in sliding a drawer in or out), but moving the window will cause childWindow to move.

Note that you should not create cycles between parent and child windows. For example, you should not add window B as child of window A, then add window A as a child of window B.

See also:

Some examples using this method:

NSWindowMBS.addChildWindow(win as NSWindowMBS, order as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Adds a given window as a child window of the window.

win: The child window to order.
order: Either NSWindowAbove: childWindow is ordered immediately in front of the window, or NSWindowBelow: childWindow is ordered immediately behind the window.

After the childWindow is added as a child of the window, it is maintained in relative position indicated by order mode for subsequent ordering operations involving either window. While this attachment is active, moving childWindow will not cause the window to move (as in sliding a drawer in or out), but moving the window will cause childWindow to move.

Note that you should not create cycles between parent and child windows. For example, you should not add window B as child of window A, then add window A as a child of window B.

See also:

NSWindowMBS.addChildWindow(win as window, order as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds a given window as a child window of the window.

win: The child window to order.
order: Either NSWindowAbove: childWindow is ordered immediately in front of the window, or NSWindowBelow: childWindow is ordered immediately behind the window.

After the childWindow is added as a child of the window, it is maintained in relative position indicated by order mode for subsequent ordering operations involving either window. While this attachment is active, moving childWindow will not cause the window to move (as in sliding a drawer in or out), but moving the window will cause childWindow to move.

Note that you should not create cycles between parent and child windows. For example, you should not add window B as child of window A, then add window A as a child of window B.

See also:

NSWindowMBS.addTabbedWindow(win as NSWindowMBS, ordered as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Allows creating a group of tabbed windows, or adding a new window to an existing tabbed window group.
Example
Var n as NSWindowMBS = window1.NSWindowMBS

n.addTabbedWindow(Window2, n.NSWindowAbove)

The 'window' will be added to the receiver's tabbed window group, or create a group if needed. The tabbingIdentifier for the entire group should be the same for all the windows, otherwise an exception will be thrown. Use the ordered parameter with "NSWindowAbove" and "NSWindowBelow" to place the new window before or after the receiver's tab. Passing "NSWindowOut" will thrown an exception. Currently this method is not animatable, but that may change in the future.
Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.animator as NSWindowMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the proxy object for this window which animates.
Example
Var v as NSWindowMBS // your NSWindowMBS object

v.alphaValue = 0.5 // switch alpha directly
v.animator.alphaValue = 0.5 // switch alpha animated

NSWindowMBS.areCursorRectsEnabled as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the window's cursor rectangles are enabled.

Available in Mac OS X v10.0 and later.

NSWindowMBS.attachedSheet as NSWindowMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the sheet attached to the window.

The sheet attached to the window; nil when the window doesn't have a sheet attached.

Available in Mac OS X v10.1 and later.

NSWindowMBS.autorecalculatesContentBorderThicknessForEdge(edge as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Indicates whether the window calculates the thickness of a given border automatically.

edge: Border whose thickness autorecalculation status to set:

NSMaxYEdge: Top border.
NSMinYEdge: Bottom border.

Returns true when the window auto-recalculates the given border's thickness; otherwise, false.

Requires Mac OS X 10.5.

NSWindowMBS.becomeKeyWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invoked automatically to inform the window that it has become the key window; never invoke this method directly.

This method reestablishes the window's first responder, sends the becomeKeyWindow message to that object if it responds, and posts an NSWindowDidBecomeKeyNotification to the default notification center.

NSWindowMBS.becomeMainWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invoked automatically to inform the window that it has become the main window; never invoke this method directly.

NSWindowMBS.enableCursorRects

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Reenables cursor rectangle management within the window after a disableCursorRects message.

NSWindowMBS.enableFlushWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Reenables the flushWindow method for the window after it was disabled through a previous disableFlushWindow message.

NSWindowMBS.enableSnapshotRestoration

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Enable snapshot restoration.

While snapshot restoration is enabled, the window will be snapshotted for restorable state.
Available in OS X v10.7 and later.

NSWindowMBS.endEditingFor(anObject as object = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Forces the field editor to give up its first responder status and prepares it for its next assignment.

anObject: The object that is using the window's field editor.

If the field editor is the first responder, it's made to resign that status even if its resignFirstResponder method returns false. This registration forces the field editor to send a textDidEndEditing message to its delegate. The field editor is then removed from the view hierarchy, its delegate is set to nil, and it's emptied of any text it may contain.

This method is typically invoked by the object using the field editor when it's finished. Other objects normally change the first responder by simply using makeFirstResponder, which allows a field editor or other object to retain its first responder status if, for example, the user has entered an invalid value. The endEditingFor: method should be used only as a last resort if the field editor refuses to resign first responder status. Even in this case, you should always allow the field editor a chance to validate its text and take whatever other action it needs first. You can do this by first trying to make the NSWindow object the first responder.

NSWindowMBS.fieldEditor(createFlag as boolean = True, forObject as object = nil) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the window's field editor, creating it if requested.

Returns NSTextMBS object. Returned as Variant to reduce plugin dependencies.

createWhenNeeded: If true, creates a field editor if one doesn't exist; if false, does not create a field editor.
A freshly created NSWindow object doesn't have a field editor. After a field editor has been created for a window, the createWhenNeeded argument is ignored. By passing false for createWhenNeeded and testing the return value, however, you can predicate an action on the existence of the field editor.
forObject: A text-displaying object for which the delegate (in windowWillReturnFieldEditor) assigns a custom field editor. Pass nil to get the default field editor, which can be the NSWindow field editor or a custom field editor returned by the delegate.

Returns the field editor for the designated object (anObject) or, if anObject is nil, the default field editor. Returns nil if createFlag is false and if the field editor doesn't exist.

The field editor is a single NSTextView object that is shared among all the controls in a window for light text-editing needs. It is automatically instantiated when needed, and it can be used however your application sees fit. Typically, the field editor is used by simple text-bearing objects—for example, an NSTextField object uses its window's field editor to display and manipulate text. The field editor can be shared by any number of objects, and so its state may be constantly changing. Therefore, it shouldn't be used to display text that demands sophisticated layout (for this you should create a dedicated NSTextView object).

The field editor may be in use by some view object, so be sure to properly dissociate it from that object before actually using it yourself (the appropriate way to do this is illustrated in the description of endEditingFor:). Once you retrieve the field editor, you can insert it in the view hierarchy, set a delegate to interpret text events, and have it perform whatever editing is needed. Then, when it sends a textDidEndEditing message to the delegate, you can get its text to display or store and remove the field editor using endEditingFor.

The window's delegate can substitute a custom field editor in place of the window's field editor by implementing windowWillReturnFieldEditor. The custom field editor can become the default editor (common to all text-displaying objects) or specific to a particular text-displaying object (anObject). The window sends this message to its delegate with itself and anObject as the arguments; if the delegate returns a non-nil value, the window returns that object instead of its field editor in fieldEditor. However, note the following:

If the window's delegate is identical to anObject, windowWillReturnFieldEditor isn't sent to the delegate.
The object returned by the delegate method, though it may become first responder, does not become the window's default field editor. Other objects continue to use the window's default field editor.

NSWindowMBS.firstResponder as NSResponderMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The window's first responder.

The first responder is usually the first object in a responder chain to receive an event or action message. In most cases, the first responder is a view object in that the user selects or activates with the mouse or keyboard.

You can use the firstResponder method in custom subclasses of responder classes (NSWindow, NSApplication, NSView, and subclasses) to determine if an instance of the subclass is currently the first responder. You can also use it to help locate a text field that currently has first-responder status. For more on this subject, see Event Handling Basics (on developer.apple.com).

NSWindowMBS.flushWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Flushes the window's offscreen buffer to the screen if the window is buffered and flushing is enabled.

Does nothing for other display devices, such as a printer. This method is automatically invoked by the NSWindow display and displayIfNeeded methods and the corresponding NSView display and displayIfNeeded methods.

NSWindowMBS.flushWindowIfNeeded

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Flushes the window's offscreen buffer to the screen if flushing is enabled and if the last flushWindow message had no effect because flushing was disabled.

To avoid unnecessary flushing, use this method rather than flushWindow to flush an NSWindow object after flushing has been reenabled.

NSWindowMBS.frameAutosaveName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 15.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The name used to automatically save the window's frame rectangle data in the defaults system.

(Read and Write computed property)

Some examples using this property:

NSWindowMBS.frameRectForContentRect(windowContent as NSRectMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the window's frame rectangle with a given content rectangle.

windowContent: The content rectangle for the window expressed in screen coordinates.

Returns the window's frame rectangle, expressed in screen coordinates, with windowContent.

The window uses its current style mask in computing the frame rectangle. See "Window Style Masks" for a list of style mask values. The major advantage of this instance-method counterpart to frameRectForContentRect (with styleMask) is that it allows you to take toolbars into account when converting between content and frame rectangles. (The toolbar is included in the frame rectangle but not the content rectangle.)

See also:

NSWindowMBS.GetFrame(byref left as Double, byref top as Double, byref width as Double, byref height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Asks for the current window dimensions.

The point 0/0 is on the left bottom position.

NSWindowMBS.gState as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the window's graphics state object.

This graphics state is used by default for all NSView objects in the window's view hierarchy, but individual views can be made to use their own with the NSView method allocateGState.

NSWindowMBS.Hide

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Hides the window.

NSWindowMBS.inLiveResize as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Indicates whether the window is being resized by the user.

Available in Mac OS X v10.6 and later.

NSWindowMBS.invalidateCursorRectsForView(View as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Marks as invalid the cursor rectangles of a given NSView object in the window's view hierarchy, so they'll be set up again when the window becomes key (or immediately if the window is key).

NSWindowMBS.invalidateRestorableState

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Method that you may call to indicate that the restorable state is invalid.

At some point in the future, encodeRestorableStateWithCoder: will be called to encode the restorable state. You should not override this method.

NSWindowMBS.invalidateShadow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invalidates the window shadow so that it is recomputed based on the current window shape.

NSWindowMBS.keyDown(e as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Handles a given keyboard event that may need to be interpreted as changing the key view or triggering a keyboard equivalent.

event: The keyboard event to process.

NSWindowMBS.makeFirstResponder(r as NSResponderMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Attempts to make a given responder the first responder for the window.
Example
Var MySearchField as NSViewMBS // your control to move focus to
Var w as new NSWindowMBS(window1)
call w.makeFirstResponder(MySearchField)

responder: The responder to set as the window's first responder. nil makes the window its first responder.

Returns true when the operation is successful; otherwise, false.

If responder isn't already the first responder, this method first sends a resignFirstResponder message to the object that is the first responder. If that object refuses to resign, it remains the first responder, and this method immediately returns false. If the current first responder resigns, this method sends a becomeFirstResponder message to responder. If responder does not accept first responder status, the NSWindow object becomes first responder; in this case, the method returns true even if responder refuses first responder status.

If responder is nil, this method still sends resignFirstResponder to the current first responder. If the current first responder refuses to resign, it remains the first responder and this method immediately returns false. If the current first responder returns true from resignFirstResponder, the window is made its own first responder and this method returns true.

The Application Kit framework uses this method to alter the first responder in response to mouse-down events; you can also use it to explicitly set the first responder from within your program. The responder object is typically an NSView object in the window's view hierarchy. If this method is called explicitly, first send acceptsFirstResponder to responder, and do not call makeFirstResponder if acceptsFirstResponder returns false.

Use setInitialFirstResponder to the set the first responder to be used when the window is brought onscreen for the first time.

NSWindowMBS.makeKeyAndOrderFront

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the front of the screen list, within its level, and makes it the key window; that is, it shows the window.

More or less the same as Xojo's show command on the window class.

NSWindowMBS.makeKeyWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Makes the window the key window.

NSWindowMBS.makeMainWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Makes the window the main window.

NSWindowMBS.mergeAllWindows

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Merges all windows into one window.
Example
Var n as NSWindowMBS = window1.NSWindowMBS
n.mergeAllWindows

Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.miniaturize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method removes the receiver from the screen list and displays the minimized window in the Dock.

Some examples using this method:

NSWindowMBS.moveTabToNewWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves current tab to a new window.
Example
Var n as NSWindowMBS = window1.NSWindowMBS
n.moveTabToNewWindow

Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.orderBack

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the back of its level in the screen list, without changing either the key window or the main window.

NSWindowMBS.orderFront

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the front of its level in the screen list, without changing either the key window or the main window.

NSWindowMBS.orderFrontRegardless

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the front of its level, even if its application isn't active, without changing either the key window or the main window.

Normally an NSWindow object can't be moved in front of the key window unless it and the key window are in the same application. You should rarely need to invoke this method; it's designed to be used when applications are cooperating in such a way that an active application (with the key window) is using another application to display data.

Available in Mac OS X v10.0 and later.

NSWindowMBS.orderOut

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Removes the window from the screen list, which hides the window.

More or less the same as Xojo's hide command on the window class.

If the window is the key or main window, the NSWindow object immediately behind it is made key or main in its place. Calling the orderOut method causes the window to be removed from the screen, but does not cause it to be released. See the close method for information on when a window is released.

The default animation based on the window type will be used when the window is ordered out unless it has been modified by the setAnimationBehavior method.

NSWindowMBS.PerformClose

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method simulates the user clicking the close button by momentarily highlighting the button and then closing the window.

Same as if the user clicks the close button.
So if the button is disabled or closing is not permitted by the window, it will do nothing.

NSWindowMBS.performMiniaturize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method simulates the user clicking the minimize button by momentarily highlighting the button, then minimizing the window.

If the receiver doesn't have a minimize button or can't be minimized for some reason, the system emits the alert sound.

Some examples using this method:

NSWindowMBS.performWindowDragWithEvent(event as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 20.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Starts a drag based on the specified mouse-down event.

event: The original mouse-down event received by the application or a view. If you don't have a NSEvent object, please pass the one from NSApplicationMBS.currentEvent here.

Your application (or a view) can call this method after receiving and examining a mouse-down event. Upon examination of the event, a view may allow that portion of the window to start a window drag and can hand off the work to the Window Server process by calling this method. Doing so allows the window to participate in space switching and other system features.
This method returns right away, and a mouse-up event may not get sent.

NSWindowMBS.performZoom

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method simulates the user clicking the zoom box by momentarily highlighting the button and then zooming the window.

If the receiver doesn't have a zoom box or can't be zoomed for some reason, the computer beeps.

Some examples using this method:

NSWindowMBS.print

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method runs the Print panel, and if the user chooses an option other than canceling, prints the window (its frame view and all subviews).

NSWindowMBS.registerForDraggedTypes(Types() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Registers a give set of pasteboard types as the pasteboard types the window will accept as the destination of an image-dragging session.

Types: An array of the pasteboard types the window will accept as the destination of an image-dragging session.

Registering an NSWindow object for dragged types automatically makes it a candidate destination object for a dragging session. NSWindow has a default implementation for many of the methods in the NSDraggingDestination informal protocol. The default implementation forwards each message to the delegate if the delegate responds to the selector of the message. The messages forwarded this way are draggingEntered:, draggingUpdated:, draggingExited:, prepareForDragOperation:, performDragOperation:, and concludeDragOperation:.

Xojo with Cocoa target implements the methods listed above. So this method is useful to change the allowed types for the case the framework has a bug.

NSWindowMBS.removeChildWindow(win as NSWindowMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Detaches a given child window from the window.

win: The child window to detach.

See also:

Some examples using this method:

NSWindowMBS.removeChildWindow(win as window)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Detaches a given child window from the window.

win: The child window to detach.

See also:

NSWindowMBS.resetCursorRects

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Clears the window's cursor rectangles and the cursor rectangles of the NSView objects in its view hierarchy.

Invokes discardCursorRects to clear the window's cursor rectangles, then sends resetCursorRects to every NSView object in the window's view hierarchy.

This method is typically invoked by the NSApplication object when it detects that the key window's cursor rectangles are invalid. In program code, it's more efficient to invoke invalidateCursorRectsForView.

NSWindowMBS.resignKeyWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invoked automatically when the window resigns key window status; never invoke this method directly.

This method sends resignKeyWindow to the window's first responder, sends windowDidResignKey to the window's delegate, and posts an NSWindowDidResignKeyNotification to the default notification center.

Next items

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


The biggest plugin in space...