I'm trying to get hotspot info so that it can be deleted and replaced/updated, however, WindowHotspotInfo returns nil for everything.
For this test case, the hotspot_id is "HoG_Who_Window:close" with the function who_close_mouseup defined as it's mouseup function.
When the hotspot is clicked (mouseup) this is the output:
The hotspot_id is a concatenation of the windows's name, ":" and an action. The end result would be a window that will rollup/rolldown when the hotspot was clicked depending on the action.
WindowHotspotList does indeed list all the hotspots defined in the window. Currently most of these are created as hoverover spots to list information on a given character shown in the window.
I'm trying to retrieve the info about the hotspot about to be replaced so that the new hotspot with opposite action can be put in its place. It's not cooperating.
For this test case, the hotspot_id is "HoG_Who_Window:close" with the function who_close_mouseup defined as it's mouseup function.
function who_close_mouseup(flags, hotspot_id)
Win, action = string.match(hotspot_id, "^([%a_]+):(%a+)")
Note("--- Parse ID and Window Name:")
Note("action="..action)
Note("win="..Win)
Note("hotspot_id="..hotspot_id)
hotspots = WindowHotspotList(Win)
Note("--- List of hotspots for ".. Win)
if hotspots then
for _, v in ipairs (hotspots) do
Note (v)
end
end -- if any
Note("--- Information about the calling hotspot:")
for i=1,12 do
Note("WindowHotSpotInfo(\""..Win.."\", \""..hotspot_id.."\", "..i..") = "..tostring(WindowHotspotInfo(Win, hotspot_id, i)))
end
endWhen the hotspot is clicked (mouseup) this is the output:
--- Parse ID and Window Name:
action=close
win=HoG_Who_Window
hotspot_id=HoG_Who_Window:close
--- List of hotspots for HoG_Who_Window
Darwin
HoG_Who_Window:close
TestNewbieFour
TestNewbieThree
TestNewbieTwo
Testnewbieone
--- Information about the calling hotspot:
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 1) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 2) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 3) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 4) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 5) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 6) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 7) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 8) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 9) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 10) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 11) = nil
WindowHotspotInfo("HoG_Who_Window", "HoG_Who_Window:close", 12) = nilThe hotspot_id is a concatenation of the windows's name, ":" and an action. The end result would be a window that will rollup/rolldown when the hotspot was clicked depending on the action.
WindowHotspotList does indeed list all the hotspots defined in the window. Currently most of these are created as hoverover spots to list information on a given character shown in the window.
I'm trying to retrieve the info about the hotspot about to be replaced so that the new hotspot with opposite action can be put in its place. It's not cooperating.