');
document.write('');
var yuipath = 'clientscript/yui';
var yuicombopath = '';
var remoteyui = false;
}
else // Load Rest of YUI remotely (where possible)
{
var yuipath = 'https://ajax.googleapis.com/ajax/libs/yui/2.9.0/build';
var yuicombopath = '';
var remoteyui = true;
if (!yuicombopath)
{
document.write('');
}
}
var SESSIONURL = "";
var SECURITYTOKEN = "guest";
var IMGDIR_MISC = "warmane/misc";
var IMGDIR_BUTTON = "warmane/buttons";
var vb_disable_ajax = parseInt("0", 10);
var SIMPLEVERSION = "422";
var BBURL = "https://forum.warmane.com";
var LOGGEDIN = 0 > 0 ? true : false;
var THIS_SCRIPT = "showthread";
var RELPATH = "showthread.php?goto=nextnewest&t=463746";
var PATHS = {
forum : "",
cms : "",
blog : ""
};
var AJAXBASEURL = "https://forum.warmane.com/";
var CoTTooltips = {
rename: true,
icons: false,
iconsize: 15,
qualitycolor: true,
overridecolor: {
spells: '#839309',
items: '',
npcs: '#fff',
objects: '#fff',
quests: '#ffb100',
achievements: '#fff'
}
};
// -->
WotLK Handling "OnShow" frame event
Member
Handling "OnShow" frame event
Hello,
I created a frame template using XML code
<Frame name="FrameTemplate" virtual="true">
<Scripts>
<OnShow>
print('Hello World')
</OnShow>
</Scripts>
</Frame>
Now I can create new frames in Lua using this template
local frame = CreateFrame("Frame", "NewFrameTemplate", UIParent, "FrameTemplate")
frame:SetSize(100, 100)
frame:SetPoint("CENTER")
If I write
frame:SetScript("OnShow", function() print('Howday?') end)
Every time the frame is shown, 'Howday?' will appear, but no longer 'Hello World'.
Is there a method, in the 3.3.5a client, to ensure that the script present inside the <OnShow> tag is not overwritten?
Forum Veteran
Yes, use HookScript instead.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules