That's odd... Observer:AddBar(offset, text, color) should be generating a texture for each bar created.
Could it be that the for loop is executing when there aren't any bars at all? I was under the impression that for i=0, #barFrames should not loop at all if #barFrames is 0.
Also, your change doesn't seem to work. Same error.
I'm sure this is just me being blind, but I'm getting the following error:
[2009/11/22 13:18:01-2331-x1]: Observer-0.1\Observer.lua:168: attempt to index field '?' (a nil value)
Observer-0.1\Observer.lua:181: in function `?'
CallbackHandler-1.0-5:146: in function <...non\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:146>
<string>:"safecall Dispatcher[3]":4: in function <[string "safecall Dispatcher[3]"]:4>
<in C code>: ?
<string>:"safecall Dispatcher[3]":13: in function `?'
CallbackHandler-1.0-5:91: in function `Fire'
LibSharedMedia-3.0-90058:176: in function `Register'
SharedMedia-3.0.1-177\SharedMedia.lua:48: in main chunk
---
Yet, the odd thing is that this does not seem to effect my addon function at all. Everything works fine. Thoughts?
Did some more digging, and I agree with you. For some reason I was thinking that sendchatmessage and sendaddonmessage were the same functions, and thus thinking that my hooked function would then be firing on all addon communication.
Switched it over to sendchatmessage... not that it really has any noticeable effect and isn't part of a public addon, but I suppose it's the principal of the thing :P
Well that sounds extraordinarily inefficient. ChatEdit_ParseText is run every time you type (or delete) any character while the chat edit box is focused...
It only does anything if send == 1. I don't see how a single if statement returning false whenever a key is pressed is any more inefficient than having to check possibly thousands of messages being sent by addons only to not do anything with them.
In other words, I just need to replace the handler that the watch frame uses with my own that will use the new frame instead of blizzard's default one?
Ah okay, I saw that bit of code when I was rummaging around in Omen, but I assumed it was watching for the stuff that omen registers itself, and not waiting for LSM to get around to registering stuff from SharedMedia.
Well I was looking to do a complete overhaul of it for a new quest minion. For example, using bars to show progress amounts, buttons for the quest items that aren't monstrous, etc.
I can't stand how big and bulky the frame is. The thing takes like a third of my screen to show stuff that could be squeezed down to maybe a quarter of the size if redone in a sleeker approach.
Alright, I have NO clue why this is happening, but no matter what I pass to Fetch, I'm getting back "Interface\TargetingFrame\UI-StatusBar" as a texture. SharedMedia is enabled and injecting textures properly (other addons such as Omen and pitbull can find the texture I'm trying to use just fine). Did I miss something?
God I'm far too used to working in C and Java... I keep thinking a table = an array in Lua, so when I've got to use a table that's all I ever picture it doing >_<
0
edit:
That seems to have resolved it.
... Stupid fencepost errors...
0
Also, the error is only generated a single time, at load, and before AddBar is even called.
edit:
Now that I think about it, could it be possible that the event that calls that function is being fired prior to barFrames being created?
0
Could it be that the for loop is executing when there aren't any bars at all? I was under the impression that for i=0, #barFrames should not loop at all if #barFrames is 0.
Also, your change doesn't seem to work. Same error.
0
Yet, the odd thing is that this does not seem to effect my addon function at all. Everything works fine. Thoughts?
Pasty is at: http://www.pastey.net/129310
Yes, I know the code isn't optimized :P
0
Switched it over to sendchatmessage... not that it really has any noticeable effect and isn't part of a public addon, but I suppose it's the principal of the thing :P
0
It only does anything if send == 1. I don't see how a single if statement returning false whenever a key is pressed is any more inefficient than having to check possibly thousands of messages being sent by addons only to not do anything with them.
0
0
0
For example, would it be possible to search the outgoing string for say :name: and replace it with different text before it's sent to the server?
0
0
0
I can't stand how big and bulky the frame is. The thing takes like a third of my screen to show stuff that could be squeezed down to maybe a quarter of the size if redone in a sleeker approach.
0
Initializing LSM3:
embeds.xml:
Top of main Lua file:
Code using it:
0
Haven't really looked into replacing parts of the UI before, so I'm not really 100% certain where to begin >_<
edit:
Do I just butcher the default frame and replace it with mine?
In other words:
0