Thread Tools Display Modes
06-08-17, 11:30 PM   #1
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Issue with pools and template

Hello.

I'm trying to use this code from Blizzard_Wardrove

Code:
self.DetailsFrame.itemFramesPool = CreateFramePool("FRAME", self.DetailsFrame, "WardrobeSetsDetailsItemFrameTemplate");
Whenever I call

Code:
local itemFrame = self.DetailsFrame.itemFramesPool:Acquire();
It works fine in some computers but it fails in others, with the next Lua error:

Code:
Couldn't find inherited node "WardrobeSetsDetailsItemFrameTemplate"
Any ideas why doesn't this work every time? I think it might be related to the loading speed of each computer (it works in the slower one with a bunch of addons, but it doesn't in the fastest one with just this addon).
How can I fix this?

Thanks.
  Reply With Quote
06-09-17, 12:58 AM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
This template is only available if Blizzard_Collections addon is loaded.

Either add this code to your addon, somewhere before you call CreateFramePool.
Lua Code:
  1. if not CollectionsJournal then
  2.     LoadAddOn("Blizzard_Collections")
  3. end

Or make your addon load w/ Blizzard_Collections, you'll have to alter your addons loading process though, IIRC, you won't be able to use ADDON_LOADED event. For more info, search for "LoadWith" here.
__________________
  Reply With Quote
06-09-17, 01:03 AM   #3
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Originally Posted by lightspark View Post
This template is only available if Blizzard_Collections addon is loaded.

Either add this code to your addon, somewhere before you call CreateFramePool.
Lua Code:
  1. if not CollectionsJournal then
  2.     LoadAddOn("Blizzard_Collections")
  3. end

Or make your addon load w/ Blizzard_Collections, you'll have to alter your addons loading process though, IIRC, you won't be able to use ADDON_LOADED event. For more info, search for "LoadWith" here.
Thank you lightspark, I will look into this as soon as I'm back from work.
It looks promissing.

Last edited by maqjav : 06-09-17 at 01:06 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Issue with pools and template


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