Showing results 1 to 25 of 91
Search took 0.01 seconds.
Search: Posts Made By: Sharparam
Forum: Lua/XML Help 09-14-14, 03:19 AM
Replies: 11
Views: 453
Posted By Sharparam
But now that you have an SSD, you need to worry...

But now that you have an SSD, you need to worry about running out of space instead! :)
Forum: Lua/XML Help 09-09-14, 11:14 AM
Replies: 12
Views: 451
Posted By Sharparam
It might be worth mentioning they are not exactly...

It might be worth mentioning they are not exactly equivalent (but the cases when they aren't are very rare special cases). As mentioned in a comment to this StackOverflow answer...
Forum: Lua/XML Help 08-27-14, 09:58 AM
Replies: 25
Views: 1,354
Posted By Sharparam
Again, this is related to the scale of an addon....

Again, this is related to the scale of an addon. For small addons with just a file then yes, it's very convoluted and unnecessary, but for larger projects it can be helpful to simply add event...
Forum: Lua/XML Help 08-26-14, 08:53 AM
Replies: 25
Views: 1,354
Posted By Sharparam
Well you'd be right that SetScript isn't a good...

Well you'd be right that SetScript isn't a good name for a method that appends functions to a table I guess. Something I've done recently though, related to that, is having events be dynamically...
Forum: Lua/XML Help 08-25-14, 06:02 PM
Replies: 25
Views: 1,354
Posted By Sharparam
The default frame supports firing custom events...

The default frame supports firing custom events and multiple callback functions?

I suppose naming conventions in projects can have an effect on what the assumed type of an object is, I tend to have...
Forum: Lua/XML Help 08-25-14, 03:12 PM
Replies: 25
Views: 1,354
Posted By Sharparam
One reason could be if you make something that...

One reason could be if you make something that you want to behave like a Frame's event/script system. Say you want custom callbacks for some object you have, like:


local object =...
Forum: Lua/XML Help 08-25-14, 12:30 PM
Replies: 25
Views: 1,354
Posted By Sharparam
Well monkeypatching isn't exactly a good thing...

Well monkeypatching isn't exactly a good thing most of the time is it? :P
Forum: Lua/XML Help 08-25-14, 12:01 PM
Replies: 25
Views: 1,354
Posted By Sharparam
It's still not exactly good practice I'd say to...

It's still not exactly good practice I'd say to just modify a table from CreateFrame with your own methods, at least for addons larger than a single file. I've never really come across a design...
Forum: Lua/XML Help 08-25-14, 09:32 AM
Replies: 25
Views: 1,354
Posted By Sharparam
What I mean is you could have something in your...

What I mean is you could have something in your table named the same as an existing function or value, which means what was previously defined is overwritten with your stuff. That could lead to bugs...
Forum: Lua/XML Help 08-25-14, 08:39 AM
Replies: 25
Views: 1,354
Posted By Sharparam
There can be collisions in key names though,...

There can be collisions in key names though, depending on the AddOn, so I prefer having my AddOn specific code in its own table (the private one passed as an argument to each file).

For a small...
Forum: General Authoring Discussion 08-23-14, 07:14 PM
Replies: 16
Views: 1,670
Posted By Sharparam
Google is a very good place to find information...

Google is a very good place to find information though. There are countless StackOverflow questions/answers for example, which can often help when you are experiencing problems, and the best way to...
Forum: Lua/XML Help 08-21-14, 02:02 PM
Replies: 18
Views: 1,170
Posted By Sharparam
With garbage collection...

With garbage collection disabled:


collectgarbage("stop")

local clock = os.clock

local function func()
return 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9
end
Forum: Lua/XML Help 08-19-14, 02:52 PM
Replies: 18
Views: 1,170
Posted By Sharparam
I'm not sure if there's a performance benefit to...

I'm not sure if there's a performance benefit to declaring those local variables outside of the for loop, as they are reassigned each loop iteration anyway (although I could be wrong). There's also...
Forum: AddOn Search/Requests 08-15-14, 06:19 PM
Replies: 22
Views: 1,958
Posted By Sharparam
Problem is you can end up with a lot of stuff...

Problem is you can end up with a lot of stuff storing data in guild notes that are either incompatible with each other or use up the severely limited space (seriously, why hasn't Blizz given us more...
Forum: AddOn Search/Requests 08-15-14, 01:36 PM
Replies: 22
Views: 1,958
Posted By Sharparam
The whole data collection part is probably not...

The whole data collection part is probably not that difficult to implement, sharing it is probably also pretty easy (but needs several messages to transfer notes unless they are limited in length,...
Forum: Lua/XML Help 08-07-14, 11:25 AM
Replies: 6
Views: 401
Posted By Sharparam
The issue is most likely that you're running the...

The issue is most likely that you're running the myAddon_OnLoad function at the end of the file, rather than when your addon has actually loaded. So the Saved Variables have not been initialized at...
Forum: Lua/XML Help 08-07-14, 10:49 AM
Replies: 6
Views: 401
Posted By Sharparam
Can you post the complete code (including TOC)?

Can you post the complete code (including TOC)?
Forum: Lua/XML Help 08-07-14, 08:59 AM
Replies: 6
Views: 401
Posted By Sharparam
You would have a "defaults" table defined in your...

You would have a "defaults" table defined in your AddOn that you then pass to CopyDefaults in ADDON_LOADED, so something like the following:


local defaults = {
foo = "hello world",
bar = { key...
Forum: AddOn Help/Support 08-06-14, 08:02 PM
Replies: 13
Views: 734
Posted By Sharparam
That part of the code uses the obsolete "argn"...

That part of the code uses the obsolete "argn" notation, so it would have to be updated to use proper Lua vararg instead. There is likely to be similar issues in other places as well.
Forum: AddOn Help/Support 08-06-14, 08:36 AM
Replies: 13
Views: 734
Posted By Sharparam
You could try replacing lines 597 through 603 in...

You could try replacing lines 597 through 603 in Core.lua with this:


function AIBot:ChatCommand(input)
if not input or input:trim() == "" then
...
Forum: Lua/XML Help 08-05-14, 10:47 AM
Replies: 8
Views: 457
Posted By Sharparam
You can get around the "not defined" issue by...

You can get around the "not defined" issue by forward-declaring functions:


local b

local function a() b() end

function b() print 'foo' end
Forum: Lua/XML Help 08-05-14, 10:30 AM
Replies: 8
Views: 328
Posted By Sharparam
Because there is no nil error in the call. {nil,...

Because there is no nil error in the call. {nil, nil} doesn't evaluate to nil, it evaluates to an empty table: {}. But since it has no values there is nothing to iterate over and the loop is...
Forum: General Authoring Discussion 07-28-14, 10:39 AM
Replies: 7
Views: 1,067
Posted By Sharparam
For an AddOn I'm developing in MoonScript...

For an AddOn I'm developing in MoonScript (http://moonscript.org/), I use a Python script (https://github.com/SharpWoW/ShareXP/blob/master/archive.py) to compile *.moon files and put results in a zip...
Forum: General Authoring Discussion 07-28-14, 04:09 AM
Replies: 7
Views: 1,067
Posted By Sharparam
I don't think it has such a feature at all...

I don't think it has such a feature at all (granted, I haven't really used the WoWI packager so I could be wrong).
Forum: Lua/XML Help 05-22-14, 03:06 AM
Replies: 6
Views: 840
Posted By Sharparam
At least if Blizzard has finally decided how to...

At least if Blizzard has finally decided how to handle cross-realm stuff across the board. It seemed to be going back and forth several times over. Removing and adding realm suffixes like crazy...
Showing results 1 to 25 of 91