View Single Post
08-03-05, 01:37 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
You need to change the first line to:

<Ui xmlns="http://www.blizzard.com/wow/ui/">

At the minimum. All the rest in that line is optional. The schemaLocation you have there is so xml-validating programs can find the xsd that has the rules for the markup language.

edit: You'll want to remove one of those </Frame>s at the end. That will cause the xml to not load.

Other than that your xml looks fine. The no anchor should be fine since you're anchoring it later in the mod.

When testing, if you still don't see anything, try poking at bits in game to see if the mod loaded at all:

/script message(MyownFrame)
should say Table:00061234 or something like that. Or

/script message(MyownFrame:IsVisible())

And of course you can check the FrameXML.log file in the Logs directory to see if it had problems loading the file.

--
edit again:

In the lua side, you need to register "VARIABLES_LOADED" for it to fire (this:RegisterEvent("VARIABLES_LOADED") in your OnLoad), otherwise your MO_Save will never get created. I also notice you have MD_Save.x,y in the MO_LoadVariables() function, should probably be MO_Save.

I think with that it should work fine. Tho a couple things that won't have any effect:

Instead of: getglobal("MyownFrame"):ClearAllPoints();
You can use: MyownFrame:ClearAllPoints()

Also your MO_Save seems to be only to store the last position of the window. You can let the game do this. When a player moves a window (and now when a mod moves a window with SetPoint) it stores this new position in layout-cache.txt so a mod doesn't have to handle its position.

If you set a default anchor in the xml you can remove all the MO_Save stuff. Unless of course you plan to do more with positioning and stuff.

Last edited by Gello : 08-03-05 at 01:56 AM.
  Reply With Quote