Thread Tools Display Modes
08-15-09, 11:24 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Need lots of help! maybe...

So im going around in circles i think.

I used this to put an entry on the blizz addon list and it shows up 3 times in the list for some reason?

Code:
local GrimUIOptions = CreateFrame( "Frame", nil , UIParent ); 
	GrimUIOptions.name = "GrimUI";
	InterfaceOptions_AddCategory(GrimUIOptions);
I need help with getting a micromenu made. Thats not going so well either. Everything i try does nothing or creates a lot of bugs. I just need a generic frame that has the backpacks, keyring and the micro menu. I need help with other things if anyone's interested, if its enough help i could toss a few bux your way.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
08-16-09, 04:07 AM   #2
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
In which context did you put your code? It seems the lines get executed more than once. The three you've provided look fine to me.

For the micromenu it's maybe a good idea to take a look on how Blizz' creates it, especially in MainMenuMicroButtons and MainmenuBagButtons
My other thought would be, if you don't need the original buttons, you could modify them and move them out of the main bar. It highly depends on how you'd like to display / what you do with them.

And you should provide more details for the "other things", so people actually get interested
__________________
« Website | GitHub »

Oh hai!
  Reply With Quote
08-16-09, 08:46 AM   #3
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
What do you mean what context? xml or lua? its in lua. i tried an xml version with an lua script but it errored out completely. Ironically i had copied both pieces from the tutorials at wowwiki, neither function if done exactly as shown in the tutorial lol. At lest not the way im going about it.
Is it maybe because its in my UI's core lua file which contains the operations for lots of other stuff? if i stick that in its own file think that will make the difference?

As far as the menubars I checked out the blizzard one. Im not sure what was wrong with the way I set up the code. I got no errors the way i was doing it but... i also saw nothing on the screen. It should have shown the micromenu but nope.

Ive looked at macaroons menubar, nUI's bars, dominos, bliz's, simplebar which btw seems to be the most simple code but even trying to replicate that didnt work out for me. I think where i run into a problem is when other peoples codes come to savedvariables and layout templates. I just dont understand fully how those work and get setup yet so when i see them in the code.... i dont really know what to replace them with. I attempted to rebuild all the sections with templates and savedvariables but once im done things dont display, although i will give myself credit for the fact that at lest there were no errors

As far as help... well could use some help building the micromenu. obviously... among other things. Would pay someone with superior coding skills to help clean up my jumbled mess. Would REALLY hook it up if i could get major help with creating saved variables and making the UI adjustable by screen res and then of course adjusting layouts based on char class.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 08-16-09 at 08:49 AM.
  Reply With Quote
08-16-09, 08:48 AM   #4
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Hmm i just thought about it.... lets say that i have an xml file or several of them and they are all calling to the core.lua would that cause it to load over and over? creating the 3 titles in the blizzard addon options panel?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
08-16-09, 09:07 AM   #5
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
Originally Posted by Grimsin View Post
Hmm i just thought about it.... lets say that i have an xml file or several of them and they are all calling to the core.lua would that cause it to load over and over? creating the 3 titles in the blizzard addon options panel?
Yeah, as far as I know, the core.lua will be loaded over and over. The same thing also happens if you have defined core.lua in both your .xml and .toc-file.

Originally Posted by Grimsin View Post
As far as the menubars I checked out the blizzard one. Im not sure what was wrong with the way I set up the code. I got no errors the way i was doing it but... i also saw nothing on the screen. It should have shown the micromenu but nope.
It's a good idea to post your current code, so we can look over it and maybe find some small mistakes.
The first tip I give to all peope is to add looots of debug-output, sometimes after every line to check where the problem lies. Output some suspicious variables to your chatframe or just a "test"-message to see if the code executes correctly.
With 3.2 there are also some good debugging techniques in the default UI included - for example, you could do a "/dump MyFrame:GetPoint()" to see if the position is correct or doing the same with :GetWidth(), :GetHeight() or IsVisible().

I'd like to help you, but I'm away from tomorrow until saturday :/
__________________
« Website | GitHub »

Oh hai!
  Reply With Quote
08-16-09, 09:55 AM   #6
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
In my experience, you will see it shown more than once because it is being triggered by other addons doing the same thing. To fix this issue, I would run it under the ADDON_LOADED event with arg of your addon's name.

e.g.
if event == ADDON_LOADED and ... == GrimUI then
--do stuff
end
__________________
Never be satisfied with satisfactory.
  Reply With Quote
08-16-09, 11:50 AM   #7
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
it is in both the xml and the toc that i know for sure. Ive noticed that a lot of peoples .tocs do not have the lua files only the xml. should i only have xml's listed in my toc?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
08-16-09, 11:56 AM   #8
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
Only have the .xml file in the ToC. The Lua file will be run by the XML file because of the script tag.
__________________
Never be satisfied with satisfactory.
  Reply With Quote
08-16-09, 12:31 PM   #9
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
okay so what about lua's that are not called by the xml? those need to be in the toc then? heh well there is one problem i have... im going to have to restructure my files then because i just have one big xml file and one big lua file then i also have another xml file for just the artwork and buttons over the art which is also calling to the main lua file. I have multiple xmls calling the same lua basically then a few pure lua's that are not controlled by xmls or hooked to them. ugh... crys

i knew this was going to be the case eventually. I also have no saved variables of any kind yet its all just flat code and to add the variables part to it all is going to require a ton of rewriting i think, clueless really on how exactly the variables part works. i understand to some degree how the hooking between files works but... obviously not well enough

lol these are the things i was talking about needing help with
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
08-16-09, 02:15 PM   #10
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
I put that line of code into a file by itself and it works just fine it was totally because my xml files were calling the lua multiple times.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need lots of help! maybe...


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