Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

TouchBar.AssignToApp

Assigns the TouchBar to be the main one for current app.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
TouchBar 6.5 Yes No No No No

MBS( "TouchBar.AssignToApp"; TouchBarRef )

Parameters

Parameter Description Example value
TouchBarRef The reference number for the touch bar. $TouchBar

Result

Returns OK or error.

Description

Assigns the TouchBar to be the main one for current app.

Examples

Build App TouchBar:

#Create a new TouchBar
Set Variable [$t; Value:MBS( "TouchBar.Create" )]
#Add two buttons
Set Variable [$r; Value:MBS( "TouchBar.AddButton"; $t; "AddRecord"; ""; "NSImageNameTouchBarAddTemplate"; "Add"; 0; Get(FileName); "AddRecordTouchBar" )]
Set Variable [$r; Value:MBS( "TouchBar.AddButton"; $t; "DeleteRecord"; ""; "NSImageNameTouchBarDeleteTemplate"; "Delete"; 0; Get(FileName); "DeleteRecordTouchBar" )]
Set Variable [$r; Value:MBS( "TouchBar.AddButton"; $t; "InfoButton"; ""; TouchBar::MBS; "Info"; 0; Get(FileName); "InfoTouchBar" )]
#Set which button show by default:
Set Variable [$r; Value:MBS( "TouchBar.SetDefaultItemIdentifiers"; $t; "AddRecord¶InfoButton¶NSTouchBarItemIdentifierOtherItemsProxy")]
#Set the primary button:
Set Variable [$r; Value:MBS( "TouchBar.SetPrincipalItemIdentifier"; $t; "AddRecord" )]
#Set which buttons can be configured:
Set Variable [$r; Value:MBS( "TouchBar.SetCustomizationAllowedItemIdentifiers"; $t; "AddRecord¶InfoButton¶DeleteRecord")]
#Set this touch bar to be the app one:
Set Variable [$r; Value:MBS( "TouchBar.AssignToApp"; $t )]

See also

Example Databases


TouchBar.AddButton   -   TouchBar.AssignToWindow

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins