Dragonflight : EditMode System
I know it's unlikely, but just in case someone was fortunate to have had time to figure this out for their needs any idea why this is having a problem ?
Seeing as nUI and the new EditMode system doesn't get along at all, I have been attempting to rebuild at least some of nUI and use the EditMode system in it and thus removing the need of nUI's mover system. Now, with the minimap having the smallest editmode setup I thought I would try to emulate what it does to do its stuff with the EditMode system. Now, looking at ( https://github.com/Gethe/wow-ui-sour...ML/Minimap.xml / https://github.com/Gethe/wow-ui-sour...ML/Minimap.lua ) we have an inherit to a template in ( https://github.com/Gethe/wow-ui-sour...mTemplates.xml ) which has a mixin coded in ( https://github.com/Gethe/wow-ui-sour...mTemplates.lua ) But we don't stop there... inside the minimap editmode template there are a few key values set up with one of them being the Edit Mode System that is linked to it (Enum.EditModeSystem.Minimap) . Sounds good so far right ? Lua Code:
Wrong! So, using this as a guide I have extracted just the dashboard display code including its scaling code and displays fine on the screen using its regular coding and .. doesn't error out when trying to use the EditMode system Lua Code:
I then copied the minimaps EditMode SystemMixin and renamed/edited it to work for the dashboard with Minimap replaced with Dashboard and HeaderUnderneath functions with an Etc function Lua Code:
Lua Code:
With this being the first line of my Dashboard frame setting up the appropriate files Lua Code:
Now the regular mixin for this frame has no issues .. but yet the EditMode one did despite being created in the same way. I am also not getting errors about trying to index Enum.EditModeSystem or Enum so attaching my code to it appears to be fine even though I can't find where Enum and EditModeSystem are set up so possibly behind the scenes. So, to ask my question again. Anyone know why this could be happening ? Or have an example of how to use the EditMode system on your own frames. Thanks. |
Quote:
Also, if you're adding things accessible by the global environment, you need to keep name collisions in mind. Generic names like Enum.EditModeSystem.Dashboard and EditModeDashboardSystemMixin are more likely to cause conflict than something that more uniquely identifies that they are from your addon. You also may want to avoid inserting values into Blizzard enums if you're thinking of heading in that direction. |
Start Edit
I decided to create my own table and reference that instead of the Enum path I saw their frames use. The EditMode error popped up. All I did was change from their Enum tables to my own tables. EditMode clearly doesn't want you to use their moving system it seems. Or, hopefully they just haven't finished it enough to allow addons to use it yet. End Edit Yeah, I noticed the first part was a table situation but putting it into a table and trying to get that table recognised by the EditMode system was even more of a problem. So back to the drawing board. Naming aside, it's just for a test on my system, more unique naming would have applied if it ever went live as I have always done - in fact almost all of my data is local to avoid public collisions. Unfortunately almost all of nUI is fully public so I have got a fair task to correct that issue at the same time as everything else. As to adding it to their Enums, at the moment that is the only way I can see it working. I am just hoping I can figure out what nUI is doing that EditMode doesn't like and can fix that problem which prompted error messages like the following, otherwise I may have to do a full re-write of nUI if nUI can't handle Blizzard frame movements now if the EditMode system wants to have the only access : Lua Code:
|
From what I can see, it isn't made to handle addons, though it does send "EditMode.Enter" and "EditMode.Exit" messages through EventRegistry:TriggerEvent().
|
Yeah I saw those. But alas doesn't help my situation. Back to the initial idea of rewriting nUI while avoiding upsetting EditMode. I'll just keep my currently working with no errors but no EditMode option for the frame in question ( with the only EditMode Code I can identify ) as back up in case it gets figured out/added later.
Thanks for taking a look see though. Quote:
|
Sorry to necro this thread. But I use an old addon called _DevPad that I think has been broken from this EdixMode change.
I have limped it along with minor patches to keep the functionality working until now. I play WOTLK Classic. As of yesterday, there are huge problems with it. When I go into a _Devpad window (basically an instance of notepad a giant edit box), I cannot copy, paste, or delete anything. Also it will steal keybind focus forever until I log out and back in (because I would have to type /reload which I can't because keybind focus is stolen) I have no idea how to fix this but I imagine it has something to do with this change. I am looking for someone to patch it into working condition, and I will pay $200 with paypal, venmo, cash app, or whatever you want. I am desperate |
Quote:
|
All times are GMT -6. The time now is 12:03 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI