I have a drop dialog form and I need to pass an object into it from the caller form. To set parmObject, I usually use an override of clicked() similar to this:
void clicked() { Args args = new Args(); args.caller(element); args.parmObject(someObject); args.record(someTable); this.menuFunction().run(args); }
It works well for normal menu item buttons, but not for drop dialogs, because MenuFunction.run() isn't aware of that I want to open the form as a drop dialog.
To solve this problem, I would need either to find a correct way of opening drop dialogs from code, or to set parmObject() without overriding clicked() of the DropDialogButton.
I will be surprised if it can be done, but if it is, it will be useful to learn.
I surely can use a workaround, such as exposing the object by a method on the caller form, but the resulting form is uglier and more tightly coupled with a particular caller form than if I just get an object and check its type.
*This post is locked for comments