Ah sorry Will, I misread your question. I am afraid that there is no built-in way in ChucK to check what is the super-class of an object.
However, you could take a look at this earlier discussion which discusses the same problem: https://lists.cs.princeton.edu/pipermail/chuck-users/2013-January/007223.html best, Casper > On 31 okt. 2014, at 17:09, Casper Schipper <[email protected]> wrote: > > Try .toString(): it's the closest thing. > > SinOsc foo; > Object bar; > > class MyClass { > float value; > } > > MyClass myInstance; > > <<<foo.toString()>>>; > <<<bar.toString()>>>; > <<<myInstance.toString()>>>; > > > "SinOsc:10061d9a0" : (string) > "Object:61000009e190" : (string) > "MyClass:61000009e140" : (string) > > Best, > Casper > > >> >> 1. Instanceof in ChucK (Will Hardwick-Smith) >> >> From: Will Hardwick-Smith <[email protected] >> <mailto:[email protected]>> >> To: [email protected] >> <mailto:[email protected]> >> Date: 30 oktober 2014 23:34:57 CET >> Reply-To: ChucK Users Mailing List <[email protected] >> <mailto:[email protected]>> >> Subject: [chuck-users] Instanceof in ChucK >> >> >> Say I have Object o, and I want to see if it is an instance of UGen or a >> sub-class of UGen. >> Is there a way to check this in ChucK? >> >> >> _______________________________________________ >> chuck-users mailing list >> [email protected] >> <mailto:[email protected]> >> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users >
_______________________________________________ chuck-users mailing list [email protected] https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
