Reply
Thread Tools Display Modes
Unread 10-05-07, 10:25 AM   #1
Saiye
A Defias Bandit
Join Date: Oct 2007
Posts: 3
"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:
<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
Saiye is offline   Reply With Quote
Unread 10-05-07, 10:33 AM   #2
Polarina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 63
Code:
self.isMoving() = true;
Does that statement makes any sense to you?
Polarina is offline   Reply With Quote
Unread 10-05-07, 10:42 AM   #3
Saiye
A Defias Bandit
Join Date: Oct 2007
Posts: 3
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?
Saiye is offline   Reply With Quote
Unread 10-05-07, 10:45 AM   #4
Polarina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 63
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;
Polarina is offline   Reply With Quote
Unread 10-05-07, 10:47 AM   #5
Saiye
A Defias Bandit
Join Date: Oct 2007
Posts: 3
Originally Posted by Polarina
Try this:
Code:
self.isMoving = true;
D'oh. >_< I see where I missed it. LOL. Thanks a lot.
Saiye is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » "Hacking World of Warcraft" Ch. 11 Help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off