Execution: Custom Alert Mod (GUI now available)
Moderators: Fridmarr, Worldie, Aergis, _Chloe
Re: Execution: Custom Alert Mod (Now available for testing)
moduspwnens wrote:I talked to Chloe in vent and we took care of two of the three places that the excess garbage is being generated. I think the last has both of us stumped, and it's where it appears that using a loadstring to evaluate logical expressions is creating a function that sits in memory until it is garbage collected. I tried defining an addon-wide "placeholder" function and then changing that function to the loadstring's result, but that still creates the garbage. I'm hoping there's some solution that doesn't involve me writing my own function for logical evaluation.
After a short discussion with someone else on WoWInterface's forum, I gave up on the loadstring and did write my own logical evaluation function. It's not as bad as I thought it would be now that I have somewhat of an understanding of regular expressions and gsub. Starting from version 0.19, it should no longer generate excessive garbage while parsing events.
It basically recursively calls itself on different parts of the expression until it's reduced to a simple "x or y" or "x and y", and then just evaluates those. Seems to be working. It doesn't follow order or operations, though, except basically grouping symbols and left to right. I may fix that later if it becomes an issue.
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
Sounds like you wrote some kind of recursive descent parser... good times =D
-

Arees - Posts: 546
- Joined: Tue Dec 25, 2007 9:50 pm
Re: Execution: Custom Alert Mod (Now available for testing)
Radio buttons! I believe I've seen them, but do they exist? I don't see anything on the Widget API page, but I could be missing them or calling them the wrong name. Without them, I guess I'll just have to make a set of checkboxes that uncheck the other checkboxes when checked.
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
Only mod I remember seeing that uses radio buttons had custom ones. But it had custom everything else for UI too.
Note that you can always do anything that a radio button does with a dropdown list, which I think is what most mods use instead.
Note that you can always do anything that a radio button does with a dropdown list, which I think is what most mods use instead.
-

fafhrd - Posts: 5430
- Joined: Fri Aug 31, 2007 2:31 pm
Re: Execution: Custom Alert Mod (Now available for testing)
See Tankadin2 options in the color section for a usage of radio buttons.
-

_Chloe - Moderator
- Posts: 945
- Joined: Fri Dec 07, 2007 6:36 pm
Re: Execution: Custom Alert Mod (Now available for testing)
_Chloe wrote:See Tankadin2 options in the color section for a usage of radio buttons.
Just checked over that. It looks like it's a set of checkboxes that uncheck the other boxes, only looking different (inheriting a different UI element). I suppose it is essentially the same kind of thing. Thanks!
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
I am making some good progress on my GUI though. Sabin had me a little scared, and it was kind of annoying to pick up with all the WoWWiki tutorials being done in XML, but now that I have a fair grasp on it, it's not too bad.
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
If there happens to be someone to find this before I figure it out:
I have two different frames, and I need one to be on top of the other at all times. I know how to do this with layers, but I don't know how to do it with two separate frames. I found Frame:IsTopLevel() and Frame:SetTopLevel(), but it's telling me the method doesn't exist. I'm fairly sure I'm referring to a frame. Is this something that was changed recently or am I screwing up? Or am I down the wrong path anyway?
I have two different frames, and I need one to be on top of the other at all times. I know how to do this with layers, but I don't know how to do it with two separate frames. I found Frame:IsTopLevel() and Frame:SetTopLevel(), but it's telling me the method doesn't exist. I'm fairly sure I'm referring to a frame. Is this something that was changed recently or am I screwing up? Or am I down the wrong path anyway?
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
Frame:SetToplevel(true);
-

_Chloe - Moderator
- Posts: 945
- Joined: Fri Dec 07, 2007 6:36 pm
Re: Execution: Custom Alert Mod (Now available for testing)
_Chloe wrote:Frame:SetToplevel(true);
Welp, it's telling me the method doesn't exist, so I must have something wrong with my frame. I've got a workaround for now, so I'll come back to it later.
Another quick question: I'm about to get into my extra filter selection window, and I'm looking to make a checkbox with a little extended functionality. One example of an extra filter would be "in combat". The thing is, I want my user to be able to check the box (meaning "only do this rule while in combat") or X the box (meaning "only do this rule when NOT in combat"), or leave it blank (meaning do this rule either way). I think I've seen something like this before. It's something I could implement, but I think it may be a template or something I've seen somewhere else.
Anyway, here are some screenshots of the functional parts of the GUI.




I think it looks pretty good. Done completely in Lua. Let me know if anyone has any feedback.
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
moduspwnens wrote:Another quick question: I'm about to get into my extra filter selection window, and I'm looking to make a checkbox with a little extended functionality. One example of an extra filter would be "in combat". The thing is, I want my user to be able to check the box (meaning "only do this rule while in combat") or X the box (meaning "only do this rule when NOT in combat"), or leave it blank (meaning do this rule either way). I think I've seen something like this before. It's something I could implement, but I think it may be a template or something I've seen somewhere else.
Well, my first step in implementing this would include making a template, but it appears that to make a template, I need to make a virtual frame. I can't figure out how to do that without XML tagging it as virtual.
I rule.
- moduspwnens
- Moderator
- Posts: 6211
- Joined: Tue Nov 06, 2007 12:28 pm
- Location: Shattered Hand
Re: Execution: Custom Alert Mod (Now available for testing)
moduspwnens wrote:moduspwnens wrote:Another quick question: I'm about to get into my extra filter selection window, and I'm looking to make a checkbox with a little extended functionality. One example of an extra filter would be "in combat". The thing is, I want my user to be able to check the box (meaning "only do this rule while in combat") or X the box (meaning "only do this rule when NOT in combat"), or leave it blank (meaning do this rule either way). I think I've seen something like this before. It's something I could implement, but I think it may be a template or something I've seen somewhere else.
Well, my first step in implementing this would include making a template, but it appears that to make a template, I need to make a virtual frame. I can't figure out how to do that without XML tagging it as virtual.
Just make a cycling button for it. Default it's either way, one click does it only in combat, next when not in combat, and just make it change the text and/or tooltip.
-

_Chloe - Moderator
- Posts: 945
- Joined: Fri Dec 07, 2007 6:36 pm
Re: Execution: Custom Alert Mod (Now available for testing)
moduspwnens wrote:I am making some good progress on my GUI though. Sabin had me a little scared, and it was kind of annoying to pick up with all the WoWWiki tutorials being done in XML, but now that I have a fair grasp on it, it's not too bad.
you're a better man than I, gunga-din.
Maybe the next time I find myself with copious free time (read: unemployed) I'll try doing a UI in Lua and see how it feels.
-

Sabindeus - Moderator
- Posts: 10321
- Joined: Mon May 14, 2007 9:24 am
Re: Execution: Custom Alert Mod (Now available for testing)
I see version 0.19 as being the latest on wowinterface... is that still right? I think I'm going to have some time this week to test it.
-

Arees - Posts: 546
- Joined: Tue Dec 25, 2007 9:50 pm
Return to Add-ons, UI, and Macros
Who is online
Users browsing this forum: No registered users and 1 guest



