Quantcast
Problems in the tutorial? - WoWInterface
Thread Tools Display Modes
11-13-05, 03:59 PM   #1
Nomad_Wanderer
A Murloc Raider
Join Date: Nov 2005
Posts: 6
Problems in the tutorial?

This line in the tutorial seems wrong:
label = getglobal("TutorialProjectForm".."CountLabel".."Label");

My label is not updating.
  Reply With Quote
11-13-05, 04:05 PM   #2
Guillotine
A Cobalt Mageweaver
 
Guillotine's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 206
All you are doing here is setting label (a variable) to be that label.

Now you have to do label:SetText("Get on IRC");
  Reply With Quote
11-13-05, 06:21 PM   #3
Nomad_Wanderer
A Murloc Raider
Join Date: Nov 2005
Posts: 6
I understand that.. It's just here are the instructions for Step 10

10. Now set up the properties for the label to:
Location = 32, 64
Size = 336, 16
(Name) = $parentCountLabel
Horizontal Alignment = LEFT


The lua has an extra part on it.
label = getglobal("TutorialProjectForm".."CountLabel".."Label");

That getglobal is going after something called "TutorialProjectFormCountLabelLabel", correct?
  Reply With Quote
11-13-05, 06:46 PM   #4
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
You needed to get the Label component from the Default skin. Because all components have to be derived from Frame, you can't have a FontString directly as a component, so it is contained within a frame, so:

Main Frame: TutorialProjectForm
Component Frame : $parentCountLabel = TutorialProjectFormCountLabel
Embedded FontString : $parentLabel = TutorialProjectFormCountLabelLabel

If you took the label from the Basic skin, then the embedded fontstring is not named correctly so will not work like that. You can go into the Skins\BasicSkin.xml file, go down to line 626 and you will see the FontString definition within the Layer tag:

<FontString inherits="GameFontNormal" setAllPoints="true"/>

and change it to:

<FontString name="$parentLabel" inherits="GameFontNormal" setAllPoints="true"/>

If you now restart the application, open your Form and resave it, it should work.. or just use the one from the Default skin.

Good luck
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Problems in the tutorial?

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