-
Posted by mosphet on Sun, 05 Jun 2011 10:39:13
Hello again, got a different issue this time and I'm baffled (same addon) but this is for the visual side of it.
There is a function in the core file that I use to trigger the events. All events work apart from the GUI which is in another file.
Function for trigger in core file: http://pastebin.com/raw.php?i=1BtYQSik
And this is the GUI file: http://pastebin.com/raw.php?i=yTj9NNEp
For some reason BidsGui is a nil value, I'm overlooking something because I really can't find why. If you need more posting just let me know.
Oh, and just for clarification, Prefixes are limited to 16 characters now right?
-
Posted by jnwhiteh on Mon, 06 Jun 2011 14:37:52
If you're posting an error message, you need to please post the entire thing.. including the file and line number and any relevant stack traceback. I'd be completely guessing without that.
-
Posted by mosphet on Mon, 06 Jun 2011 14:42:14
Error: http://pastebin.com/raw.php?i=w7HNnHch
In more detail, that error is generated from "/vml show", its supposed to bring up the GUI. But I don't get any lua error when I click "Start Bid" since its supposed to do the same thing as "/vml show"
Heres the full VexML.lua: http://pastebin.com/KC8EbExk
I think I may have failed in making BidsGui globally accessable. (still getting to grips with the change in language)
-
Posted by jnwhiteh on Mon, 06 Jun 2011 14:44:49
Yes, you make it local in the file where you define the GUI. That means its local to that file and can't be accessed outside it. You could just not make it local, or add _G["BidsGui"] = BidsGui somewhere in the file.
-
Posted by jnwhiteh on Mon, 06 Jun 2011 14:46:56
You edit your posts a lot.. but I've already responded..
-
Posted by mosphet on Mon, 06 Jun 2011 14:47:49
Aye, figured that might be why /vml show doesnt work, not sure why I added it. But the funny thing is, even locally it doesn't trigger the GUI. That file receives the "VexML_StartBid" message, but doesn't open the GUI. This is the error I'm struggling to find. Was trying to make my previous more detailed.
-
Posted by jnwhiteh on Mon, 06 Jun 2011 14:49:15
Well if you get an error message, I'll do my best to help you. And yes, prefixes are 16 chars now.
-
Posted by mosphet on Mon, 06 Jun 2011 14:59:13
Thanks for the help so far (Especially for pointing out silly mistakes :D)
Cannot generate an LUA error so I've added DEFAULTCHATFRAME:AddMessage() debug lines for now, it makes it though the functions as I get all messages. There's something I'm missing. Going to keep digging.
-
Posted by jnwhiteh on Mon, 06 Jun 2011 14:59:57
Good, but its Lua, not LUA =)
-
Posted by mosphet on Mon, 06 Jun 2011 15:02:11
Aight ;p
-
Posted by mosphet on Wed, 08 Jun 2011 10:35:34
Well, I found out what the issue was and now I feel stupid because it was staring me right in the face xD.
Basically it was down to this:
`if VexML.db.global.window.x ~= 0 and VexML.db.global.window.y ~= 0 then
frame:SetPoint( VexML.db.global.window.point, UIParent, VexML.db.global.window.relativePoint, VexML.db.global.window.x, VexML.db.global.window.y )
end`
What I had done above was a complete fail. I have no idea how it ended up like that, I must have drifted to sleep while doing it. Anyway, once the values are actually readable to that function it worked xD
All seems to be good and proper now! Loads up in the middle and saves the position I move it to. Thanks for the continued support :)! As to why I put ~= 0 I have no idea.