Perl Lite

44 - Add a toggle for enabling frames

Each frame has a toggle option that affects whether it is spawned or not. The code I have half-works, only reliably works on reload, and still trigger errors. Most of these problems are from my lack of familiarity with the codebase.

My first stab at it is at https://github.com/DArcMattr/perl-lite/tree/DArc.

User When Change
Morsker Jul 30, 2012 at 20:38 UTC
Morsker Jul 30, 2012 at 03:30 UTC
Morsker Jul 30, 2012 at 02:59 UTC Changed milestone from None to Ready For Beta
DavidTheMachine Jul 30, 2012 at 01:50 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 3 comments
  • Avatar of DavidTheMachine DavidTheMachine Jul 30, 2012 at 07:30 UTC - 0 likes

    I pushed a commit with these methods. Works like a charm!

    edit: the commit link is: https://github.com/DArcMattr/perl-lite/commit/393e955d6474d80909c0c12d4fe7bba7d389bd79

    Last edited Jul 30, 2012 by DavidTheMachine
  • Avatar of Morsker Morsker Jul 30, 2012 at 02:57 UTC - 0 likes

    I found oUF's support for this. Try:

    PerlLite_TargetTarget:Disable()
    PerlLite_TargetTarget:Enable()

    Or in code this is probably better,

    oUF.units.targettarget:Disable()

    That's enough to hide it and take it off unit watch. oUF doesn't have a clean way to unregister all the frame's events while preserving enough information to restore them later on. But its event handler discards events when the frame is hidden, which is almost as good.

    Last edited Jul 30, 2012 by Morsker
  • Avatar of Morsker Morsker Jul 30, 2012 at 02:09 UTC - 0 likes

    I don't know the best way to disable the frames without reloading either. It's easy to disable a frame by hiding it, unregistering its events, and unregistered it from unit watch, but I don't know if oUF supports a clean way of doing this, of if it's going to get in the way.

  • 3 comments

Facts

Last updated
Jul 30, 2012
Reported
Jul 30, 2012
Status
Fixed - Developer made requested changes. QA should verify.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0
Milestone
Ready For Beta

Reported by

Possible assignees