项目作者: mesopelagique

项目描述 :
my macro utility function to edit or create macro
高级语言: 4D
项目地址: git://github.com/mesopelagique/Macross.git
创建时间: 2020-08-13T04:17:29Z
项目社区:https://github.com/mesopelagique/Macross

开源协议:

下载


Macross ✈ 🤖

My macro utility class to edit or create macro

build your macross

ie. create an object instance which contains a list of macros

  1. var $マクロス: Object // name it as you want, here MaKuRoSu!
  2. $マクロス:=macross($input) // or macross()

with $input macro xml text, or a File or a collection of macro as objects.

If no arg current database macro xml file will be parsed (file named Macros.xml, subject to change to be more flexible)

read

  1. $マクロス.macros // a collection of object

edit

add a new

  1. $rankaLee:=New object("name"; "Evaluate and replace/€"; "in_menu"; "true"; "type_ahead"; "false"; "version"; "2")
  2. $rankaLee.text:="<text><method>Macro_evaluateAndReplace()</method></text>"
  3. $マクロス.macros.push(rankaLee)

text attribute is not parsed for the moment

export to xml file

to origin file

  1. $マクロス.export()

if no origin file (ex: if the input is an xml string or an objects collection, default component path will be used)

to a specific File

  1. $マクロス.exportToFile($yourFile) // 4D.File

user interface

This project contains also a form which could display and edit the Macross class, a very simple list box.

TODO

  • simple macro to create and add a new macro by just typing method to call