View Single Post
08/15/14, 11:55 AM   #12
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
As Baertram wrote you cannot set (well you can but it will cause error)
Lua Code:
  1. callback = function(dialog) RespondToDestroyRequest(false) end
... because that's a new anonymous function, ESO somehow knows it comes from and addon and doesn't allow it to call RespondToDestroyRequest. The funny thing is you can set
Lua Code:
  1. callback = ESO_Dialogs["DESTROY_ITEM_PROMPT"].buttons[1].callback
  2. -- if you want RespondToDestroyRequest(true)
  3.  
  4. callback = ESO_Dialogs["DESTROY_ITEM_PROMPT"].buttons[2].callback
  5. -- if you want RespondToDestroyRequest(false)
... these are their original callbacks, which are allowed and do call RespondToDestroyRequest (button 1 passes true, button 2 passes false)
  Reply With Quote