From the control pallet, I drug a General Object to my WebDialog, gave it a class of SMTPSocket. When attempting running my WebApp, I get a compile error:
SendEmailDialog.SMTP.Name Layout (property name) :
Parameters are not compatible with this function: Name.
Any ideas what’s up? I tried several other objects, even a generic Object, all the same error.
It a bug or “shortcoming” in Xojo currently. You can’t place objects not derived from WebControl onto a WebDialog (see https://forum.xojo.com/1531-parameters-are-not-compatible-with-this-function-error). You must add it to the parent page or add it as a property and configure/instantiate it in code.
Jay, thanks! At least I know I’m not crazy.
I imagine for SMTPSocket you could create an instance at runtime. Either create a subclass and implement your event handlers there, or use AddHandler on a regular SMTPSocket.
Thanks. I wound up instantiating at runtime and used AddHandler. Works great, just would be nice to have it work by dragging and dropping.