Hi, Im looking for an object - if it exists - that can tell me the number of characters in a message. I need to set a limit to the number to as Im using it for type in GEM. I want to stop the text when the line gets too long.
Any clues?
Thanks, Timon.
On Tue, 18 Oct 2005, timon wrote:
Im looking for an object - if it exists - that can tell me the number of characters in a message. I need to set a limit to the number to as Im using it for type in GEM. I want to stop the text when the line gets too long. Any clues?
| [any2symbol] | [#import per_message] | [#dim] | [#export] |
but then that requires two more libraries (zexy+gf)... i can't think of anything simpler for now.
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montréal QC Canada
Hallo, Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
On Tue, 18 Oct 2005, timon wrote:
Im looking for an object - if it exists - that can tell me the number of characters in a message. I need to set a limit to the number to as Im using it for type in GEM. I want to stop the text when the line gets too long. Any clues?
| [any2symbol] | [#import per_message] | [#dim] | [#export] |
but then that requires two more libraries (zexy+gf)... i can't think of anything simpler for now.
Attached version only requires zexy's s2l (and [list] of pd-0.39), but it only deals with one symbol. To get the length of more, just serialize the whole list as done in [pd drip] later.
Frank Barknecht _ ______footils.org_ __goto10.org__
hi frank,
Attached version only requires zexy's s2l (and [list] of pd-0.39), but
Does this object have some added magic compared to the old fashioned lister? I remember that I couldn't get your gem-patch to work - the was something like list prepend, which I've never seen before ... looks like you're doing some sort of string processing.
with kind regards, thoralf.
___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Hallo, Thoralf Schulze hat gesagt: // Thoralf Schulze wrote:
hi frank,
Attached version only requires zexy's s2l (and [list] of pd-0.39), but
Does this object have some added magic compared to the old fashioned lister? I remember that I couldn't get your gem-patch to work - the was something like list prepend, which I've never seen before ... looks like you're doing some sort of string processing.
[list] has lots of magic. It's the best builtin to happen to Pd since, say, 1.5 years. Everyone should upgrade to 0.39 just for [list].
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, carmen hat gesagt: // carmen wrote:
[list] has lots of magic. It's the best builtin to happen to Pd since, say, 1.5 years. Everyone should upgrade to 0.39 just for [list].
is there a way to [prepend] without using 2 objects instead of one?
Well, what about an abstraction?
To mimic Max/Cyclone [prepend] as in "list a b c" ==> [prepend set] ==> "set a b c" you need to use [list trim] afterwards.
However to convert "a b c" to "list set a b c" you only need one [list prepend set], whereas to get a "list"-list out of Max-[prepend] requires a conversion using a second object (like [list]).
See attached patch for an example. Either way you look at it: In one case, you always need two objects, unless list-semantics totally change.
Frank Barknecht _ ______footils.org_ __goto10.org__
what exactly do you mean?
You can for example:
[1 2 original( | [list prepend newitem] | [print]
which will print you 'newitem 1 2 original'.
If you have 0.39 then you also have in-depth help patches ;-)
Best Urs
carmen schrieb:
[list] has lots of magic. It's the best builtin to happen to Pd since, say, 1.5 years. Everyone should upgrade to 0.39 just for [list].
is there a way to [prepend] without using 2 objects instead of one?
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, Urs Liska hat gesagt: // Urs Liska wrote:
what exactly do you mean?
You can for example:
[1 2 original( | [list prepend newitem] | [print]
which will print you 'newitem 1 2 original'.
Well, not quite: [print] doesn't print the full list, which actually is: "list newitem 1 2 original". To remove the first "list" you need to use [list trim] or [route list]. This makes a difference e.g. if "newitem" is a method name, like for example "set" is a method of message objects. See the patch I posted for the difference in behaviour. I think, it also is explained in list-help.pd.
Frank Barknecht _ ______footils.org_ __goto10.org__