The default instance of a class doesn't run its initialise method when Clear is pressed
e.g in this example
Pressing clear makes the instance blink out and automatically come back but it doesn't run its initialise method
If I add a delete block and run it - then when it is next created - it does run its the initialise method of course but I think it should do it on Clear as well
Default instance doesn't initialise using Clear button
Moderator: MSandro
Re: Default instance doesn't initialise using Clear button
The "clear" button actually doesn't make a new instance, it just deletes all but the currently selected instance. (The fact that the instance thumbnail momentarily disappears is just an artifact; the instance isn't actually deleted.) GP doesn't call initialize on the selected instance because that instance already exists.
To get a single initialized instance, hit the "+" to make a new instance, then "Clear" (to remove any uninitialized instances).
To get a single initialized instance, hit the "+" to make a new instance, then "Clear" (to remove any uninitialized instances).
Re: Default instance doesn't initialise using Clear button
I'll let that info sink in and mull the concept around in my head :)