+ Reply to Thread
Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By dOxxx

Thread: LibSimpleWidgets -- does it support the new event model, or will it, some day?

  1. #1
    Wym
    Wym is offline
    Shadowlander
    Join Date
    Jun 2012
    Posts
    25

    Default LibSimpleWidgets -- does it support the new event model, or will it, some day?

    Hi all,

    i'm in progress of converting my addons to the new event model, one by one. However, i'm using LibSimpleWidgets in some of them, and while that library has been updated in april, it seems it doesn't support the new model yet. Searching this forum for LibSimpleWidgets didn't find much either.

    So, does anyone know if LibSimpleWidgets is still being developed? When the old event model becomes obsolete, will LibSimpleWidgets still work? And will the interface stay the same, or will it be converted to something that "looks" more like the new Event model?

    Basically, i seem to have 3 options:
    - remove all dependencies from LibSimpleWidgets and switch to one of the other UI libraries, which would mean a lot of work
    - rewrite all event stuff that has nothing to do with LibSimpleWidgets, leave all references to LibSimpleWidgets as they are, and hope it will be updated and keep its old interface when the old Event model becomes obsolete - which could mean my addons will break (if LSW doesn't get updated anymore) or i have to touch them again (if the LSW interface changes)
    - just do nothing until there's an official statement as to when and how LSW will be updated (which might never come, again breaking my addons when the old event model is obsolete)

    What would you do? Or, is there any official statement from the LSW author that i've missed?

  2. #2
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    As I understand it, its only Global events that have so far been moved over to the new event model, and frame events (which LSW would be using) are still using the old event model.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  3. #3
    Wym
    Wym is offline
    Shadowlander
    Join Date
    Jun 2012
    Posts
    25

    Default

    Hm.

    Until Version 2.0 (?), we had

    table.insert(Event.Buff.Add, { Equalizer.BuffAdded, "Equalizer", "BuffAdded" })

    which became

    Command.Event.Attach(Event.Buff.Add, Equalizer.BuffAdded, "BuffAdded" })

    and we had

    function MyFrame.Event:MouseMove(x, y)
    ...
    end


    which became

    function MyFrame:EventMouseMove(handle, x, y)
    ...
    end
    border:EventAttach(Event.UI.Input.Mouse.Cursor.Mov e, MyFrame.EventMouseMove, "MouseMove", -2)

    (the name MyFrame:EventMouseMove is my own invention, anything else would work as well).

    Right now, both versions (the red one and the green one) work, for global events and for frame events alike. And as i understand it, the red one will be obsolete in the next minor version, for global and frame events. Which means, both have to be converted. Of course, LSW uses only frame events, so if they don't become obsolete, i'd be happy (for a while), but as i understand it, both event types have been converted now, and the old ones will become obsolete soon.
    Last edited by Wym; 08-02-2013 at 07:29 AM.

  4. #4
    Telaran
    Join Date
    Mar 2012
    Posts
    72

    Default

    The issue is that you can't create custom frame events. So some of the widgets which create custom events can't be moved over yet, as they get treated like new global events, and don't have the frame passed into them.

    I believe it's somewhere in the bug thread.

  5. #5
    Rift Disciple
    Join Date
    Jan 2011
    Posts
    147

    Default

    Hi, I'm the author of LibSimpleWidgets.

    The situation is as Mere says. LSW needs to be able to define its own events for frames, such as "ItemSelect" for the List widget. This is not currently possible with the new event system.

    I'm hoping that Zorba will not remove the old frame events system until he has made this possible. If he does make it possible, I will definitely update LSW to use the new event system. Until then, it is out of my hands.

    -dOxxx
    Last edited by dOxxx; 08-08-2013 at 07:33 PM.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts