sendMessageToAllInstances doesn't send message to other layersets
  • geoffmatters
    activ8 member
    Posts: 79
    Joined: Fri Sep 29, 2017 3:29 am

    sendMessageToAllInstances doesn't send message to other layersets

    by geoffmatters » Sun May 26, 2019 10:18 am

    The manual says

    "If you want to synchronize a keyword or share information between all layers from all layer sets, you have to talk to every instance of the current module. The “module.sendMessageToAllInstances(message,param)” function is the solution to send a message with parameters to every layer of the current project."

    elsewhere it says

    "To send a message to all layers in all layersets, use the “sendMessageToAllInstances()” function instead."

    However, sendMessageToAllInstances doesn't send messages to instances in other layersets. This makes synchronization unreliable.

    Repro: a module which sends a message to all instances on init and prints when that message is received. Start a new project and create a few layers in layerset 1. Switch group A to layerset 2. See the "new" instance for layerset 2 layer 1 send the message, but the only receiving print is from layerset 2 layer 1, not from any of the layerset 1 layers.

    Is sendMessageToAllInstances supposed to send to all layers in all layersets as the manual claims?

Who is online

Users browsing this forum: No registered users and 8 guests