SpudmanWP
November 23rd, 2010, 22:05
I have two problems with this function.
Problem 1. It seems the documentation mentions it twice by mistake here (https://www.fantasygrounds.com/refdoc/Interface.xcp#onHotKeyActivated).
onHotKeyActivated
handler function onHotKeyActivated( dragdata )
The functions registered on this handler will be called whenever a hot key is pressed.
Parameters
dragdata (dragdata)
A dragdata object containing the state of values connected to the depressed hot key.
onHotKeyDrop
handler function onHotKeyDrop( dragdata )
The functions registered on this handler will be called whenever an object is dropped on the hot key bar.
Parameters
dragdata (dragdata)
A dragdata object containing the state of values connected to the mouse cursor as part of a drag and drop operation.
onHotkeyActivated
handler function onHotkeyActivated( draginfo )
The functions registered on this handler will be called whenever a hot key bar slot is activated. This allows the processing of custom drag types and context specific special operation.
Parameters
draginfo (dragdata)
The dragdata object representing the contents of the activated hot key bar slot
The first entry references when a hotkey is pressed and the second when a slot is activated. They also pass two different types of data (dragdata & draginfo).
Problem 2. I have a sample ext that I wrote using the above functions:
function onInit()
if ChatManager then
--ChatManager.registerSlashHandler("/KeyDmp", KeyDmp);
print ("ETUtility Loaded")
end
end
function onHotKeyActivated( myData )
print("ETUtility Hotkey Pressed")
print(myData)
ChatManager.addMessage(myData)
return true;
end
function onHotKeyDrop( myData )
print("ETUtility Hotkey Dropped")
print(myData)
ChatManager.addMessage(myData)
return true;
end
function onHotkeyActivated( myData )
print("ETUtility Hotkey Activated")
print(myData)
ChatManager.addMessage(myData)
return true;
end
I know that the ext is being loaded because the "ETUtility Loaded" message (from the onInit function) appears on the console. Whenever I use the hotkeys, nothing appears on the console.
Is there something I am missing?
Problem 1. It seems the documentation mentions it twice by mistake here (https://www.fantasygrounds.com/refdoc/Interface.xcp#onHotKeyActivated).
onHotKeyActivated
handler function onHotKeyActivated( dragdata )
The functions registered on this handler will be called whenever a hot key is pressed.
Parameters
dragdata (dragdata)
A dragdata object containing the state of values connected to the depressed hot key.
onHotKeyDrop
handler function onHotKeyDrop( dragdata )
The functions registered on this handler will be called whenever an object is dropped on the hot key bar.
Parameters
dragdata (dragdata)
A dragdata object containing the state of values connected to the mouse cursor as part of a drag and drop operation.
onHotkeyActivated
handler function onHotkeyActivated( draginfo )
The functions registered on this handler will be called whenever a hot key bar slot is activated. This allows the processing of custom drag types and context specific special operation.
Parameters
draginfo (dragdata)
The dragdata object representing the contents of the activated hot key bar slot
The first entry references when a hotkey is pressed and the second when a slot is activated. They also pass two different types of data (dragdata & draginfo).
Problem 2. I have a sample ext that I wrote using the above functions:
function onInit()
if ChatManager then
--ChatManager.registerSlashHandler("/KeyDmp", KeyDmp);
print ("ETUtility Loaded")
end
end
function onHotKeyActivated( myData )
print("ETUtility Hotkey Pressed")
print(myData)
ChatManager.addMessage(myData)
return true;
end
function onHotKeyDrop( myData )
print("ETUtility Hotkey Dropped")
print(myData)
ChatManager.addMessage(myData)
return true;
end
function onHotkeyActivated( myData )
print("ETUtility Hotkey Activated")
print(myData)
ChatManager.addMessage(myData)
return true;
end
I know that the ext is being loaded because the "ETUtility Loaded" message (from the onInit function) appears on the console. Whenever I use the hotkeys, nothing appears on the console.
Is there something I am missing?