Recieving CoreMessage several times
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/06/2004 at 05:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.207
Platform: Windows ;
Language(s) : C++ ;---------
i defined some messages using own plug-in IDs and send them with SpecialEventAdd(PLUGINID) to notify another plug-in that some-work is to do.
now i have the problem, that a message which was send only once (i checked this) will be recieved by the recieving plug-in three times.Bool Plugin::CoreMessage(LONG id, const BaseContainer& msg) { switch (id) { case GRADIMSG_RM_TREE_SAVED: { doanything(); } break;
that makes my recieving plug-in won't work correctly because it starts a function three times instead of one time.
what does multiply the message and how can i avoid that.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/06/2004 at 05:53, xxxxxxxx wrote:
I don't know. One workaround would be to have something you increment in the message container, so that duplicates can be ignored.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/06/2004 at 06:04, xxxxxxxx wrote:
how should i increment in the container.
imagine:
i send a message once and get it three times. so i will get three times the same container.
but unfortunately before recieving the message my function will be called the first time. then it starts again.i tried to increment a value after recieving a message and want to avoid calling the function if the message arrived second (or more) time. but where should i reset my value to get the function free for the next time i want to call it by myself.
seems to get tricky...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/06/2004 at 07:07, xxxxxxxx wrote:
it's not necessary to do any tricks.
the undocumented function CheckCoreMessage(msg)
solved the problem.