WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (https://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   "Hacking World of Warcraft" Ch. 11 Help (https://www.wowinterface.com/forums/showthread.php?t=12733)

Saiye 10-05-07 10:25 AM

"Hacking World of Warcraft" Ch. 11 Help
 
Hi.

I just recently bought the book "Hacking World of Warcraft" by Dan Gilbert and James Whitehead II. I'm having problems with the book, however. I followed the instructions in chapter 11 to make the Whereabouts.xml file for the Whereabouts add-on. By the end of the chapter, I'm supposed to see a little box with a yellow border which I can then drag with the left mouse button. I do get the yellow box, however, an error message is transposed over the top of it (I have "Show Lua Errors" on) and I'm unable to drag the box. Here's the error message I receive:



And this is my code:
Quote:

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Frame name="Whereabouts_Frame" toplevel="true" frameStrata="HIGH" enableMouse="true" movable="true" parent="UIParent" clampedToScreen="true">
<Size>
<AbsDimension x="100" y="32"/>
</Size>

<Anchors>
<Anchor point="CENTER"/>
</Anchors>

<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" bgFile="Interface\Tooltips\UI-Tooltip-Background">
<BackgroundInsets>
<AbsInset left="4" right="4" top="4" bottom="4"/>
</BackgroundInsets>

<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>

<Color r="0" g="0" b="0" a="0.4"/>
<BorderColor r="1" g="0.8" b="0" a="0.8"/>
</Backdrop>

<Layers>
<Layer level="OVERLAY">
</Layer>
</Layers>

<FontString name="$parent_Text" inherits="GameFontNormal">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</FontString>

<Scripts>
<OnLoad>
--Whereabouts_OnLoad(self);
</OnLoad>

<OnUpdate>
--Whereabouts_OnUpdate(self, elapsed);
</OnUpdate>

<OnMouseDown>
if ( button == "LeftButton" ) then
self:StartMoving();
self.isMoving() = true;
end
</OnMouseDown>

<OnMouseUp>
if ( self.isMoving ) then
self:StopMovingOrSizing();
self.isMoving = false;
end
</OnMouseUp>

<OnHide>
if ( self.isMoving ) then
self:StopMovingOrSizing();
self.isMoving = false;
end
</OnHide>
</Scripts>
</Frame>
</Ui>
Hope this helps. Any help would be appreciated.

Sincerely,
Saiye

Polarina 10-05-07 10:33 AM

Code:

self.isMoving() = true;
Does that statement makes any sense to you?

Saiye 10-05-07 10:42 AM

Quote:

Originally Posted by Polarina
Code:

self.isMoving() = true;
Does that statement makes any sense to you?

Isn't that a statement that says that if I hold down the left mouse button and move it (i.e. if it is "true"), then the window should move?

Polarina 10-05-07 10:45 AM

Quote:

Originally Posted by Saiye
Isn't that a statement that says that if I hold down the left mouse button and move it (i.e. if it is "true"), then the window should move?

Try this:
Code:

self.isMoving = true;

Saiye 10-05-07 10:47 AM

Quote:

Originally Posted by Polarina
Try this:
Code:

self.isMoving = true;

D'oh. >_< I see where I missed it. LOL. Thanks a lot.


All times are GMT -6. The time now is 12:55 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI