Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
m (catfix, Replaced: {{framexml → <br>{{framexml)
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
<br>{{framexmlfunc|FrameXML/ContainerFrame.lua}} __NOTOC__
<center>'''ToggleBag''' ''-Documentation by AlexanderYoshi-''</center>
 
   
Opens or closes the specified bag.
 
   
 
ToggleBag(bagNum);
 
ToggleBag(bagNum);
   
 
Opens or closes the specified bag.
----
 
;''Arguments''
 
   
:(Number bagNum)
 
   
  +
== Parameters ==
:;bagNum : The number of which bag you want to toggle open or close
 
 
=== Arguments ===
   
 
:;bagNum : Number - the [[bagId]] you want to toggle open or close
----
 
  +
;''Returns''
+
=== Returns ===
   
 
:;nil
 
:;nil
   
 
== Example ==
----
 
  +
;''Example''
 
 
ToggleBag(2);
 
ToggleBag(2);
   
;''Result''
 
 
----
 
;''Description''
 
 
: Opens or closes the specified bag.
 
 
 
: NOTE:
 
: When toggling with the keyboard, this function doesnt appear to be called.
 
: When closing the bag using the "x" mark, this function is called.
 
 
 
: Tested using the following code:
 
 
local pre_ToggleBag
 
function testToggle_OnLoad()
 
pre_ToggleBag = ToggleBag;
 
ToggleBag = testToggle_ShowToggle();
 
end
 
function testToggle_ShowToggle()
 
DEFAULT_CHAT_FRAME:AddMessage("Bag Toggled!");
 
end
 
   
  +
== Details ==
----
 
  +
: If toggling the backpack with the keyboard, this function is called when opening but NOT when closing. Closing appears to be done by ToggleBackpack(). However, if the mouse is used to close the Backpack then this function does respond.
{{Template:WoW API}}
 
[[Category:API Functions|ToggleBag]]
 
[[Category:API Container Functions|ToggleBag]]
 
[[Category:API Toggle Functions|ToggleBag]]
 

Revision as of 00:41, 15 July 2008


This function is implemented in FrameXML/ContainerFrame.lua.


ToggleBag(bagNum);

Opens or closes the specified bag.


Parameters

Arguments

bagNum
Number - the bagId you want to toggle open or close

Returns

nil

Example

ToggleBag(2);


Details

If toggling the backpack with the keyboard, this function is called when opening but NOT when closing. Closing appears to be done by ToggleBackpack(). However, if the mouse is used to close the Backpack then this function does respond.