Thread: Window Chaining
View Single Post
03/07/14, 01:50 AM   #4
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
Originally Posted by inDef View Post
Conclusion: It seems like the reason we need this function is because the original creation of the Window via WINDOW_MANAGER:CreateTopLevelWindow("CFP_BuffDisplay") would NOT work as part of a method chain. For example, if we tried to call

WINDOW_MANAGER
:CreateTopLevelWindow("CFP_BuffDisplay")
:SetHidden(true)
:SetDimensions(w,h)

this would result in an error because WINDOW_MANAGER would be the object passed to each method in the chain, not the actual TLW object created.

This is my analysis of what I think is happening. I look forward to you guys tearing this apart and telling me all the places where I am wrong .

Thanks again and I look forward to learning more about this.
Right in that if every method on the control did return self then chaining would not be needed.
  Reply With Quote