|
World of Warcraft WTF?
Last post 01-08-2009 3:47 AM by bjolling. 23 replies.
-
01-05-2009 7:09 PM
|
|
-
mongoarne


- Joined on 01-05-2009
- Posts 2
|
From http://forums.worldofwarcraft.com/thread.html?topicId=11381238&sid=1 (sorry, no direct link to post seems to be possible)
# Quote start:
How do I register a /slash command? Credit: Jamash
In my UI AddOn, what do I need to do to create a new "/slashcommand" that the user can type into the chat box?
Slash command information is stored in two places. The first is a global table named SlashCmdList. In order to add a new command, create a new function with one argument. That argument will contain whatever text the user typed after the name of your command.
MyAddon = {};
function MyAddon.SlashCommand(Argument)
DoSomethingWith(Argument);
end
Then create a new entry in the table for your new slash command.
SlashCmdList["My_AddOn_Slash_Command"] = MyAddon.SlashCommand;
The second place slash command information is stored is in a haphazard series of global variables. These variables' names all start with "SLASH_", then the name of an entry in SlashCmdList, and end with a digit. The value of each variable is the text the user types to active the command. It's important to note that while the names of the variables are case-sensitive, the command the user types is case-insensitive (so "/MASC", "/Masc" and "/masc" all do the same thing.
SLASH_My_AddOn_Slash_Command1 = "/MASC";
SLASH_My_AddOn_Slash_Command2 = "/MASlashCommand";
SLASH_My_AddOn_Slash_Command3 = "/MyAddonSlashCommand";
#End
Is this a wtf or is there some strange reason why not somehing like this is used instead:
AddSlashCmd({"/masc", "/MASlashCommand", ... }, MyAddon.SlashCommand);
[edited by: mongoarne at 7:11 PM (GMT -5) on Mon, Jan 05 2009]
Wow.. I guess this forum is the real WTF... If someone wants to tell me how to make it behave, I'll fix it
|
|
-
-
rohypnol


- Joined on 11-17-2008
- Romania
- Posts 163
|
Re: World of Warcraft WTF?
and I love prepositions or
|
|
-
-
Ren


- Joined on 07-04-2008
- Posts 64
|
Re: World of Warcraft WTF?
From
http://forums.worldofwarcraft.com/thread.html?topicId=11381238&sid=1
(sorry, no direct link to post seems to be possible)
Quote start:
How do I register a /slash command? Credit: Jamash In my UI AddOn, what
do I need to do to create a new "/slashcommand" that the user can type
into the chat box? Slash command information is stored in two places.
The first is a global table named SlashCmdList. In order to add a new
command, create a new function with one argument. That argument will
contain whatever text the user typed after the name of your command.
MyAddon = {}; function MyAddon.SlashCommand(Argument)
DoSomethingWith(Argument); end Then create a new entry in the table for
your new slash command. SlashCmdList["My_AddOn_Slash_Command"] =
MyAddon.SlashCommand; The second place slash command information is
stored is in a haphazard series of global variables. These variables'
names all start with "SLASH_", then the name of an entry in
SlashCmdList, and end with a digit. The value of each variable is the
text the user types to active the command. It's important to note that
while the names of the variables are case-sensitive, the command the
user types is case-insensitive (so "/MASC", "/Masc" and "/masc" all do
the same thing. SLASH_My_AddOn_Slash_Command1 = "/MASC";
SLASH_My_AddOn_Slash_Command2 = "/MASlashCommand";
SLASH_My_AddOn_Slash_Command3 = "/MyAddonSlashCommand";
#End
Is this a wtf or is there some strange reason why not somehing like
this is used instead:
AddSlashCmd({"/masc", "/MASlashCommand", ... }, MyAddon.SlashCommand);
[edited by: mongoarne at 7:11 PM (GMT -5) on Mon, Jan 05 2009]
Wow.. I guess this forum is the real WTF... If someone wants to tell me how to make it behave, I'll fix it
First off, preview EVERYTHING. Oh right, you can't
|
|
-
-
tgape


- Joined on 07-16-2008
- Posts 473
|
Re: World of Warcraft WTF?
mongoarne:Is this a wtf
LUA is almost, but not quite, competitive with Community Server as far as WTFs go. I especially like the periodic garbage collection sweeps, during which your WoW character's basically just frozen. If your computer isn't fast enough, if your memory isn't large and/or fast enough, or if you're using addons which excessively task its garbage collection, this can easily result in one standing around for a few seconds every few minutes.
Of course, it's been over a year since I've been free, so things may have changed since then.
tharpa:The "Reveal Codes" feature alone makes it better than Word.
QFT.
|
|
-
-
tgape


- Joined on 07-16-2008
- Posts 473
|
Re: World of Warcraft WTF?
Ren:First off, preview EVERYTHING. Oh right, you can't
Preview works just fine for me, so long as I temporarily give this site authorization to run scripts. Except, of course, that it doesn't provide a perfect Preview, as it's implemented with Javascript code, which is not perfectly replicated by the server side code.
It did, of course, take me a while to find it, as most forums put the preview button by the submit button, rather than making it a tab at the top of the page.
tharpa:The "Reveal Codes" feature alone makes it better than Word.
QFT.
|
|
-
-
dtech


- Joined on 11-13-2007
- Utrecht, Netherlands
- Posts 623
|
Re: World of Warcraft WTF?
tgape:Except, of course, that it doesn't provide a perfect Preview, as it's implemented with Javascript code, which is not perfectly replicated by the server side code. It is? Then why the heck does it always take so long to show? Also for the WTF:
 It might be a bit tedious, but it's understandable and there's documentation for it.
|
|
-
-
GettinSadda


- Joined on 05-25-2006
- North-East Scotland
- Posts 288
|
Re: World of Warcraft WTF?
rohypnol:
Actually I seem to recall that new users can't add links until they have a few posts under thier belt (half-arsed spam prevention)
Linux is not a code base. Or a distro. Or a kernel. It's an attitude. And it's not about Open Source. It's about a bunch of people who still think vi is a good config UI.
Notice: Phorm, and its agents including ISPs collecting data on Phorm's behalf, are specifically forbidden from performing any processing or monitoring of the content of the above post. Hence, under the Regulation of Investigatory Powers Act 2000 any such attempt to profile this page by Phorm or its agents is illegal.
|
|
-
-
rohypnol


- Joined on 11-17-2008
- Romania
- Posts 163
|
Re: World of Warcraft WTF?
Don't know about that, but I know one thing: TDWTF RTE sucks0rz. By default, you have to select text and click on the link to create a href and you have to edit the html code to use colors. I'm afraid of checking out the advanced editor.
and I love prepositions or
|
|
-
-
dhromed


- Joined on 04-13-2005
- Dutchland
- Posts 3,734
|
Re: World of Warcraft WTF?
rohypnol:TDWTF RTE sucks0rz. In all curiosity, I'd like to know what browsers and settings people are using when they have such grave formatting issues. In a normal FFX installation, the rich text editor has no wtfs, save for the backspace-twice-delete bug. Disabling JS or explicitly using the lo-fi input box is fucked, because CS won't even do a formatting-101 newline => BR, and I believe Chrome+Safari = Webkit had some issues as well. FIY, the RTE is an instance of TinyMCE, which is also used by Wordpress. Any wtfs are the result of (in)Telligent's tinkering.
— Flurp.
|
|
-
-
rohypnol


- Joined on 11-17-2008
- Romania
- Posts 163
|
Re: World of Warcraft WTF?
dhromed: rohypnol:TDWTF RTE sucks0rz. In all curiosity, I'd like to know what browsers and settings people are using when they have such grave formatting issues.
OK, lemme rephrase that: TinyMCE seems to have some annoying issues. Using FF3x on Win32 and Mac with ABP (enabled) and Firebug (disabled), I get some exta whitespace at the end of the text from time to time, which doesn't always stick there and if I add my own space next to it and I erase my space, it erases both spaces and the character before them. Also, the fact that all the editor icons are enabled by default and the "link/unlink" icons are disabled is a bit of WTF and it takes a newcomer a bit to realize that the link is only enabled by selecting text. After selecting some text and deleting it with backspace, the icons remain enabled but they don't do anything. There were a couple of others, but I can't seem to remember them now.
and I love prepositions or
|
|
-
-
dhromed


- Joined on 04-13-2005
- Dutchland
- Posts 3,734
|
Re: World of Warcraft WTF?
Well good, it seems that your smaller issues are the same as everyone else's, including mine. I don't have trouble with the button bar, because I generally don't have trouble using button bars. I all honesty, I expect users of this site to be able to use one without problems as well. rohypnol:the link [button] is only enabled by selecting text.
Not necessarily odd or a problem at all, but from another perspective it might make sense to have it behave the same as the B/I/U toggle buttons.
— Flurp.
|
|
-
-
rohypnol


- Joined on 11-17-2008
- Romania
- Posts 163
|
Re: World of Warcraft WTF?
dhromed:Well good, it seems that your smaller issues are the same as everyone else's, including mine. I don't have trouble with the button bar, because I generally don't have trouble using button bars. I all honesty, I expect users of this site to be able to use one without problems as well. rohypnol:the link [button] is only enabled by selecting text.
Not necessarily odd or a problem at all, but from another perspective it might make sense to have it behave the same as the B/I/U toggle buttons.
Yeah, the problem is that it seems inconsistent.
and I love prepositions or
|
|
-
-
Spectre


- Joined on 05-09-2007
- ::1
- Posts 771
|
Re: World of Warcraft WTF?
GettinSadda: rohypnol:
Actually I seem to recall that new users can't add links until they have a few posts under thier belt (half-arsed spam prevention)
That doesn't seem to stop the periodic half-arsed spam attacks we have.
╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.
#TDWTF @ SlashNET was merged into #codelove @ the same network. You're still welcome to drop by. I guess.
|
|
-
-
lolwtf


- Joined on 04-02-2008
- (null)
- Posts 303
|
Re: World of Warcraft WTF?
Lua is actually pretty nice, it sounds like they've just implemented it poorly.
(null)
|
|
-
-
Lacutis


- Joined on 07-17-2007
- Posts 14
|
Re: World of Warcraft WTF?
Yes, it's a WTF, it really shouldn't be like that.
It really should be something like:
MyAddon =
{
AddonCommands = {"/Masc", "/MASlashCommand" }
}
function MyAddon.SlashCommand(Argument)
DoSomeStuff;
end
SlashCmdList["MyAddon"] = MyAddon;
Or if you wanted to get fancy:
MyAddon =
{
function SlashCommand1(Argument)
DoSomeStuff;
end
function SlashCommand2(Argument)
DoSomeOtherStuff;
end
AddonCommands = {{"/Masc", SlashCommand1}, {"/MASlashCommand", SlashCommand2}}
}
SlashCmdList["MyAddon"] = MyAddon;
The second is just off the top of my head, I mess around with Lua and the syntax might be a little off, but it gets the point across.
The problem is that they've redesigned the architecture for the Lua UI several times since the release of the game. When they do that they leave a lot of cruft in to keep as many things backwards compatible as possible so people don't have to relearn things.
A lot of the people making UI mods for WoW aren't programmers and some of the code is really scary. That's the main problem behind the WoW UI and the reason it freezes sometimes, it's not really the a problem with the GC as much as with anyone making a UI mod and not doing things the best way possible because they don't know how. That and the UI programming in general is a huge organic mess.
|
|
-
-
mongoarne


- Joined on 01-05-2009
- Posts 2
|
Re: World of Warcraft WTF?
I guess it's because I use opera that the forum cracks up then.
|
|
-
-
danixdefcon5


- Joined on 01-09-2007
- Mexico City, DF, Mexico
- Posts 608
|
Re: World of Warcraft WTF?
mongoarne:I guess it's because I use opera that the forum cracks up then.
Community Server seems to hate anything other than Firefox. I used to use IE, but TinyMCE would not load about 60% of the time, giving me weird JavaScript errors. Chrome and Opera give you the illusion the editor is working, except when you submit, all your text gets b0rked. I had to install Firefox on my work computer just to get the TDWTF forums working.
|
|
-
-
DOA


- Joined on 06-26-2007
- Posts 703
|
Re: World of Warcraft WTF?
I say we need more browsers. Not only do I enjoy stumbling on web sites that don't work for my current browser, but as a web designer I positively love debugging CSS/HTML to cater to the current crop of browsers in use out there.
|
|
-
-
AltSysrq


- Joined on 11-26-2008
- Confederate States of America
- Posts 40
|
Re: World of Warcraft WTF?
dhromed:Chrome+Safari = Webkit
That is an odd equation. Since Webkit is a part of Safari, we know that Safari-Webkit=Safari's interface. So are you suggesting that Chrome is the negation of the user interface of Safari? And what would that even mean?
|
|
-
-
morbiuswilters


- Joined on 01-15-2008
- East Coast Represent!
- Posts 4,987
|
Re: World of Warcraft WTF?
danixdefcon5:Community Server seems to hate anything other than Firefox. I used to use IE, but TinyMCE would not load about 60% of the time, giving me weird JavaScript errors. Chrome and Opera give you the illusion the editor is working, except when you submit, all your text gets b0rked.
It's more like Opera and Safari do not properly implement an RTF editor (may be a failure of your OS/platform to properly implement an RTF editor in some cases). TinyMCE has options to alert Opera and Safari users that they suck, but evidently Community Server does not make use of them but instead lets the mangled formatting to be posted. I guess they just figured any troglodyte still using Opera or Safari deserved to have their posts branded as badly-formatted garbage, lest anyone waste time reading them.
|
|
-
-
TwelveBaud


- Joined on 06-03-2008
- UVA/Wise, Wise, VA
- Posts 258
|
Re: World of Warcraft WTF?
Works for me: Mozilla/5.0 (Windows; U; Windows CE 5.2; rv:1.9.2a1pre) Gecko/20090106034601 Minimo/0.020 Doesn't work for me: All the other browsers on my mobile device, from Internet Explorer Mobile to Opera Mobile to that funky Java one that nobody ever uses.
|
|
-
-
tgape


- Joined on 07-16-2008
- Posts 473
|
Re: World of Warcraft WTF?
lolwtf:Lua is actually pretty nice, it sounds like they've just implemented it poorly.
I looked over the official Lua documents. It's a half-decent language - meaning that the other half isn't. Of course, all languages suck, and it's a lot better than many others.
That having been said, there were many notable differences between standard Lua and WoW's implementation, and they all sucked. It was one of the reasons I quit playing.
tharpa:The "Reveal Codes" feature alone makes it better than Word.
QFT.
|
|
-
-
tgape


- Joined on 07-16-2008
- Posts 473
|
Re: World of Warcraft WTF?
Lacutis:A lot of the people making UI mods for WoW aren't programmers and some of the code is really scary. That's the main problem behind the WoW UI and the reason it freezes sometimes, it's not really the a problem with the GC as much as with anyone making a UI mod and not doing things the best way possible because they don't know how.
Partially agreed. They do things such as extra copying of large objects for temporary reference, exercising the GC. Fixing up all of this kind of crud, and you only get freezes every hour or two.
But a decent language would spread the GC hit around a bit more. For example, in Perl, when you release some memory (for example, the variable goes out of scope or set to undef (Perl's equivalent to nil)), it's immediately released. Releasing memory on demand like this means your computer is only slowed by a few microseconds here and there. Of course, this requires a certain amount of discipline - you need to not use globals for temporary objects, as globals never go out of scope.
Yes, I realize that Lua isn't the only language to rely entirely on a garbage collector for releasing memory - but all of the ones I can think of off the top of my head have reputations for having performance problems. Not exactly the company I'd like to keep.
tharpa:The "Reveal Codes" feature alone makes it better than Word.
QFT.
|
|
-
-
bjolling


- Joined on 06-08-2008
- Belgium
- Posts 431
|
Re: World of Warcraft WTF?
tgape:Releasing memory on demand like this means your computer is only slowed by a few microseconds here and there.
It also means that your released objects cannot be re-used again so you have a performance hit everytime you create a new object. When an object goes out of scope it should be kept in a pool so it can be returned whenever you need a new object of the same type.
 It's... Monkey Piston's Frying Circle!
|
|
Page 1 of 1 (24 items)
|
|
|