Thread Tools Display Modes
10-02-05, 01:41 AM   #1
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Hello World tutorial

For those working on it now, these are the steps to create a window with "Hello World" that disappears when you click an Ok button:

0. Backup your SavedVariables directory -- edit: not sure when but all my SavedVariables got reset in creating this mod and through a reload/log out and in
1. File->New Project, enter the name HelloWorld
2. fill out .toc info, save to AddOns\HelloWorld\HelloWorld.toc
3. right-click HelloWorld on the left in the Project Explorer
4. choose Add New Form, a form1.xml should appear in the tree
5. double-click form1.xml, you'll now see a bordered dialog
6. Select the dialog, then go to the properties tab
7. Change the Name attribute (under Design) from Form1 to HelloWorldFrame
6. From the toolbox on the right, select Label
8. While Label is selected, draw a rectangle covering a good amount of space in the upper half of the form.
9. Go to the properties tab (helps to undock for this and future steps)
10. Change the Text attribute to "Hello World"
11. From the toolbox, select Button
12. Draw a rectangle to be the button in the lower half of the form.
13. Go to the properties tab
14. Change the Text attribute to "Ok"
15. Click in the OnClick() box below
16. In the box enter: HelloWorldFrame:Hide()
17. Save both the xml and the toc (the toc changed when you added the form)

Then log in to the game

Unfortunately tho first load is ok, when I ReloadUI() a ton of textures disappear/become green squares (action buttons, minimap buttons, etc). I'm going to see if I can move all the extracted files elsewhere and point wowuides to the other spot.

Last edited by Gello : 10-02-05 at 01:54 AM.
  Reply With Quote
10-02-05, 02:27 AM   #2
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
FrameXML.log?

Hey, the reloadui() crash you are getting, does it always happen?

Also, what does your framexml.log file look like? Mine looks like

Code:
 
10/2 18:23:18.531 Loading add-on Atlas
10/2 18:23:18.531 ** Loading table of contents Interface\AddOns\Atlas\Atlas.toc
10/2 18:23:18.531 Couldn't open Interface\AddOns\Atlas\AtlasButton.xml
10/2 18:23:18.531 Couldn't open Interface\AddOns\Atlas\AtlasOptions.xml
10/2 18:23:18.531 Couldn't open Interface\AddOns\Atlas\Bindings.xml
10/2 18:23:18.531 Loading add-on CallToArms
10/2 18:23:18.531 Couldn't open Interface\AddOns\CallToArms\CallToArms.toc
10/2 18:23:18.531 Loading add-on CT_RaidAssist
10/2 18:23:18.531 Couldn't open Interface\AddOns\CT_RaidAssist\CT_RaidAssist.toc
10/2 18:23:18.531 Couldn't open Interface\AddOns\CT_RaidAssist\Bindings.xml
10/2 18:23:18.531 Loading add-on Gatherer
10/2 18:23:18.531 Couldn't open Interface\AddOns\Gatherer\Gatherer.toc
10/2 18:23:18.531 Couldn't open Interface\AddOns\Gatherer\Bindings.xml
10/2 18:23:18.531 Loading add-on MobHealth
10/2 18:23:18.531 Couldn't open Interface\AddOns\MobHealth\MobHealth.toc
10/2 18:23:18.531 Loading add-on Reputation
10/2 18:23:18.531 Couldn't open Interface\AddOns\Reputation\Reputation.toc
10/2 18:23:18.531 Loading add-on SelfCast
10/2 18:23:18.531 Couldn't open Interface\AddOns\SelfCast\SelfCast.toc
10/2 18:23:18.531 Loading add-on Titan
10/2 18:23:18.531 Couldn't open Interface\AddOns\Titan\Titan.toc
10/2 18:23:18.531 Loading add-on TitanAtlas
10/2 18:23:18.531 Couldn't open Interface\AddOns\TitanAtlas\TitanAtlas.toc
10/2 18:23:18.531 Loading add-on TitanItemBonuses
10/2 18:23:18.531 Couldn't open Interface\AddOns\TitanItemBonuses\TitanItemBonuses.toc
10/2 18:23:18.531 Loading add-on TitanPetXp
10/2 18:23:18.531 Couldn't open Interface\AddOns\TitanPetXp\TitanPetXp.toc
10/2 18:23:18.531 Loading add-on UItest
10/2 18:23:18.531 Couldn't open Interface\AddOns\UItest\UItest.toc
when I lose the interface. Not sure what is in the xml file that does it, possibly the full definition of all the fonts and textures as you mentioned elsewhere.

Edit: Hmm, just tested without uitest installed at all and it still went funny, are you running Atlas v1.1+?
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)

Last edited by Nulkris : 10-02-05 at 02:33 AM. Reason: New Test
  Reply With Quote
10-02-05, 02:40 AM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
edit: oops yeah running Atlas 1.0, 07/03/2005 is date in its lua. I'll try removing it tommorow

I'm less certain it's the mod that does it than all the files extracted and a reload. I had HelloWorld disabled at addons, logged in ok, then did a ReloadUI() and the entire screen was one big green square with a 132 error ontop of that. Game crashed. When I removed everything from Interface except AddOns (and Icons), and re-enabled HelloWorld, I could ReloadUI() just fine.

Would it be possible to have two folder references? One to the extracted Interface and the other to your AddOns? Tho I bet that would be hard to do since the program is doing everything directly in AddOns (which is cool).

