/* returns a new *Object of the class named by 'klass' (Wrapper around NewInstance(types.NewName(...))) */ func (self *Environment) NewInstanceStr(klass string, params ...interface{}) (obj *Object, err error) { class, err := self.GetClass(types.NewName(klass)) if err != nil { return } return self.NewInstance(class, params...) }
/* returns the (potentially cached) types.Name of the class. */ func (self *Class) GetName(env *Environment) (name types.Name, err error) { //log.Printf("Name(miss)") var cstr string cstr, _, err = self.CallString(env, false, "getName") if err == nil { name = types.NewName(cstr) } return }
// Wrapper around GetClass(types.NewName(...)) func (self *Environment) GetClassStr(klass string) (c *Class, err error) { class := types.NewName(klass) return self.GetClass(class) }