View Single Post
09-26-16, 01:07 AM   #26
Kagura
A Fallenroot Satyr
Join Date: Nov 2008
Posts: 21
Originally Posted by Lynxium View Post

Code:
{ 
	SmallButton, 
	{ 
		anchors = "BOTTOMLEFT", 
		onClick = function()
			self:ok()
		end
	}, 
	{ 
		Text, 
		anchors = "*", 
		"OK" 
	} 
},
But then again, this is just a hunch because this change might complicate the rendering logic and buy nothing so to really provide insights to how you can improve performance one needs to know the full story beyond the generated code.
It actually won't. Thanks for this, I improved this part. It was fairly trivial to achieve next
lua Code:
  1. -- js -> lua
  2. frame.SetPoint('*') -> frame:SetAllPoints()
  3. frame.SetPoint('TOPLEFT') -> frame:SetPoint('TOPLEFT')
  4. frame.SetPoint(['TOPLEFT', 'parent', 'TOPLEFT']) -> frame:SetPoint('TOPLEFT')
  5. frame.SetPoint(['TOPLEFT', 'parent', 'TOPRIGHT']) -> frame:SetPoint('TOPLEFT', frame:GetParent(), 'TOPRIGHT')
  6. frame.SetPoint(['TOPLEFT', 20, 20]) -> frame:SetPoint('TOPLEFT', 20, 20)
  7. frame.SetPoint(someVariable) -> frame:SetPoint(unpack(someVariable))

Originally Posted by Lynxium View Post
p.s. Just a minor note Lua isn't an acronym but a word so you actually need to write Lua instead of LUA.
Again: thanks for this

Last edited by Kagura : 09-26-16 at 01:27 AM.
  Reply With Quote