This is my entire FrameXML.log (man I need to clean up some of those mods, I'm getting lazy )
10/2 04:24:51.015 Skipping debug binding TOGGLESTATS in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLETRIS in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLEPORTALS in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLECOLLISION in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLECOLLISIONDISPLAY in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLEPLAYERBOUNDS in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLEPERFORMANCEDISPLAY in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding TOGGLEPERFORMANCEVALUES in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Skipping debug binding RESETPERFORMANCEVALUES in Interface\FrameXML\Bindings.xml
10/2 04:24:51.015 Loading add-on Atlas
10/2 04:24:51.015 Loading add-on AutoInnerFire
10/2 04:24:51.015 Loading add-on BankStatement
10/2 04:24:51.015 Binding header BANKSTATEMENT is defined more than once in Interface\AddOns\BankStatement\Bindings.xml
10/2 04:24:51.015 Loading add-on BestBuff
10/2 04:24:51.015 Loading add-on Bookworm
10/2 04:24:51.015 Loading add-on Decursive
10/2 04:24:51.015 Loading add-on EventProfiler
10/2 04:24:51.015 Loading add-on Gatherer
10/2 04:24:51.015 Loading add-on GoblinHelms
10/2 04:24:51.015 Loading add-on HelloWorld
10/2 04:24:51.015 Loading add-on HitList
10/2 04:24:51.015 Loading add-on ItemRack
10/2 04:24:51.015 ** Loading table of contents Interface\AddOns\ItemRack\ItemRack.toc
10/2 04:24:51.015 ++ Loading file Interface\AddOns\ItemRack\ItemRack.xml
10/2 04:24:51.015 Couldn't find inherited node: ItemRackResizeTemplate
10/2 04:24:51.015 Loading add-on MPS
10/2 04:24:51.015 ** Loading table of contents Interface\AddOns\MPS\MPS.toc
10/2 04:24:51.015 ++ Loading file Interface\AddOns\MPS\MPS.xml
10/2 04:24:51.015 Frame FS_Status: Unknown child node in Layer element: Size
10/2 04:24:51.015 Loading add-on QuestLevel
10/2 04:24:51.015 Loading add-on QuickLoot
10/2 04:24:51.015 Loading add-on Recap
10/2 04:24:51.015 ** Loading table of contents Interface\AddOns\Recap\Recap.toc
10/2 04:24:51.015 ++ Loading file Interface\AddOns\Recap\RecapOptions.xml
10/2 04:24:51.015 Frame RecapClipEditBox: Unknown script element OnClick
10/2 04:24:51.015 Loading add-on sct
10/2 04:24:51.015 Loading add-on SelfCast
10/2 04:24:51.015 Loading add-on Startup
10/2 04:24:51.015 Loading add-on Titan
10/2 04:24:51.015 ** Loading table of contents Interface\AddOns\Titan\Titan.toc
10/2 04:24:51.015 ++ Loading file Interface\AddOns\Titan\Localization.xml
10/2 04:24:51.015 Error loading Interface\AddOns\Titan\Localization.FR.lua
10/2 04:24:51.015 Loading add-on TitanRecap
10/2 04:24:51.015 Loading add-on TraceEvent
10/2 04:24:51.015 ** Loading table of contents Interface\AddOns\TraceEvent\TraceEvent.toc
10/2 04:24:51.015 ++ Loading file Interface\AddOns\TraceEvent\TraceEvent.xml
10/2 04:24:51.015 SETALLPOINTS set to true in frame with anchors (ignored)
10/2 04:24:51.015 Loading add-on TrinketMenu
10/2 04:24:51.015 ** Loading table of contents Interface\AddOns\TrinketMenu\TrinketMenu.toc
10/2 04:24:51.015 ++ Loading file Interface\AddOns\TrinketMenu\TrinketMenu.xml
10/2 04:24:51.015 Couldn't find frame parent: TrinketMenu_MainFrame
10/2 04:24:51.015 Couldn't find frame parent: TrinketMenu_MainFrame
10/2 04:24:51.015 Loading add-on TTCraftAddict
10/2 04:24:51.015 Loading add-on Waterboy
10/2 04:24:51.015 Loading add-on WeaponQuickSwap

Last edited by Gello : 10-02-05 at 02:46 AM.
  Reply With Quote
10-13-05, 10:23 PM   #4
stinkydawg
A Murloc Raider
Join Date: Oct 2005
Posts: 4
OK, maybe my early stupidity with this program, but shouldn't the line that reads;
16. In the box enter: HelloWorldFrame:Hide()
read; 16. In the box enter: HelloWorldForm:Hide()

I would think that would be the correct way to handle it. It worked fine for me written this way and actually gave me an error on click the other way. Is this an actual error with the script?

BTW, this thing rocks.
  Reply With Quote
10-13-05, 11:07 PM   #5
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
It depends on whether you followed step 7 or not. That tutorial was based on the first release which named new forms Form1, Form2, etc. The current software names based on the Project Title, so HelloWorldForm, HelloWorldForm1, etc., so you might not have done step 7, hence the error.
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote
10-14-05, 06:15 AM   #6
stinkydawg
A Murloc Raider
Join Date: Oct 2005
Posts: 4
That is what it was to a degree. The close frame line read out to a frame that I hadn't renamed. But, by closing frame, I still got the text gone, but the form itself was hanging there without any text. So bychanging it to clos form, the error and the form itself went away. Thanks for the quick reply.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Hello World tutorial


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