View Single Post
02/20/17, 09:13 PM   #10
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Originally Posted by Noobanidus View Post
I'm not sure where I got the original code (potentially the concept came from MasterMerchant), but I've noticed the usual "cannot use E to remove items from bank" issue commonly associated with this after creating an addon which adds an option to the context menu.

It uses ZO_PreHook against ZO_InventorySlot_ShowContextMenu with a lambda that then calls my custom function, which uses a zo_callLater to call AddMenuItem and ShowMenu after 50ms.

I can't recall if this is the correct & safe way to do things. Does anyone have any reference for the safest method of doing this?

Alternatively, the increase in insecure code error could be unrelated, but I just want to make sure.
Without seeing code, the only suggestion I have is to use LibCustomMenu rather than using AddMenuItem directly.
  Reply With Quote