Showing results 1 to 25 of 123
Search took 0.01 seconds.
Search: Posts Made By: Aanson
Forum: General Authoring Discussion 07-11-14, 06:01 AM
Replies: 8
Views: 1,149
Posted By Aanson
Hey, I'm surprised that Lombra's suggestion...

Hey,

I'm surprised that Lombra's suggestion isn't working for you.

You could try dictating the anchor points whenever the frame shows:

BNToastFrame:HookScript("OnShow", function(self)
...
Forum: Lua/XML Help 04-17-14, 06:09 AM
Replies: 13
Views: 1,504
Posted By Aanson
That clears things up. Cheers :)

That clears things up. Cheers :)
Forum: Lua/XML Help 04-17-14, 06:05 AM
Replies: 13
Views: 1,504
Posted By Aanson
Ah okay. Just to confirm my understanding. When...

Ah okay.

Just to confirm my understanding. When I write...

t.func = nil;

... does lua check to see if the function is referenced by anything else. If it is, it keeps it, if not, it gets wiped...
Forum: Lua/XML Help 04-17-14, 05:39 AM
Replies: 13
Views: 1,504
Posted By Aanson
Special thanks for that :)

Special thanks for that :)
Forum: Lua/XML Help 04-17-14, 05:35 AM
Replies: 13
Views: 1,504
Posted By Aanson
Thanks everyone for your advice. Yeah Semlar,...

Thanks everyone for your advice.



Yeah Semlar, I noticed that too after I'd written that post...

local function func() end
local self = CreateFrame();
self.func = func;
print( self.func == func );...
Forum: Lua/XML Help 04-16-14, 08:27 AM
Replies: 13
Views: 1,504
Posted By Aanson
In the above example, the function is replicated...

In the above example, the function is replicated and _G["MyButton"..i].DoSomething is not a pointer to the locally defined function 'DoSomething', it's a separate copy of the function. That's what I...
Forum: Lua/XML Help 04-14-14, 08:44 PM
Replies: 13
Views: 1,504
Posted By Aanson
Blizz metamethods

Hey all,

How can I get a reference to the metatable which is used by all frames created ingame ( which contains Show, SetClampedToScreen, IsObjectType etc etc )?

Only reason I ask is because I...
Forum: General Authoring Discussion 02-17-14, 04:28 PM
Replies: 27
Views: 3,730
Posted By Aanson
Yeah, that was my concern when I initially dealt...

