function: distinguish between listdump and mousereport

    Jun 16 2014 | 9:28 pm
    Hello! I use a function object in curve mode and use the listdump message a lot. Now I want to implement a new feature and I need to use the mousereport message. The problem is that both messages output to the same outlet without any message prepended and I don't know how to tell them apart.
    Looking at the list's length can't tell the difference between mousereport's output and listdump's output when there is only one point in the object.
    I managed to solve the problem using regular expressions to observe if the last number of the list is an integer or a float, but I'd like to know if there is a simpler way to solve this.
    Any ideas or suggestions are welcome! :)

    • Jun 17 2014 | 9:18 am
      You can check the length of the list:
    • Jun 17 2014 | 4:49 pm
      Your solution only works when in linear mode. My function object works in curve mode, and as I mentioned on my first post, your patch doesn't distinguish correctly between the output of mousereport and listdump when there is only one point in the function object.
      Thank you for your reply, though.
    • Jun 18 2014 | 9:52 am
      I missed the curve mode thing… well you can use listdump argument?
    • Jun 18 2014 | 11:24 am
      I totally missed that! It will do the trick.
      Thank you very much! :)