View Single Post
02-05-22, 08:23 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
AceGUI:Create() doesn't directly return a frame handle. It returns a table they call a "widget", though it does contain the frame handle at widget.frame. AceGUI also sets widget.frame.width when you call widget:SetWidth().

Example:
Lua Code:
  1. local ACE_GUI=LibStub:GetLibrary("AceGUI-3.0");--   Assuming you had this defined previously
  2.  
  3. local basicFrame=ACE_GUI:Create("Frame");
  4. basicFrame:SetHeight(200);
  5. basicFrame:SetWidth(200);
  6.  
  7. --  Both of these should print the same value
  8. print(basicFrame.frame.width);
  9. print(basicFrame.frame:GetWidth());
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote