PA_UpdateEditMenu is not working in 4D 16R6, while it seems to work fine in 4D v16. Edit menu items are not updated and they stay dimmed.
From Patrick Poly in reply to ACI0088877: PA_UpdateEditMenu does nothing in 4D v14:
Here is a work arround that will works with every version of 4D.
Since v11 during eAE_UpdateEditCommands event, you can return the edit menu status in event->fWhen (i don’t think it has been documented)
Instead of using PA_UpdateEditMenu use the following code
void PA_ReturnEditCommandStatus(PA_PluginParameters params, char undo, char redo, char cut, char copy, char paste, char clear, char selectAll)
PA_Event* ev = ((PA_Event**) params->fParameters);
if (ev->fWhat == eAE_UpdateEditCommands)
long status = 0;
if (undo) status |= 1; if (redo) status |= 2; if (cut) status |= 4; if (copy) status |= 8; if (paste) status |= 16; if (clear) status |= 32; if (selectAll) status |= 64; ev->fWhen = status; }
Trie that, and ichanged works with 4D16, but not 64 bit 4D 16R6 .