• 0

    posted a message on GPL licensing of addons and libraries
    Adding license info / handling to AceAddon would be fabulous. Perhaps I'll poke my nose into it.
    Posted in: General Chat
  • 0

    posted a message on Bits-1.0 (a bitlib front end)
    all documentation completed
    http://www.wowace.com/wiki/Bits
    Posted in: Libraries
  • 0

    posted a message on Grouper - an ambitious LFG addon
    Progress:
    worked out all the taxi,afk,dnd, and grouping transitions

    Group Leader -> LFM, OK, DND
    Group Member -> OK, DND
    <AFK> -> DND or no transition
    <DND> -> DND or no transition
    Taxi -> special restrictions (planned: no location-based preferences)


    TODO:
    add LFG priority list
    suppress Grouper when the blizzard LFG UI is open
    Posted in: General AddOns
  • 0

    posted a message on Grouper - an ambitious LFG addon
    There won't be chat channel scanning initially. I'm dreaming of going to a module system and doing several modules: channel scanning, direct CTA support and sharing LFG data thru AceComm/GUILD.
    Posted in: General AddOns
  • 0

    posted a message on Grouper - an ambitious LFG addon
    No that's not a bad suggestion Jameyc. The further I get in the more I'm learning about how the LFG system actually works - and it will be possible to highlight people in the system that meet certain criteria (current zone, level, class - but not race, guild, or other who information until I hook into a library that caches that information). It's not too hard to make new filters for this information - it's why I wrote Bits.
    Posted in: General AddOns
  • 0

    posted a message on Grouper - an ambitious LFG addon
    Screenshots:

    these are the basic LFG states which will be supported
    DND - not in LFG system
    OK - in the LFG system but not autojoining
    Join - autojoin for your preferred instances
    Form - forming a group (you have members and are getting more)


    Bigger screenshots of the browser menu:
    http://img.photobucket.com/albums/v186/karlp/wow/grouper1.jpg
    http://img.photobucket.com/albums/v186/karlp/wow/grouper2.jpg

    NEW screenshot of the preferences which decides what you can LFG for:
    http://img.photobucket.com/albums/v186/karlp/wow/grouperpreferences.jpg
    Posted in: General AddOns
  • 0

    posted a message on Grouper - an ambitious LFG addon
    Grouper is currently available in WAU / files but has issues. See the wiki page for the current state of the project:
    http://wowace.com/wiki/Grouper
    Posted in: General AddOns
  • 0

    posted a message on Bits-1.0 (a bitlib front end)
    Using Bits to make a FuBar toggle group:

    local function newGetBits(bits,get,handler)
      if type(get) == "text" then
        get = handler[get]
      end
      
      local function getFunc(key) return bits:HashContains(get(handler),key) end
      
      return getFunc
    end
    
    local function newSetBits(bits,get,set,handler)
      if type(get) == "text" then
        get = handler[get]
      end
      
      if type(set) == "text" then
        set = handler[set]
      end
      
      local function setFunc(key,value)
        local bitSetFunction = value and bits["AddToHash"] or bits["RemoveFromHash"]
        return set(handler,bitSetFunction(bits,get(handler),key))
      end
      
      return setFunc
    end
    
    local function populateBitsSubmenu(bitsSubmenu,bits,get,set,handler,...)
      bitsSubmenu.type = 'group'
    --  bitsSubmenu.pass = true
      bitsSubmenu.args = {}
      local getbit = newGetBits(bits,get,handler)
    --  bitsSubmenu.get = getbit
      assert(getbit, "get bits submenu is nil")
      local setbit = newSetBits(bits,get,set,handler)
    --  bitsSubmenu.set = setbit
      assert(setbit, "set bits submenu is nil")
      
      for i=1,select('#',...) do
        local v = select(i,...)
        
        bitsSubmenu.args[v] = {
          type = 'toggle',
          name = tostring(v),
          desc = "Toggle "..v,
          order = i,
          get = function() return getbit(v) end, -- TODO passing toggle doesn't work?
          set = function(value) setbit(v,value) end,
        }
      end
      
      return bitsSubmenu
    end


    that's my quick & dirty fubar menu making function and here's how I'm using it:

    local function GetColors()
      return "RED","ORANGE","YELLOW","GREEN","GREY"
    end
    
    colorBits = Bits:new(GetColors())
    
    zoneColor = populateBitsSubmenu({
      name = "Zone Difficulty",
      desc = "Permit these zone difficulties",
      order = 1,
    },colorBits,self.GetZoneColorFilter,self.SetZoneColorFilter,self,GetColors()),



    This way you can control your menus and make menus which are subsets of the entire bitset - so there's a whole group of toggles smushed into one number value in your addon. Possibly saves effort as well as memory.
    Posted in: Libraries
  • 0

    posted a message on Bits-1.0 (a bitlib front end)
    bitlib rocks! If you want to slam up to 53 boolean variables into a single value... (that's 4-bytes of memory, plus cost to store the reference)

    ...or if you want super-fast logical comparison of two tables of these values (i.e. preferences / events filtering!)


    Even as someone who regularly uses bitwise comparisons the functions for making sets of bits and maintaining their state are quite repetitive.

    Bits tries to create a practical front-end for all popular uses of the bitlib library. If you have a use-case for bitlib and don't see it accomplished in Bits let me know!


    You can currently find Bits at the Ace subversion repository:
    http://svn.wowace.com/wowace/branches/Bits/Karl/Bits/

    Because this is intended for developers it's not in the trunk yet (until I finish my addon that uses it).


    Functions:
    Bits:new( [ text:key, text:key, ...] )
    -- create a new bitset instance with the following functions (MAX 53 arguments)
    -- returns bitset instance as follows:

    bitset:Clone( [table:toTarget] )
    -- copy a bit set (optionally into toTarget)
    -- returns nil

    bitset:Add( text:key [, text:key, text:key, ... ] )
    -- add additional set elements to this hash (MAX 53 elements in the bitset)
    -- returns nil

    bitset:Alias( text:aliasKey, text:key [, text:key, text:key, ... ] )
    -- assigns a new key aliased to the combination (bit.bor) of the given keys
    -- returns nil

    bitset:Get( text:key [, text:key... ] )
    -- get hash values for keys, returning the same number of args passed
    -- returns number [, number... ]

    bitset:GetHash( text:key [, text:key... ] )
    -- get a number hash based on the keys provided
    -- returns number

    bitset:AddToHash( number:hashValue, text:key [, text:key... ] )
    -- add item to hash, returning the new hash value
    -- returns number

    bitset:RemoveFromHash( number:hashValue, text:key [, text:key... ] )
    -- remove item from hash, returning the new hash value
    -- returns number

    bitset:ToggleInHash( number:hashValue, text:key [, text:key... ] )
    -- toggles bits in the hash, returning the new value (IMPORTANT - ORs values of the given keys before XOR)
    -- returns number

    bitset:HashEquals( number:hashValue, text:key [, text:key... ] )
    -- test a hash for equality with the set of keys (i.e. hash requires ALL of these keys)
    -- returns true | false

    bitset:HashContains( number:hashValue, text:key [, text:key... ] )
    -- test if a hash contains any of a set of keys (i.e. hash requires ANY of these keys)
    -- returns true | false

    bitset:ReverseMap()
    -- retrieve a reverse map of the bit set elements which maps values to the keys
    -- relatively expensive operation (this table is not cached to save memory)
    -- returns a table such that X == bitset:ReverseMap()[bitset[X]] for any X which is a "key" created by new() or Add()

    bitset:DeHash( number:hashValue [, number:hashValue... ] )
    -- break down a list of hashes into lists of keys
    -- relatively expensive operation (makes use of ReverseMap and does not cache it!)
    -- returns a list of tables of keys such that X == bitset:GetHash(unpack(bitset:DeHash(X))) for any X which is a hashValue created by Gethash()

    bitset:And([ text:key... ] )
    -- logical and of key values
    -- returns number

    bitset:Or([ text:key... ] )
    -- logical or of key values
    -- returns number

    bitset:Xor([ text:key... ] )
    -- returns number
    -- logical exclusive or of key values "only works with aliases" (unless you understand the math)


    Example code:
    myset = Bits:new("A","B","C") -- this defines a new set of bits
    value = myset:GetHash("B","C") -- value is now a number that represents "B" or "C" (both values present)
    value = myset:AddToHash(value,"A") -- value gets "A"
    value = myset:RemoveFromHash(value,"A","C") -- value loses "A", "C" (it only has "B" now)
    if myset:HashContains(value,"B") then -- check for B
    -- do something here!!! (preference "B" is enabled)
    end
    Posted in: Libraries
  • 0

    posted a message on Bartender3 - Action Bar AddOn for WoW 2.0
    [2006/12/17 22:09:52-83-x1]: <event>ADDON_ACTION_BLOCKED:AddOn 'Ace2' tried to call the protected function 'PetActionBarFrame:Show()'.
    <in C code>: in function `Show'
    FrameXML\PetActionBarFrame.lua:161: in function `ShowPetActionBar'
    FrameXML\PetActionBarFrame.lua:37: in function `PetActionBar_OnEvent'
    <string>:"PetActionBarFrame:OnEvent":2: in function <[string "PetActionBarFrame:OnEvent"]:1>

    ---


    This occurs when I attempt to MC while I am in combat.

    If you can watch the "player regen disabled" event and show the petbar I think that would help avoid this issue. IIRC that is the last event before the combat lockdown.
    Posted in: General AddOns
  • 0

    posted a message on Antagonist
    using Antagonist r20982 and SurfaceLib r20902


    [2006/12/17 08:14:58-64-x1]: Antagonist\Antagonist.lua:154: Surface-1.0: Bad argument #2 to `Fetch' (string expected, got number)
    AceLibrary\AceLibrary.lua:84: in function <Interface\AddOns\Ace2\AceLibrary\AceLibrary.lua:37>
    (tail call): ?:
    Surface-1.0\Surface-1.0.lua:43: in function `Fetch'
    Antagonist\Antagonist.lua:154: in function `RunTest'
    Antagonist\Antagonist-Options.lua:225: in function `func'
    AceConsole-2.0\AceConsole-2.0.lua:1504: in function <...erface\AddOns\Ace2\AceConsole-2.0\AceConsole-2.0.lua:1288>
    AceConsole-2.0\AceConsole-2.0.lua:2115: in function `value'
    FrameXML\ChatFrame.lua:3008: in function <Interface\FrameXML\ChatFrame.lua:2957>
    <in C code>: in function `ChatEdit_ParseText'
    FrameXML\ChatFrame.lua:2734: in function `ChatEdit_SendText'
    FrameXML\ChatFrame.lua:2756: in function `ChatEdit_OnEnterPressed'
    <string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>

    ---



    WORKAROUND: re-selecting my antagonist bar texture (used DeuceCommander) fixed this
    Posted in: General AddOns
  • 0

    posted a message on SharedSounds-1.0
    Description:
    A library to handle whisper/say/yell/comm communicated shared sounds and facilitate sound management.

    This respects category-based sound filters using an include-exclude scheme. For example, sounds from the "Leeroy" mod can be ignored in raid instances, but sounds from "RaidMod" will still be played.

    Can be used to filter & replace text to create pseudo-emotes or create RP group emotes (at the user's option they will join in).

    Uses either self (bulk priority) or given user addon as the AceComm instance to drive communications.

    Designed to support pre-translated cross-faction text via say/yell.

    Still in development, but suggestions/critique welcome.

    API Example:
    local SoundLib = AceLibrary("SharedSounds-1.0")

    -- create and register 2 sounds with the comm mechanism
    local quack, squeak = SoundLib:newSound(
    {file = "quack", dir = "AddOns\MyAddon", text = "QUACK! QUACK!"},
    {file = "squeak", dir = "AddOns\MyAddon"})

    -- emit a sound: yells "QUACK! QUACK!" and clients with
    -- quack registered (and not filtered) hear the sound
    quack:Emit("YELL")

    -- send a sound to another client (using SharedSounds for comm)
    local target = UnitName("target")
    squeak:Transmit("WHISPER",target)

    -- create but *do not* register sound
    local alarm = SoundLib:newSound(
    {file = "alarm", dir = "AddOns\MyAddon"},false)

    -- play locally
    alarm:Play()


    Filter API:
    local filter = {
    dist = {"SAY","WHISPER"}, -- list of dist methods to be OR'd
    action = "PLAY", -- filter affects playing the sound
    function = SoundLib.Filter.Function.IN_RAIDINSTANCE, -- filter matches if player in raid instance
    }

    SoundLib:AddFilter("deny",filter) -- globally deny sounds playing in raid instance
    SoundLib:AddFilter(MyAddon,"allow",filter) -- except for sounds from my addon


    Filters apply in ALLOW, DENY order and will be sorted to match the most-specific first (dist, then action, then functions which will all be evaluated). Internally they may be merged to eliminate redundancies.

    TODO:
    • impl register and deregister filters
    • impl comm
    • test
    • commit
    Posted in: Libraries
  • To post a comment, please or register a new account.