ty for answer
what I'm trying to do is making an addon to auto accept release/resurrect/ress/enter arena/leave arena and party messages (any of them that are possible) with a simple interface and some chechboxes .
what i learned so far :
i need register events after function
and few about creating frames - buttons and ... in lua
question 1 : do i have to create frame on lua even when i have some on xml ?
my .xml codes
Code:
<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
<Script file="Frame.lua" />
<Frame name="F_K1A" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
<Size>
<AbsDimension x="100" y="22" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="399" y="-49" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad />
<OnMouseDown>self:StartMoving();</OnMouseDown>
<OnMouseUp>self:StopMovingOrSizing();</OnMouseUp>
</Scripts>
<Layers>
<Layer>
<FontString name="T_Party" inherits="GameFontNormalSmall" text="Party">
<Size x="39" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="510" y="0" />
</Anchor>
</Anchors>
</FontString>
<FontString name="T_LeaveArena" inherits="GameFontNormalSmall" text="LeaveArena">
<Size x="75" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="417" y="0" />
</Anchor>
</Anchors>
</FontString>
<FontString name="FontString1" inherits="GameFontNormalSmall" text="K1Acceptor">
<Size x="100" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="0" y="0" />
</Anchor>
</Anchors>
</FontString>
<FontString name="T_Recurrect" inherits="GameFontNormalSmall" text="Recurrect">
<Size x="63" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="190" y="0" />
</Anchor>
</Anchors>
</FontString>
<FontString name="T_Release" inherits="GameFontNormalSmall" text="Release">
<Size x="53" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="119" y="0" />
</Anchor>
</Anchors>
</FontString>
<FontString name="T_Ress" inherits="GameFontNormalSmall" text="Ress">
<Size x="35" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="274" y="0" />
</Anchor>
</Anchors>
</FontString>
<FontString name="T_EnterArena" inherits="GameFontNormalSmall" text="EnterArena">
<Size x="70" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="328" y="0" />
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="0" right="0" top="0" bottom="0" />
</BackgroundInsets>
<TileSize>
<AbsValue val="32" />
</TileSize>
<EdgeSize>
<AbsValue val="1" />
</EdgeSize>
</Backdrop>
<Frames>
<CheckButton name="C_Party" inherits="UICheckButtonTemplate">
<Size x="20" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="497" y="-1" />
</Anchor>
</Anchors>
</CheckButton>
<CheckButton name="C_LeaveArena" inherits="UICheckButtonTemplate" checked="true">
<Size x="20" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="404" y="-1" />
</Anchor>
</Anchors>
</CheckButton>
<CheckButton name="C_Recurrect" inherits="UICheckButtonTemplate">
<Size x="20" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="178" y="-1" />
</Anchor>
</Anchors>
</CheckButton>
<CheckButton name="C_Release" inherits="UICheckButtonTemplate" checked="true">
<Size x="20" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="106" y="-1" />
</Anchor>
</Anchors>
</CheckButton>
<CheckButton name="CheckButton1" inherits="UICheckButtonTemplate" checked="true">
<Size x="20" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="260" y="-1" />
</Anchor>
</Anchors>
</CheckButton>
<CheckButton name="C_EnterArena" inherits="UICheckButtonTemplate">
<Size x="20" y="20" />
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="314" y="-1" />
</Anchor>
</Anchors>
</CheckButton>
</Frames>
</Frame>
</Ui>
Question 2 :witch one is better creating frames in lua or xml ?
Question 3 : when i register an event it will react when that event happens and i don't need any other code to call it or something like that . right?
Question 4 :am i asking too much questions?
i will try to fix my addon tomorrow and will come back with more questions
again , ty for support
and about addon studio i think its very good for making xml interfaces but i like coding lua in notepad++ (well i still need to learn lua first then i can talk about it)