KB keys in dialog causing C4D crash?!



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/03/2005 at 11:54, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.012 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    This is complicated, so bear with me.

    There is a CommandPlugin which launches a GeDialog. The dialog has a GeUserArea. Both respond to keyboard input, but the GeUserArea just passes keyboard input to the parent dialog for processing there. Everything works fine at this stage.

    Now, my Shader is added to a Material. When the "Edit" button is pressed the shader sets up editing in the GeDialog above. Now, if I hit certain keys (e.g.: Home, Page Up) within the GeDialog, the plugin either acts weirdly ('H' creates two nodes for unknown reasons) or crashes C4D. I'm not responding to these keys whatsoever (I was responding to 'Home', but since the crashing started 'Shift+H' avoids the crashing - also note that the same functionality applied using the button or menu actions works as intended).

    My only guess is not only are the keys being passed to GeDialog::Message() but maybe to GeDialog::Command() or GeDialog::CoreMessage(). Or there is something that needs to be done for unhandled key-strokes to pass them on propery or not at all?

    Help! :)

    Thanks,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/03/2005 at 20:36, xxxxxxxx wrote:

    Ah, yes. Debuggers? What are they good for?

    My Holmian instinct was right on the money. GeDialog::Command() receives a msg with id=12508 which is identified in the c4d_symbols.coh (of all places) as:

    IDM_JUMPHOME     = 12508,

    Now, how does one get around this long stack of IDM_XXXs defined in this file which have no place causing my plugin to crash? I take it that I need to absorb them in my GeDialog::Command() to avoid further disaster?

    Thanks,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/03/2005 at 13:16, xxxxxxxx wrote:

    It sounds a bit weird. Normally you would just pass any messages you don't handle along to the parent class and they would be absorbed there if they don't belong to your dialog. It should be possible to place breakpoints in GeDialog as well afaics, since the source is there in the API.


Log in to reply