Closed pmmf85 closed 11 years ago
This function is used by various games, so I'm not sure why you're getting the error.
Can you give some minimal example code that makes the error happen (i.e. don't copy and paste your whole game, remove as much as possible while still having the error happen)?
Steps to reproduce:
undum.game.situations = {
start: new undum.SimpleSituation(
"Some content", { heading : "test" }
)
}
I see in undum.js that this part of code is responsible for it (164 line):
if (this.heading) {
if ($.isFunction(this.heading)) {
system.writeHeading(this.heading());
} else {
system.writeHeading(this.heading);
}
}
But system.writeHeading is not declared anywhere and that is causing an error.
Brilliant, thanks, that makes it much clearer. I'll have a look.
Right, that was very odd. Apparently writeHeading didn't exist at all. Which is very odd, because I was sure it was being used in other places.
Anyway, I've added it now, and committed. The steps to reproduce above now work fine for me. Feel free to reopen this if it doesn't work for you.
Sorry about that.
Hello
I think there is no writeHeading method definition in system object when creating new situation.
When I try to create new SimpleSituation object with heading property defined it generates error code in console:
Uncaught TypeError: Object [object Object] has no method 'writeHeading' undum.js:169