When you first start using mel, you have to look this up every time. Then it becomes natural. Then it gets old. Now, I get a weird sense of enjoyment. It's one of the few things in mel where I don't have to use my brain. At all.
i'd probably type it like this..
for($n in selectedNodes){
}
and call it a day
well i would do
for($item in ls -sl -dep){
}
that takes about 5-8 second ($ and is a bit tedious on my keyboard as $ requires alt-gr and is 2 key metasequance).
Anyay i have a proc in in tat resembes executeForEachObject for when i do this ad hoc
or
for($n in ls -sl){}
I was kindof waiting for you to come to that conclusion
But yes when i code code i have a snippet in place for all the standard for loops because i program with visual studio so its actually very fast. So i dont actualy type them very often
lol brevity is the essence of wit, they say. you guys rock. And I knew entering that poll that my chances of being owned were pretty high.
I smell the passion for optimization of Amiga coders...
Since we're into that, another question:
this sucks:
string $schedulers[] = listConnections -type clipScheduler $char1;
string $scheduler = $schedulers[0];
clear $schedulers;
bc I know there will only be one scheduler, but I have to declare an array anyway bc of listConnections, and then trash it.
Can this be made simpler?
yes make a proc that looks like this.
CODE
proc string getStr0(string $str[]){
return $str[0];
}
then its just
CODE
string $scheduler = getStr0(listConnections -type clipScheduler $char1);