Riftui

Riftui (https://www.riftui.com/forums/index.php)
-   General Authoring Discussion (https://www.riftui.com/forums/forumdisplay.php?f=20)
-   -   All I wanted was a simple answer.. LOL (https://www.riftui.com/forums/showthread.php?t=184)

Myrroddin 11-19-11 12:13 PM

All I wanted was a simple answer.. LOL
 
Yeah, a simple answer, because I knew converting LibDataBroker to Rift, given my existing code, wasn't working correctly. Apologies to anyone who tried to use it and failed.

The weird news is that I must dust off LibStub and CallbackHandler for Rift. I'm still letting Rift handle the version checking, and just using LibStub to load the library files. LibDataBroker's code design effectively forces the use of CBH. I tried using Utility.Event.Create, and while it is probably great for native Rift libraries, converting WoW addons and libs that used CBH becomes next to impossible. Hey, Zorba tried; it's all good.

Here's where it gets interesting. During the process, OrionShock on the WowAce boards essentially coded up a Rift event handler to CallbackHandler bridge.

That's right, you read that correctly.
Code:

local eventFrame = {}
eventFrame:RegisterEvent("Some.Rift.Event")
function MyAddon:Some_Rift_Event()
end

You will notice the _'s and .'s and that they are different? That's important.

But here's the really, really cool part. This is now 90% of making AceEvent for Rift. Does that interest anyone?


All times are GMT -6. The time now is 06:54 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2022 MMOUI