Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Character count



Hi (again)

I can see that the "Image with String" has an output called "Character count". Some of the strings that passes through that patch are over 36 characters long, which I do not want. So I need to find a way to set a "max char count", and if that max-limit has been hit perhaps replace character 37 and over with "..."

Real world scenario: My Viz will show the song name. When the song name is too long it will place itself over/under places I do not want.

How would you guys do this? Javascript? Some cool patches I have not found? =)
Here is the javascript which precedes the "Image with String". Perhaps work in some magic there?


/*
Convert some of the Track Info which is contained in a structure into a formatted string.
*/
function (__string outputString) main (__structure inputStructure) {
var result = new Object();
var str = "";

if (inputStructure != null) {
if (inputStructure.name != null) str += inputStructure.name;

}


	result.outputString = str;
	return result;
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.