CommandData trigger from GeDialog



  • Hi,
    A GeUserArea can trigger its parent GeDialog via a SendParentMessage which needs to be handled in GeDialog::Command.
    Is there something similar to let a GeDialog trigger its parent CommandData?
    Or is the only way to go via CallCommand?



  • Hi,

    I have some trouble understanding your question. A GeDialog can be in a child relation to another GeDialog, but not to a CommandData node (at least out of the box). So I am uncertain if you actually meant CommandData, the plugin node type, or misspoke and meant Command, the method of GeDialog, and thereby were referring to hierarchically linked dialogs.

    1. CommandData::Execute: Since such a plugin can have a dialog, but does not have to, I am also a bit confused about the question here. I assume you are aware that you could store a reference to the instantiating CommandData node in your GeDialog and then invoke CommandData::Execute on your plugin node yourself. The call only takes a document, so not too hard to emulate. CallCommand would be probably easier, but might have some unwanted overhead.
    2. GeDialog::Command: Also a bit confused here. Isn't it already the case, that messages are being propagated through hierarchically linked dialogs? Can't test it right now, but I would have sworn that this is the case.

    Cheers,
    zipit



  • Yes I meant CommandData.
    I know not every CommandData does need to have a GeDialog, but if a GeDialog exists it usually has a CommandData as "parent", hence the wording I used.

    And no I don't want to invoke CommandData::Execute (nor ExecuteSubID etc ...). That is why I was wondering if there was another way than going via CallCommand, as this triggers the Execute/ExecuteSubID.



  • @C4DS said in CommandData trigger from GeDialog:

    And no I don't want to invoke CommandData::Execute (nor ExecuteSubID etc ...)

    Hm, I might be extra slow today, but what were you then referring to with "trigger its parent CommandData" in your original posting - if it wasn't CommandData::Execute? Or do you want the node to be executed, but just do not want to invoke the execution yourself?

    But long story short, I am not aware of any builtin references to a hosted dialog in a CommandData node, so one is not aware of the other out of the box.

    Cheers,
    zipit



  • Hi,

    thanks @zipit once again :)

    I'm also a bit confused on what you are trying to do.
    As @zipit said, you could have a pointer to your command in your Dialog and call what ever you want.

    If you really need one function you added in your CommandData you can think about making it static. Or redesign your functions.

    Cheers,
    Manuel

    .



  • Nevermind. Trying to explain will probably lead us too far. I was only wondering if messaging was possible between a CommandData and its GeDialog.