View Single Post
12-25-11, 06:37 PM   #13
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Just curious, would one be able to make an addon communication spoof-proof?

I have my doubts, but maybe someone have managed to do this somehow. :P

Also, a really offtopic question but since we nerds are gathered here... can you create a lua class/table that acts like jquery? I.e something like:
tableName:get(2):isUnit("player"):call(function(self)print(self)end)

It would in this case run a custom function, but only on the table entry or entries where the get(2) returns the appropriate data, then a sub-function to check if the unit is player, then call something on that/those object/objects.

I am not sure if it's worth making this, performance wise would it bee too bad to practice this in LUA? It works in Javascript but they are totally different languages so, hehe.

But you get my idea, it would shorten a lot of code and potentially you could even code something for WoW that is jquery like, for example you can select the appropriate object using:
local t = tableName:get("UIParent>Button[name='CloseWindow']")
I.e. a button object owned by UIParent with the name 'CloseWindow' and then you have t where it's either one or many objects fitting the criteria, now you can:
t:IsShown():Click()
Ergo if it's shown then click it.

You'd need to program these functions of course but it's a neat idea, makes writing a bit shorter I think.
  Reply With Quote