Remove Advertisements

Execution: Custom Alert Mod (GUI now available)

All things /script related

Moderators: Fridmarr, Worldie, Aergis, _Chloe

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Thu Aug 20, 2009 10:34 pm

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)

Postby Arees » Fri Aug 21, 2009 6:50 am

Sounds like you wrote some kind of recursive descent parser... good times =D
Image
User avatar
Arees
 
Posts: 546
Joined: Tue Dec 25, 2007 9:50 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Sat Aug 22, 2009 12:51 pm

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)

Postby fafhrd » Sat Aug 22, 2009 1:03 pm

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.
ImageImage
1/1 Lore pre-nerf.
User avatar
fafhrd
 
Posts: 5432
Joined: Fri Aug 31, 2007 2:31 pm

Re: Execution: Custom Alert Mod (Now available for testing)

Postby _Chloe » Sat Aug 22, 2009 2:14 pm

See Tankadin2 options in the color section for a usage of radio buttons.
User avatar
_Chloe
Moderator
 
Posts: 966
Joined: Fri Dec 07, 2007 6:36 pm
Location: Santa Monica, CA

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Sat Aug 22, 2009 4:14 pm

_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)

Postby _Chloe » Sat Aug 22, 2009 4:16 pm

No Problem.
User avatar
_Chloe
Moderator
 
Posts: 966
Joined: Fri Dec 07, 2007 6:36 pm
Location: Santa Monica, CA

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Sat Aug 22, 2009 4:43 pm

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)

Postby moduspwnens » Sat Aug 22, 2009 6:49 pm

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 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)

Postby _Chloe » Sat Aug 22, 2009 8:25 pm

Frame:SetToplevel(true);
User avatar
_Chloe
Moderator
 
Posts: 966
Joined: Fri Dec 07, 2007 6:36 pm
Location: Santa Monica, CA

Re: Execution: Custom Alert Mod (Now available for testing)

Postby moduspwnens » Sun Aug 23, 2009 6:21 pm

_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.

Image
Image
Image
Image

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)

Postby moduspwnens » Mon Aug 24, 2009 6:22 pm

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)

Postby _Chloe » Mon Aug 24, 2009 11:40 pm

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.
User avatar
_Chloe
Moderator
 
Posts: 966
Joined: Fri Dec 07, 2007 6:36 pm
Location: Santa Monica, CA

Re: Execution: Custom Alert Mod (Now available for testing)

Postby Sabindeus » Wed Aug 26, 2009 2:45 pm

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.
Image
Turn In, an NPC interaction automator - http://wow.curse.com/downloads/wow-addo ... rn-in.aspx
User avatar
Sabindeus
Moderator
 
Posts: 10455
Joined: Mon May 14, 2007 9:24 am

Re: Execution: Custom Alert Mod (Now available for testing)

Postby Arees » Wed Aug 26, 2009 2:49 pm

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.
Image
User avatar
Arees
 
Posts: 546
Joined: Tue Dec 25, 2007 9:50 pm

PreviousNext

Return to Add-ons, UI, and Macros

Who is online

Users browsing this forum: Google [Bot] and 1 guest


Remove Advertisements

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: Google [Bot] and 1 guest