woozles

lol aye sir
another edit to the oq_getlastchannel function. this actually checks to see if the channel is present and if its the last channel or not

http://pastebin.com/Q2stHHFz
corrected an oversight i made when i was tired. basically all this does is check to see how many channels are currently available and it should wait until the other default channels are in place before adding the oqchannel. this way should allow you to remove the in bg, in instance, etc constraints also
--put this on line 19
function oq_getlastchannel()
    if(DEFAULT_CHAT_FRAME:GetID()) then
        local chatchannels = { GetChatWindowChannels(DEFAULT_CHAT_FRAME:GetID()) }

        if (#chatchannels ~= 0) then
            local numchannels = (#chatchannels / 2)
            if (numchannels >= 1) then
                OQ_LASTCHANNEL = numchannels + 1
            else
                OQ_LASTCHANNEL = 1
            end
        else
            OQ_LASTCHANNEL = 1
        end
    end
end

--init with 1 as global to be modified for passing through functions
OQ_LASTCHANNEL = 1
--48
local OQ_REALM_CHANNEL         =  "oqchannel";
    
--2632
function oq.join_oq_general()
  if (oq._banned) or (OQ_data.auto_join_oqgeneral == 0) or (oq._inside_instance) or (oq._oqgeneral_initialized == nil) then
    return ;
  end
  oq_getlastchannel()
  if (OQ_LASTCHANNEL >= 2) then
    oq.channel_join( OQ_REALMCHANNEL ) ;
  end
end

function oq.oqgeneral_join()
  if (oq._banned) or (OQ_data.auto_join_oqgeneral == 0) or (oq._inside_instance) or (oq._oqgeneral_initialized == nil) then
    return ;
  end
  oq_getlastchannel()
  if (OQ_LASTCHANNEL >= 2) then
      oq.channel_join( OQ_REALMCHANNEL ) ;
      oq.timer( "hook_roster_update"   ,  5, oq.hook_roster_update      , true, OQ_REALMCHANNEL ) ; -- will repeat until channel joined
      oq.timer( "chk_OQGeneralLockdown", 30, oq.check_oqgeneral_lockdown, true ) ; -- will check capacity every 30 seconds
  end
end

--2659
function oq.channel_general( msg )
  if (_oqgeneral_lockdown) then
    return ; -- too many ppl in oqgeneral, voluntary mute engaged
  end
  oq_getlastchannel()
  if (OQ_LASTCHANNEL >= 2) then
    oq.channel_say(   OQ_REALMCHANNEL, msg ) ;
  end
end

 
i may have missed some OQ_REALMCHANNEL (s) somewhere in the file, but if you do a replace all with OQ_LASTCHANNEL, that should fix that

edit: i was tired and this and the above is wrong, below should be right though

1.8.7a: Oqueue grabbing channel 1 - potential fix

As for the addon using channel 1 for the data channel and the issues preventing it from doing that. E.g (It's fixed, wait, no its not -repeat- )

This should fix it.

--put this on line 19
function oq_getlastchannel()
    if(DEFAULT_CHAT_FRAME:GetID()) then
        local chatchannels = { GetChatWindowChannels(DEFAULT_CHAT_FRAME:GetID()) }

        if (#chatchannels ~= 0) then
            local numchannels = (#chatchannels / 2)
            if (numchannels >= 1) then
                OQ_LASTCHANNEL = numchannels + 1
            else
                OQ_LASTCHANNEL = 1
            end
        else
            OQ_LASTCHANNEL = 1
        end
    end
end

--init with 1 as global to be modified for passing through functions
OQ_LASTCHANNEL = 1
--48
local OQ_REALM_CHANNEL         =  OQ_LASTCHANNEL;
    
--2632
function oq.join_oq_general()
  if (oq._banned) or (OQ_data.auto_join_oqgeneral == 0) or (oq._inside_instance) or (oq._oqgeneral_initialized == nil) then
    return ;
  end
  oq_getlastchannel()
  oq.channel_join( OQ_LASTCHANNEL ) ;
end

function oq.oqgeneral_join()
  if (oq._banned) or (OQ_data.auto_join_oqgeneral == 0) or (oq._inside_instance) or (oq._oqgeneral_initialized == nil) then
    return ;
  end
  oq_getlastchannel()
  oq.channel_join( OQ_LASTCHANNEL ) ;
  oq.timer( "hook_roster_update"   ,  5, oq.hook_roster_update      , true, OQ_LASTCHANNEL ) ; -- will repeat until channel joined
  oq.timer( "chk_OQGeneralLockdown", 30, oq.check_oqgeneral_lockdown, true ) ; -- will check capacity every 30 seconds
end

--2659
function oq.channel_general( msg )
  if (_oqgeneral_lockdown) then
    return ; -- too many ppl in oqgeneral, voluntary mute engaged
  end
  oq_getlastchannel()
  oq.channel_say(   OQ_LASTCHANNEL, msg ) ;
end

 
update: it works now but wasn't before, no idea why

if i were to guess, the frames are still there, but somewhere along the lines the frame strata or visibility gets screwed up. so far i haven't been able to replicate it. i say, guess the frames are still there, but, i didn't think to use framestack when the bug happened.

potential fix / preventative measure:
after the character sheet overlay is finished, iterate through all the "EquipmentFlyoutFrameButton" (s) and reset their strata
strike that, found a bug:

when you hold the alt button on the character sheet, the items in the bags that could go in to a particular slot arent being shown. however, the slots for said items are there.

ex:
say you have 5 pairs of gloves in your bags, you open your character window, hold alt, then mouse over gloves, the popup window that displays the items for that slot in your bag will have 5 slots, but, nothing will be in them.

with the hard reset 1.8.7a works fine

yeah, as the title says, 1.8.7a works fine (as far as i can tell so far)

but,

you have to remove all the files in the oqueue addon folder AND all the a oqueue saved variables files in the wtf folder (this is what hard reset means)

(for windows) sorry i duno about mac >...>
to easily remove all the saved variables files in the wtf folder:
first close wow
navigate to the wtf folder then search from the wtf by typing "oqueue" (without quotes) in the search bar on the top right of the window and hitting enter
then select and delete all the oqueue.lua and oqueue.lua.bak files (these are the files with the settings for the addon
Yeah, its been a while since the last post, but i still haven't really looked through much.

I'm assuming you know this already, but its the only thing i can think of for tables being inexplicably empty.

if i were to hazard a guess; as far as the main table, or any table, being nil with no apparent reason, is because the wipe function wipes all connected tables.

so say you did.

t = {a,b,c}
t2 = {aa,bb,cc}
t3 = {t, t2}

wipe(t3)

t and t2 would also get wiped out too. and i dont just mean that t3 would be nil, but the a,b,c in t and the aa,bb,cc in t2 would also be nil, so you would end up with

t = nil
t2 = nil
t3 = nil

so, i try not to use that function

if you have tables within tables and you only want just one inner table changed. i usually setup a temp table, populate it with the data from the table within a table, manipulate the temp table, then replace the data in the main container table with the temp table data.

t1 ={1,2,3}
t2 ={1,2,3}
t3 ={1,2,3}

main = {t1,t2,t3}
temp = main[1]
local i

for i = 1, #temp do
temp[i] = blah
end
main[1] = temp
temp = {}

------------
the result would be:
t1 = {blah,blah,blah}
t2 = {1,2,3}
t3 = {1,2,3}
------------

also, using for loops that iterate to a maximum value of a table is better than using static numbers imo. then, in the event of a miscalculation somewhere along the lines, the addon wont come to a hard stop and makes the whole thing more fluid. for example: instead of coding for just 2 gems or 3 gems, if wow ever decided to add 100 gems... its just a matter of a few code tweaks vs a major overhaul.

the safest way to wipe a table and ensure that only the specified table gets cleared is

temp = {}
hmmmm, ill look, but, no guarantees lol

oh and i love this addon :)
well, less fixed, and more just made it go away until you fix it