Data typing question

Dec 10, 2008 at 10:15pm

Data typing question

I’m building an abstraction that needs to handle a lot of different
data types, and as we know, if you need a trigger object for anything,
[t l l] will pass any data type through its outlets. The problem is
on the way out. You then cannot use something like [route int list],
because an integer, once it has passed through [t l l], is no longer
an integer, but a one-item long list. See example below:

– Pasted Max Patch, click to expand. –

It would be nice if there was something like an “anything” value you
could put in a trigger (hint hint), but as there isn’t, does anyone
have a handy trick for restoring things to their original data types
(list, int, float, symbol) after getting labeled a list, short of
brute force methods like counting the number of items, testing for
ASCII, and so on? Any ideas welcome.

Thanks all!

M

#41287
Dec 11, 2008 at 12:10am

I don’t understand your use of the trigger object.

What I often do is hang a route off of my inlets so that I can accept
various types, and do the right thing.

– Pasted Max Patch, click to expand. –

-C

#146913
Dec 11, 2008 at 9:40am

#146914
Dec 11, 2008 at 2:58pm

#146915

You must be logged in to reply to this topic.