Hi guys!
I’m not sure if I really understand this and I’m hoping somebody can shed some light on it.
I’ve currently created a “toolTip” class, which displays a toolTip for 1.5 seconds and then disappears again. I initiate it the following way:
local toolTip = require "scripts.toolTip"
local t = toolTip.new( obj, "some text" )
Just to clarify, the first parameter is the object that it will stick to. It reads its coordinates and finds out if it can position itself there. The second parameter is the string.
Inside the toolTip class (toolTip.lua), the toolTip fades out using a transition after which it removes itself:
display.remove( toolTip )
However, I initialized the toolTip in the “t” variable. Once the toolTip removes itself, the “t”-variable is still pointing towards the toolTip table. What would be the correct way to nil the “t”-variable once the toolTip-object initiates display.remove( toolTip )? [import]uid: 86582 topic_id: 29089 reply_id: 329089[/import]