[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] instance vars as array ?
Here is one way to do it (using Score as an example):
a = Score.new;
b = a.slotSize.collect({arg i; a.slotKey(i)})
Hope that helps.
Josh
On Mar 7, 2009, at 2:30 PM, Miguel Negrao wrote:
Miguel Negrao escreveu:
Is it possible to get the variables of an object as an array ?
Something like
MyClass {
var one,two,three
}
a = MyClass;
a.varsAsArray == [a.one,one.two,one.three] should give true.
thanks,
Sorry, typo, it was:
a.varsAsArray == [a.one,a.two,a.three] should give true.
--
Miguel Negrão // ZLB
http://www.friendlyvirus.org/artists/zlb/
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/
******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/
“Every composer – at all times and in all cases – gives his own
interpretation of how modern society is structured: whether actively
or passively, consciously or unconsciously, he makes choices in this
regard. He may be conservative or he may subject himself to continual
renewal; or he may strive for a revolutionary, historical or social
palingenesis." - Luigi Nono
*/
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/