View Single Post
04-05-09, 01:15 PM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
You need to create a method to handle the menu action. Something like this...

Code:
frame.popup = CreateFrame( "Frame", "$parent_Popup", frame, "UIDropDownMenuTemplate" );                

frame.menu = function()
    
    local popup = frame.popup;

    if popup then
                        
        local anchor = frame.popup;
        this.unit      = frame:GetAttribute( "unit" );
        this.name,
        this.server   = UnitName( this.unit );
                       
        ToggleDropDownMenu( 1, nil, popup, anchor, anchor:GetWidth()/2, anchor:GetHeight()/2 );
                    
    end            
 end
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
  Reply With Quote