I'm new to both Ace2 and Dewdrop (have coded some small addons before, ex a rogue stunlock timer). I'm trying to write an addon that is a replacement for the pet bar - it has an icon on the minimap with a menu that will include a menu for pet behavior (Stay/Follow, Aggressive/Defensive/Passive) and for auto-cast abilities (Growl/Lightning Breath, that sort of thing). Basically a pet control menu.
Anyways, I got to the point of the project where I needed to start implementing the actual pet commands (IE what to do when the player clicks Growl off).
but I got an error from the UI, saying that doing this was blocked. I read that you needed to use secure frames in order to cast now, and I searched these forums looking for a way to do this with dewdrop - the topic announcing dewdrop supported secure frames had a link to a broken anchor (although the page exists, the info that might have shown how to do this is gone).
Is it at all possible to run commands like PetAttack()/TogglePetAutocast(5) using a dewdrop menu line?
You need to create a SecureAnchorButtonTemplate to handle the mouse clicks for the menu, SecureStateHeaderTemplate to say what to do with the clicks (opening and closing the menu), then create entries of SecureActionButtonTemplate with attributes that deal with what you want to do (ie, same things that the pet bar buttons do).
Basically, you're creating a popup action bar that works from a mouse click. Read through the SecureStateDriver.lua and SecureStateHeader.lua comments for most of the documentation for the stuff. It's not light reading, but will give you an idea. There's also some examples on the forums.