Yeah, that was my concern when I initially dealt with it via filters. My other concern was that filters are checked quite early on in CF_MEH and the message could potentially (albeit a slim chance)...
Forum: General Authoring Discussion 02-14-14, 09:12 PM
Replies: 27
Views: 3,730
Posted By Aanson
Gotcha, sorry. local filterFunc = function(self,...

Gotcha, sorry.

local filterFunc = function(self, event, ...)
-- do stuff;
end
ChatFrame_AddMessageEventFilter("AN_EVENT", filterFunc);

Back to the drawing board for me, I guess.
Forum: General Authoring Discussion 02-14-14, 09:04 PM
Replies: 27
Views: 3,730
Posted By Aanson
I'm not sure what it would default to...

I'm not sure what it would default to actually.

I'd just assumed that Phanx had written it that way to avoid global table lookups all the time.
Forum: General Authoring Discussion 02-14-14, 08:59 PM
Replies: 27
Views: 3,730
Posted By Aanson
Oooof. I see your point about not getting the...

Oooof.

I see your point about not getting the event until all of the ChatFrame's OnEvent code has already run. Should be easily fixed though ty.
Forum: General Authoring Discussion 02-14-14, 06:47 PM
Replies: 27
Views: 3,730
Posted By Aanson
I think there's been some confusion. Blizzard...

I think there's been some confusion. Blizzard set up channel colouring precisely so that people would associate colours with channels, so I'm not really sure what you mean. The channel the message...
Forum: General Authoring Discussion 02-14-14, 06:44 PM
Replies: 27
Views: 3,730
Posted By Aanson
I'm pretty sure that I've found a good way of...

I'm pretty sure that I've found a good way of getting everything I need now, using Ravagernl's suggestion.


local frame;
for i = 1, NUM_CHAT_FRAMES do
frame = _G["ChatFrame"..i];
...
Forum: General Authoring Discussion 02-14-14, 06:25 PM
Replies: 27
Views: 3,730
Posted By Aanson
But that points to CF_MEH which is where 'self'...

But that points to CF_MEH which is where 'self' is coming from. I know that MessageEventHandler is passed with chat frame as it's 1st arg. Filters don't. If you check out...
Forum: General Authoring Discussion 02-14-14, 05:04 PM
Replies: 27
Views: 3,730
Posted By Aanson
What's "right" is whatever colour has been chosen...

What's "right" is whatever colour has been chosen for any given message type. Eg for vanilla, guild chat is green, party blue, whisper pink etc etc. The function I've written provides a visual...
Forum: General Authoring Discussion 02-14-14, 05:02 PM
Replies: 27
Views: 3,730
Posted By Aanson
MessageEventFilters have nothing to do with...

MessageEventFilters have nothing to do with frames, so the chat frame isn't it's first argument (event is). The filter doesn't need to know which frame (if any) a message will be displayed on. It...
Forum: General Authoring Discussion 02-11-14, 01:05 AM
Replies: 27
Views: 3,730
Posted By Aanson
I implemented a function using event filters very...

I implemented a function using event filters very much like the one suggested in your first post. It worked well, but like you'd said in that post, I still needed to get round the issue of working...
Forum: General Authoring Discussion 02-09-14, 02:36 PM
Replies: 27
Views: 3,730
Posted By Aanson
Yeah, I like the idea of simply hooking...

Yeah, I like the idea of simply hooking ChatFrame_MessageEventHandler too. I think I may be able to accomplish everything with that one hook. I'll put something together and find out.
Forum: General Authoring Discussion 02-08-14, 01:12 PM
Replies: 27
Views: 3,730
Posted By Aanson
That's great to know, thanks. I need to know the...

That's great to know, thanks.

I need to know the message type (ChatTypeInfo) and the Chat Frame it was posted to.

I can hook the AddMessage function of each ChatFrame to establish the...
Forum: General Authoring Discussion 02-06-14, 07:36 PM
Replies: 27
Views: 3,730
Posted By Aanson
Out of interest, see if I was just looking for...

Out of interest, see if I was just looking for the colour used for the last message, is there a simple way of going about that?
Forum: General Authoring Discussion 01-23-14, 08:04 PM
Replies: 16
Views: 1,949
Posted By Aanson
See my other post in this thread.

See my other post in this thread.
Forum: General Authoring Discussion 01-23-14, 06:05 PM
Replies: 16
Views: 1,949
Posted By Aanson
Yeah, I always prefer incremental loops as...

Yeah, I always prefer incremental loops as opposed to ipairs. Cheers :)
Forum: General Authoring Discussion 01-23-14, 05:45 PM
Replies: 16
Views: 1,949
Posted By Aanson
? That's not true.

?

That's not true.
Forum: General Authoring Discussion 01-23-14, 05:43 PM
Replies: 16
Views: 1,949
Posted By Aanson
Using "#" to get the number of indices of an...

Using "#" to get the number of indices of an array was not limited to varargs. It could be used for any array. It just so happens that a vararg expression is an array.

In the example provided, the...
Forum: General Authoring Discussion 01-23-14, 05:05 PM
Replies: 16
Views: 1,949
Posted By Aanson
Getting the number of indexes in an array.

Has anyone else noticed that since the most recent update, using the select function with the first arg "#" always results in a return value of 1?


self.Events = {"PLAYER_ENTERING_WORLD",...
Showing results 1 to 25 of 123