Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/AppleScript/AppleScript Editor Cocoa
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa 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 Fri, 21th Nov 2013.
Project "AppleScript Editor Cocoa.rbp"
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 UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

Feedback, Comments & Corrections

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

MBS FileMaker Plugins