View Single Post
06/27/17, 09:55 AM   #6
BoarGules
 
BoarGules's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 34
I'm trying to follow this advice:

Originally Posted by sirinsidiator View Post
Of course you need to set your anchors as required. ... [Y]ou can listen to a scene's "StateChange" callback:

Lua Code:
  1. GUILD_HOME_SCENE:RegisterCallback("StateChange", function(oldState, newState)
  2.     myControl:ClearAnchors()
  3.     if(GUILD_HOME_SCENE:IsShowing()) then
  4.         myControl:SetAnchor(...) -- configuration a
  5.     end
  6. end)
My difficulty is that calling myControl:ClearAnchors() results in the message *function expected instead of nil* and d() confirms that myControl.ClearAnchors is in fact nil (but myControl is not). Any suggestions about what I am doing wrong?
  Reply With Quote