View Single Post
05-22-10, 12:10 PM   #3
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
The InspectFrame is part of the internal addon Blizzard_InspectUI and is only loaded on demand, thus when you first open it.
So, when your frame is created, it doesn't find the InspectFrame, because it simply does not exist at the time.

You have to watch when Blizzard_InspectUI is loaded / the InspectFrame is created and then parent your frame to it. Either by using PPViewFrame:SetParent(InspectFrame) or just creating your frame when the InspectFrame is loaded.
You could do this by hooksecurefunc'ing "InspectFrame_LoadUI" (called to load the InspectUI), "InspectUnit" (called every time an unit is inspected.

Or you just let your addon completely load with the InspectUI, depends on what you want to do with it. You'd have to add these in the .toc:
LoadOnDemand: 1
LoadWidth: Blizzard_InspectUI
__________________
« Website | GitHub »

Oh hai!
  Reply With Quote