Platforms to show: All Mac Windows Linux Cross-Platform

/Tools/JavaScript/JavaScript AES/JavaScript AES


Required plugins for this example: MBS Tools Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Tools/JavaScript/JavaScript AES/JavaScript AES

This example is the version from Mon, 19th Jan 2020.

Project "JavaScript AES.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
EventHandler Sub DoubleClick() MsgBox me.Cell(me.ListIndex,0) End EventHandler
End Control
Control InputText Inherits TextArea
ControlInstance InputText Inherits TextArea
End Control
Control EvalButton Inherits PushButton
ControlInstance EvalButton Inherits PushButton
EventHandler Sub Action() Try Dim s As String = je.EvaluateToString(InputText.Text) List.AppendRow s Catch j As JavaScriptEngineExceptionMBS List.AppendRow "Exception: "+j.Message End Try End EventHandler
End Control
EventHandler Sub Open() je = New JavaScriptEngineMBS // read aes.js file: Dim f As FolderItem = GetFolderItem("aes.js") Dim b As BinaryStream = BinaryStream.Open(f) Dim s As String = b.Read(b.Length, encodings.UTF8) // evaluate to install Dim n As Variant = je.Evaluate(s) End EventHandler
Property je As JavaScriptEngineMBS
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
Module Module1
Sub AppendRow(extends l as listbox, s as string) l.AddRow s l.ScrollPosition = l.ListCount // go to end End Sub
End Module
End Project

See also:

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


The biggest plugin in space...