Thread Tools Display Modes
07-26-12, 02:31 AM   #1
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Nameplates

Originally Posted by Maul View Post
Not entirely, I turned the taint log off and still had issues until I narrowed down my crash issue to modifying a custom gametooltip (like used for tooltip scanning). I eliminated the modifications as well as the :GetRegion() calls on the custom tooltip and only then did the crashes stop.

And I still crash on a /reload occasionally with the taint log off.
You can add WorldFrame:GetChildren() to the list of things that hard crash the beta client (build 15882)

(typical for nameplate addons looking for nameplates)

Note: Pulled these posts from MoP beta topic as they're no longer MoP specific. - Haleth

Last edited by Haleth : 07-26-12 at 06:05 PM.
 
07-26-12, 07:21 AM   #2
ballagarba
A Fallenroot Satyr
 
ballagarba's Avatar
Join Date: Mar 2009
Posts: 22
Originally Posted by Dridzt View Post
You can add WorldFrame:GetChildren() to the list of things that hard crash the beta client (build 15882)

(typical for nameplate addons looking for nameplates)
In case you didn't know: http://www.wowinterface.com/forums/s...9&postcount=30
 
07-26-12, 07:49 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
You still need to use WorldFrame:GetChildren() to actually iterate through potential frames. Then you can check them by name.

It would be much better if we could hook into the function that creates nameplates, but we don't have access to it.
 
07-26-12, 01:28 PM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Haleth View Post
You still need to use WorldFrame:GetChildren() to actually iterate through potential frames. Then you can check them by name.
Actually...
Lua Code:
  1. local index = 1
  2.  
  3. local addon = CreateFrame('Frame')
  4. addon:SetScript('OnUpdate', function()
  5.     while _G['NamePlate' .. index] do
  6.         local frame = _G['NamePlate' .. index]
  7.  
  8.         -- do whatever
  9.  
  10.         index = index + 1
  11.     end
  12. end)
  13. addon:Show()

Last edited by p3lim : 07-26-12 at 03:19 PM.
 
07-26-12, 01:42 PM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Originally Posted by p3lim View Post
Actually...
That's a simple and clever workaround for the bug actually,
might have to poach it for a couple addons that I've had to keep disabled in beta.

Edit: Scratch that, a while loop won't work sadly, nameplate frames are reused for one so you don't always have a nice collection of sequential frames from 1 to n.
Even if we did have that, it would still need to wrap around to index 1 when it exits the while loop.
It's food for thought definitely...

And another function that hard crashes the client (no addons present) GetDestinationReforgeStats() (build 15882)

Last edited by Dridzt : 07-26-12 at 02:02 PM.
 
07-26-12, 02:25 PM   #6
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Dridzt View Post
That's a simple and clever workaround for the bug actually,
might have to poach it for a couple addons that I've had to keep disabled in beta.

Edit: Scratch that, a while loop won't work sadly, nameplate frames are reused for one so you don't always have a nice collection of sequential frames from 1 to n.
Even if we did have that, it would still need to wrap around to index 1 when it exits the while loop.
It's food for thought definitely...

Lua Code:
  1. local function Update(self)
  2.     -- do whatever
  3. end
  4.  
  5. local index = 1
  6.  
  7. local addon = CreateFrame('Frame')
  8. addon:SetScript('OnUpdate', function()
  9.     while _G['NamePlate' .. index] do
  10.         local frame = _G['NamePlate' .. index]
  11.         frame:HookScript('OnShow', Update)
  12.  
  13.         Update(frame)
  14.  
  15.         index = index + 1
  16.     end
  17. end)
  18. addon:Show()

Last edited by p3lim : 07-26-12 at 03:19 PM.
 
07-26-12, 01:46 PM   #7
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Okay, p3lim, that's clever. Should be quite a bit more efficient
 
08-14-12, 01:53 AM   #8
villiv
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 14
really helpful thread. thank you for sharing this.

since all we like efficiency, do CVars-checking will help as well? or useless thoughts?

Lua Code:
  1. local f = CreateFrame('Frame')
  2. local a = f:CreateAnimationGroup()
  3. a:CreateAnimation():SetDuration(1/3)
  4. a:SetLooping('REPEAT')
  5. a:SetScript('OnLoop', function ()
  6.   -- LF Nameplates
  7. end)
  8.  
  9. local cvars = {
  10.     nameplateShowFriends = true, nameplateShowFriendlyPets = true, nameplateShowFriendlyGuardians = true, nameplateShowFriendlyTotems = true,
  11.     nameplateShowEnemies = true, nameplateShowEnemyPets = true, nameplateShowEnemyGuardians = true, nameplateShowEnemyTotems = true,
  12. }
  13.  
  14. local function check ()
  15.     for cvar in next, cvars do if ( GetCVarBool(cvar) ) then return a:Play() end end
  16.     return a:Stop()
  17. end
  18.  
  19. hooksecurefunc('SetCVar', function (cvar) if ( cvars[cvar] ) then return check() end end)

Last edited by villiv : 08-15-12 at 05:23 PM. Reason: the index should be handled LOGIN/OUT events
 
 

WoWInterface » Site Forums » Archived Beta Forums » MoP Beta archived threads » Nameplates


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off