Go to Page... |
Compatibility: | Scions of Ithelia (9.3.0) |
Updated: | 06/01/24 12:42 PM |
Created: | 05/29/24 06:36 PM |
Monthly downloads: | 258 |
Total downloads: | 259 |
Favorites: | 0 |
MD5: |
File Name |
Version |
Size |
Uploader |
Date |
0.1.0 |
4kB |
theFeltes |
05/30/24 12:40 AM |
|
0.0.1 |
5kB |
theFeltes |
05/29/24 06:36 PM |
![]() |
Comment Options |
theFeltes |
View Public Profile |
Send a private message to theFeltes |
Find More Posts by theFeltes |
Add theFeltes to Your Buddy List |
![]() |
|||
|
Only for the control's params of the anchoring it does, yes.
As each control is anchored by default to it's parent control, you can leave the anchorTo controls empty and it will just use the parent control to anchor to then. Other params like anchorMySide (e.g. LEFT) to the otherControlsSide (e.g. RIGHT, where otherControl would be parent then) will still bed used properly. Often you'll find code like this at the top of functions too: param1 = param1 or false or param1 = param1 or {} It will just make sure the param1 will not be nil in the end and errors due to that if param1 will be accessed, so that's another way of definig a "fallback".
|
||
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
|
so the anchor accepts a nil and defaults to something else? that's some weird choice of behavior if i've ever seen any.
|
|
![]() |
![]() |
theFeltes |
View Public Profile |
Send a private message to theFeltes |
Find More Posts by theFeltes |
Add theFeltes to Your Buddy List |
![]() |
|||
|
If you do no define a variable explitily it will be created automatically once assigning a value, using the type you pass in to it.
But it's global then in the table _G and accessible to all other addons + overwriting other addon's/ZOs ESOUI code in _G table. If the variable is not existing because nothing was assigned to it, it's nil and it's okay to have it in the code "until you try to access that variable somewhere". This will raise a nil error then. -> The control's anchors accept nil values for some params (anchorToCntrol e.g.) so this would never error there for that param! If a reference control in an anchor is nil it will just use the parent control automatically afaik.
Last edited by Baertram : 05/30/24 at 09:42 AM.
|
||
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
|
About the nil var in the anchor, yeah, i usually use software that marks those things out for me, didn't think this project would justify installing VS so i just went with plain old Notepad++, guess i missed one, or two, considering vMP wasn't defined but still assignable, ESO's LUA is kinda weird coming from LUAU.
Last edited by theFeltes : 05/30/24 at 12:46 AM.
|
|
![]() |
![]() |
theFeltes |
View Public Profile |
Send a private message to theFeltes |
Find More Posts by theFeltes |
Add theFeltes to Your Buddy List |
![]() |
|
|
Hi and welcome to ESO addon development.
Hint: Your released gui xml file is totally empty (allthough not called from your manifest txt so I guess it was added to the zip by accident). And you are using LibAddonMenu2 in your lua file but it is not in your txt files dependencies! You should add it as LibAddonMenu2>=36 and name all the (optional)dependencies at the addon description site please, as described here: https://www.esoui.com/forums/showthread.php?t=10790 Thank you Another hint about LAM: registerForRefresh = true, is only needed if you got e.g multiple controls in your LAM panel and changing control1 should update the ohr controls's disabled state etc. (setfunc of control1 will run getFunc of all other controls of your panel then). So currently it does not make sense to enable that in your LAM panel. Found global leaking variables: In function UI2Clipboard.ResetWinPos vMP Should be local vMP=UI2Data.vars["MenuPos"] I guess? In your function UI2Clipboard.SetupMenu, line 220 you anchor a control to the control cButDrop butTxt:SetAnchor(CENTER, cButDrop, CENTER, 0,hgtOS) But cButDrop will be created later at lines 233ff so it is nil at that line 220 Your function TextToClipboard should be either local, or added to your global table UI2Clipboard.TextToClipboard instead of having it with that non-unique name. Or rename it to UI2Clipboard_TextToClipboard for example.
Last edited by Baertram : 05/29/24 at 07:01 PM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |