Documentation
¶
Overview ¶
bubble-api.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.26 bubble-call.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.24 bubble-console.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.24 bubble-externallibs.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.24 bubble-preprocessor.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.22 bubble_getdata.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.21 bubble_main.go (c) 2017 Jeroen Petrus Broks. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. Version: 17.12.26
Index ¶
- Variables
- func BREG(f func(l *lua.State))
- func Call(l *lua.State, ac, rc int)
- func ConsoleToDefault()
- func CreateBubble(id string) *lua.State
- func Error(txt string)
- func Fatal(txt string)
- func GetBubble(id string) *lua.State
- func GetData(a string) []byte
- func LoadScript(id, script string)
- func QCall(l *lua.State, f string, rc int, funcargs ...string)
- func QPCall(l *lua.State, f string, rc, eh int, funcargs ...string) error
- func SetConsole(wrt, wrtln func(col, txt string), er func(txt string, fatal ...bool), ...)
- func SetJCR(jcrfile string) jcr6main.TJCR6Dir
- func TextScript(id, script, name string)
- func Warn(txt string)
- func Write(col, txt string)
- func WriteLn(col, txt string)
- type TBubble
Constants ¶
This section is empty.
Variables ¶
var CompileChat = true
When set true the styem will note what it compiles. When set to false it will keep this silent.
var Console tBubbleConsole
Contains the functions you can use to output log data.
Functions ¶
func BREG ¶
func BREG(f func(l *lua.State))
Registers a function that needs to be executed when a new Lua VM is created. Basically this routine has to make sure all libraries added to Lua are automatically added.
func Call ¶
func Call(l *lua.State, ac, rc int)
Works like a regular Lua call, but in stead of regular Lua crashouts through the panic system and such, this routine will still crash, but through all regularly set up routines, meaning you will see error messages the way the creator of the engine intended and that the any undo routines can run like planned. If you need not to crashout, you can still use Lua's own protected call. For most bubble engines it's however best that you never use the regular Call as "panic" can cause memory leaks.
func ConsoleToDefault ¶
func ConsoleToDefault()
Resets the console to the default setting, which is through the standard "log" out put of Go.
func CreateBubble ¶
func CreateBubble(id string) *lua.State
func LoadScript ¶
func LoadScript(id, script string)
Loads a script to a VM with id <id> If the script does not exist it will be created, if it does exist the current stuff will be added.
func QCall ¶
This routine accepts a function and a line of strings as parameters. Please note strings only for parameters here. Values returned by the lua call are ignored, BUT they can still read out with regular lua routines.
func SetConsole ¶
func SetConsole(wrt, wrtln func(col, txt string), er func(txt string, fatal ...bool), wr func(txt string))
You can set your own functions with this to make Bubble write its logs and throw its errors.
func TextScript ¶
func TextScript(id, script, name string)