Object Creation
roElectron takes two parameters: a filename and an options parameter.
Code Block | ||
---|---|---|
| ||
aa = CreateObject("roAssociativeArray")
aa.message_port = my_message_port
aa.arguments = CreateObject("roArray")
aa.arguments[0] = "arg1"
aa.arguments[1] = "arg2"
aa.node_arguments = CreateObject("roArray")
aa.node_arguments = {"node_arg1", "node_arg2")
aa.env_vars = CreateObject("roAssociativeArray")
aa.env_vars.AddReplace("ENV_VAR_1", "test")
aa.env_vars.AddReplace("ENV_VAR_2", "true")
node = CreateObject("roElectron", "path/to/my/application", aa) |