(2 Kb)
Updated: 06/13/24 04:45 AM
File Info
Gold Road (10.0.0)
Scions of Ithelia (9.3.0)
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Updated:06/13/24 04:45 AM
Created:08/05/23 01:25 PM
Monthly downloads:98
Total downloads:985
ToggleGroupFrame (and Companion Unit Frame)
Version: 1.3.2
by: Saint-Ange [More]
Two toggles for enhanced control:
  1. Toggle the group frame's visibility using a keybind or chat command: /togglegroupframe or /tgf.
  2. Toggle the group frame's visibility in combat via a keybind or chat command: /togglegroupframeincombat or aliases /tgfc and /tgfic."
1.3.2 API Update 42
1.3.1 Terrible mistakes were made. Saved variables not yet working as intended.
1.3.0 API Update 41. Added a second toggle to show/hide in combat while initialy hidden.
1.2.1 Should follow a propper and more structured approach to load this addon's code, thanks to Baertram.
1.2.0 Hide the Group Frame by default at the start of the game or after a reloadui. Shortened the slash command.
1.1.0 API Update 40 - Secret of the Telvanni.
1.0.0 Release.
Optional Files (0)

Archived Files (4)
File Name
03/14/24 03:04 PM
02/14/24 02:05 AM
11/01/23 01:17 AM
08/05/23 01:25 PM

Post A Reply Comment Options
Unread 02/14/24, 02:15 AM  
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 27
Uploads: 4
Hi Baertram,

Thank you very much for your help!

Lua code is typically executed in a sequential manner, starting from the top of the script and moving down line by line. However, there are nuances to this process:

1. **Sequential Execution**: Lua executes code sequentially by default, meaning it starts at the top of the script and moves down, line by line, executing each statement or block of code as it encounters them.

2. **Control Structures**: Lua supports control structures like loops (for, while) and conditionals (if-else), which can alter the flow of execution. When Lua encounters these structures, it may jump to different parts of the script based on certain conditions or iterate over sections of code multiple times.

3. **Function Calls**: Lua allows defining and calling functions. When a function is called, Lua temporarily suspends execution of the current code block, executes the function's body, and then returns to where it left off in the original code.

4. **Callbacks and Event Handling**: In Lua environments like game development or GUI programming, code may not follow a strictly sequential execution model. Instead, certain parts of the code may be executed in response to events triggered by user input, system events, or other asynchronous processes.

5. **Coroutines**: Lua also supports coroutines, which are a way to achieve cooperative multitasking. Coroutines allow suspending and resuming execution at certain points, enabling more complex control flows and concurrency patterns.

So, while Lua typically executes code from top to bottom, the presence of control structures, function calls, event handling mechanisms, and coroutines can introduce non-linear execution paths.
Report comment to moderator  
Reply With Quote
Unread 02/13/24, 03:44 PM  
Super Moderator
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5098
File comments: 6181
Uploads: 78
Hi Saint-Ange,

your addon should not put the code directly into the lua file but you must use the EVENT_ADD_ON_LOADED properly for YOUR addon to load, and in there do your addon stuff then.
Else it could be that code your addon needs was not finished yet and it fails to work properly, and or libraries you might add won't work.

Described here for example:

Remember to unregister your EVENT_ADD_ON_LOADED again after your addon was loaded, else it fires again and again for each other addon.

Please change that code lines accordingly, thanks.
Report comment to moderator  
Reply With Quote
Post A Reply

Category Jump: