[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Defining class only if not defined?



Hi all,

Is there a way to write an extension that defines a class only if it
hasn't been previously defined?

As part of a larger framework I'm building, I'm trying to start up a
sclang instance with a yaml configuration set to include an custom
extension I wrote. However, if the user already has that extension in
their extensions directory, this causes the library not to compile
successfully, due to a duplicate class definition.

Is there a way, before defining a class, to check whether it's already
defined, and if so skip it?

I hope this question makes sense. I can explain more about my use case
if needed, but I didn't want to go into unnecessary detail.

Thanks!

Marc

-- 
Marc Evanstein (formerly Evans)
UC Santa Barbara PhD '19, Music Composition; MS '19, Media Arts and Technology
Stanford BA '10, Music; MA '11, Music, Science and Technology
www.marcevanstein.com

null