[CONNECT] set callback function when KEYIN queue element processed

I develop plugins for the OpenCities Map PowerView CONNECT Edition application with C++.

From one of my plugin I use the mdlInput_sendKeyin() function to trigger a feature in another plugin developed by me also. I want to log every keyin commands which was sent in the plugins.

In the MdlMain() function of each plugins I tried to use the StateCallback::SetKeyinFunction( onKeyInEvent ) function to set my callback function where I implemented the logic which do the logging related stuff.

Unfortunately my onKeyInEvent() function is never called.

How can I make this callback functionality working?

Parents
  • Hi Ferenc,

    isn't simpler to use command table at receiver side, and e.g. to parse key-in content inside the application?

    In my opinion a general rule (not only in MicroStation) is "callback is always wrong", in another words "use callbacks only when it's really necessary and no another solution is available".

    To use callback means that MicroStation has to add extra step for every key-in entered, whereas command tables are core MicroStation functionality.

    With regards,

      Jan

Reply
  • Hi Ferenc,

    isn't simpler to use command table at receiver side, and e.g. to parse key-in content inside the application?

    In my opinion a general rule (not only in MicroStation) is "callback is always wrong", in another words "use callbacks only when it's really necessary and no another solution is available".

    To use callback means that MicroStation has to add extra step for every key-in entered, whereas command tables are core MicroStation functionality.

    With regards,

      Jan

Children
No Data