Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/AppleScript/AppleScript Editor Cocoa


Required plugins for this example: MBS MacCocoa Plugin, MBS MacBase Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/AppleScript/AppleScript Editor Cocoa

This example is the version from Wed, 27th Oct 2020.

Project "AppleScript Editor Cocoa.xojo_binary_project"
Class Window1 Inherits Window
Control EditField1 Inherits TextArea
ControlInstance EditField1 Inherits TextArea
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() format End EventHandler
End Control
Sub format() dim source as string = EditField1.text dim n as new NSAppleScriptMBS(source) // compile if n.compile then // format text dim richtext as NSAttributedStringMBS = n.richTextSource dim tv as NSTextViewMBS = EditField1.NSTextViewMBS tv.textStorage.setAttributedString richtext else // compile error beep end if End Sub
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu7 = ""
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
MenuItem UntitledMenu6 = ""
MenuItem UntitledMenu5 = ""
MenuItem UntitledMenu4 = ""
End MenuBar
Class App Inherits Application
End Class
ExternalFile info
End ExternalFile
End Project

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


The biggest plugin in space...