View Single Post
03-03-23, 10:35 AM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
the <Script file="luascript.lua"/> goes in the XML file before you add any <Frame .. tags etc.

self:CreateList wont exists unless the frame has a Mixin defined in lua, most likely in luascript.lua

luascript.lua
Code:
BenalishListSomethingFrameMixin = {}
function BenalishListSomethingFrameMixin:CreateList(total)
	print(self:GetName(), "Let's create a list of", total, "Entries!")
end
XML
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
	<Script file="luascript.lua"/>
	<Frame name="BenalishListFrame", mixin="BenalishListSomethingFrameMixin", virtual="true">
		<Scripts>
			<OnLoad>
				self:CreateList(total)
				-- I don't know where total comes from? You might want to retrieve that in the CreateList function instead!
			</OnLoad>
		</Scripts>
	</Frame>
</Ui>
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 03-03-23 at 11:51 AM.
  Reply With Quote