wixUser.register (fails): Should a constructor be responsible for casting the objects value in a library?

… how do you post executable examples?