local gui = AceLibrary("AceGUI-2.0"):new() local config = { type = "frame", -- ... } function gui:SomeMethod() --... end function addon:CreateAndShowGUI() gui:Config(config) -- Creates the frame objects and verifies that any methods required by the config end