View Single Post
06-15-10, 01:33 PM   #7
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
hmm, couldn't you use "$parentPedestal" etc

EG.

Code:
function CreatePartyFrame(id)   
   local f = CreateFrame("Frame","Party"..id,..)
   f.PartyID = "Party"..id
   f.Pedestal = CreateFrame("Frame","$parentPedestal",f,...)
   f.Pet = CreateFrame("Frame","$parentPet",f,...)
   etc
   return f
end

CreatePartyFrame(1)
CreatePartyFrame(2)
etc

EDIT: Just read your last post, and yes that is similar to how I deal with frames within frames. And yes, you can drill down further and access sub frames of sub frames like frame.pedestal.texture.overlay.etc

Originally Posted by Grimsin View Post
part of the problem is i dont think the frame.pedestal part will work because the style selection function looks for Party1PedestalFrame to do a bunch of things to that frame...

what really makes this complicated is the style1 and style2 functions... whitch is why i global named so many things because when i do local and dont set a name for something in its global name space ("frame", namethatgoesinGnamespace, parent, inherit)

it does not seem able to find the right stuff later for the style functions. although i have this idea on the tip of my tongue and i think its what you would say to do... lol... what i think needs to be done is i remove the party1 part from all the stuff in the style function and replace it with frame.* something i think im a little unclear on when it comes to frame creation. So lets say i do what you had posted above, and cargor also sent me a chunk of code that appears to do the same thing, it looks as though it makes the pedestal frame but never separates it other then the frame its originally created by IE frame.pedestal so what im wondering about is when it makes the 2nd frame.pedestal for party2 technically pedestal frame will have the same name as party1. so when you do the frame. is that making it a child of party1 frame? and is it going to know that the pedestal frame for party1 is dif then the one for party two even though they have the same name? edit -- or no name at all?

also i take it that "party" .. i is another means of setting the variable, just like for other things its "..i.."? and frame.unit is that like setting the unit attrib? i dont understand how that translates to local Party1Exists = UnitExists("Party1")? edit-- i see now how it hooks the unit.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 06-15-10 at 01:35 PM.
  Reply With Quote