Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSViewMBS.previousValidKeyView as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.2 Yes No No Yes, macOS only No
Function: Returns the closest view object in the key view loop that precedes the receiver and accepts first responder status.
Notes:
This method ignores hidden views when it determines the previous valid key view.
Returns nil on any error.

Feedback, Comments & Corrections

NSViewMBS.print
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.4 Yes No No Yes, macOS only No
Function: This action method opens the Print panel, and if the user chooses an option other than canceling, prints the receiver and all its subviews to the device specified in the Print panel.

Feedback, Comments & Corrections

NSViewMBS.registeredDraggedTypes as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns the array of pasteboard drag types that the view can accep
Example:
// we register some types
Listbox1.AcceptPictureDrop
Listbox1.AcceptTextDrop

// and query them:
MsgBox Join(Listbox1.NSViewMBS.registeredDraggedTypes, EndOfLine)

' shows:
'NeXT TIFF v4.0 pasteboard type
'com.apple.traditional-mac-plain-text
'NSStringPboardType
Notes: This method returns the types registered by calling registerForDraggedTypes:. Each element of the array is a uniform type identifier. The returned elements are in no particular order, but the array is guaranteed not to contain duplicate entries.

Feedback, Comments & Corrections

NSViewMBS.registerForDraggedTypes(Types() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.1 Yes No No Yes, macOS only No
Function: Registers the pasteboard types that the receiver will accept as the destination of an image-dragging session.
Notes:
Types: An array of uniform type identifiers. See Types for Standard Data (Mac OS X 10.6 and later) for descriptions of the pasteboard type identifiers.

Registering an NSView object for dragged types automatically makes it a candidate destination object for a dragging session. As such, it must properly implement some or all of the NSDraggingDestination protocol methods. As a convenience, NSView provides default implementations of these methods. See the NSDraggingDestination protocol specification for details.

Real Studio 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.

Feedback, Comments & Corrections

NSViewMBS.removeAllToolTips
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.0 Yes No No Yes, macOS only No
Function: Removes all tool tips assigned to the receiver.

Feedback, Comments & Corrections

NSViewMBS.removeFromSuperview
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 8.0 Yes No No Yes, macOS only No
Function: Unlinks the view from its superview and its window, removes it from the responder chain, and invalidates its cursor rectangles.

Feedback, Comments & Corrections

NSViewMBS.removeFromSuperviewWithoutNeedingDisplay
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.0 Yes No No Yes, macOS only No
Function: Unlinks the receiver from its superview and its window and removes it from the responder chain, but does not invalidate its cursor rectangles to cause redrawing.
Notes:
The receiver is also released; if you plan to reuse it, be sure to retain it before sending this message and to release it as appropriate when adding it as a subview of another view.

Unlike its counterpart, removeFromSuperview, this method can be safely invoked during display.

Feedback, Comments & Corrections

NSViewMBS.RenderImage(subviews as boolean=false) as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 8.5 Yes No No Yes, macOS only No
Function: Renders a picture of the view.
Example:
dim n as new NSProgressIndicatorMBS
n.sizeToFit

dim image as NSImageMBS = n.RenderImage
dim pic as Picture = image.CopyPicture

Backdrop = pic
Notes:
May return nil on any error.
The value of this variant must be an object of class NSImageMBS.

Feedback, Comments & Corrections

NSViewMBS.replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.0 Yes No No Yes, macOS only No
Function: Replaces one of the receiver's subviews with another view.
Notes:
oldView: The view to be replaced by newView. May not be nil.
newView: The view to replace oldView. May not be nil.

This method does nothing if oldView is not a subview of the receiver.
Neither oldView nor newView may be nil, and the behavior is undefined if either of these parameters is nil.

Feedback, Comments & Corrections

NSViewMBS.rotateByAngle(angle as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.1 Yes No No Yes, macOS only No
Function: Rotates the receiver's bounds rectangle by a specified degree value around the origin of the coordinate system, (0.0, 0.0).
Notes:
angle: A float value specifying the angle of rotation, in degrees.

See the BoundsRotation property description for more information. This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with display or NeedsDisplay.

This method posts an NSViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

Feedback, Comments & Corrections

NSViewMBS.scaleUnitSquareToSize(size as NSSizeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.0 Yes No No Yes, macOS only No
Function: Scales the receiver's coordinate system so that the unit square scales to the specified dimensions.
Notes:
For example, a newUnitSize of (0.5, 1.0) causes the receiver's horizontal coordinates to be halved, in turn doubling the width of its bounds rectangle. Note that scaling is performed from the origin of the coordinate system, (0.0, 0.0), not the origin of the bounds rectangle; as a result, both the origin and size of the bounds rectangle are changed. The frame rectangle remains unchanged.

This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with display or setNeedsDisplay.

This method posts an NSViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

Feedback, Comments & Corrections

NSViewMBS.setBoundsOrigin(origin as NSPointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the bounds origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setBoundsOrigin(x as Double, y as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the bounds origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setBoundsSize(size as NSSizeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the bounds size of the nsview.

See also:

Feedback, Comments & Corrections

NSViewMBS.setBoundsSize(width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the bounds size of the nsview.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFocus
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.2 Yes No No Yes, macOS only No
Function: Convenience function to set the focus to this view.
Notes: Calls internally makeFirstResponder on NSWindow.

Feedback, Comments & Corrections

NSViewMBS.setFrameOrigin(origin as NSPointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the frame origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFrameOrigin(x as Double, y as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the frame origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFrameSize(size as NSSizeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the frame size.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFrameSize(width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the frame size.

See also:

Feedback, Comments & Corrections

NSViewMBS.subviews(recursive as boolean = false) as NSViewMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The immediate subviews.
Notes:
The order of the subviews may be considered as being back-to-front, but this does not imply invalidation and drawing behavior. The order is based on the order of the receiver's subviews as specified in the nib file from which they were unarchived or the programmatic interface for modifying the receiver's subview list. This ordering is also the reverse of the order in which hit-testing is done.

If recursive is true, we include all subviews of all subviews. (new in 14.2)

Feedback, Comments & Corrections

NSViewMBS.unregisterDraggedTypes
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.1 Yes No No Yes, macOS only No
Function: Unregisters the receiver as a possible destination in a dragging session.

Feedback, Comments & Corrections

Previous items

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




Links
MBS FileMaker blog