[Pharo-project] initialize
OK, So, I'm writing a class and I have an initialize method. Well, I have two, actually, a class initialize and an instance initialize. And when I save it, the Nautilus browser shows it with a red flag in the gutter next to the instance method "initialize". And sure enough, instead of being called when I crate a new instance, the superclass' initialize is called instead. I can't figure it out. I have other classes that are virtually identical, structurally and they don't have the problem. So I remove the instance initialize method and then paste it back in. Red flag is gone, instance initialize is now being called. And instead of the red flag I get a green override arrow. What happened? ===Blake===
Probably a problem with the icon cache. When it happens try to close the browser and to reopen it. You can also use the DEBUG menu to flush the cache. I have experienced such bugs from time to time, but with no clear way to reproduce it :s Thanks for your feedback :) Ben On Apr 25, 2012, at 6:34 PM, blake wrote:
OK,
So, I'm writing a class and I have an initialize method. Well, I have two, actually, a class initialize and an instance initialize. And when I save it, the Nautilus browser shows it with a red flag in the gutter next to the instance method "initialize".
And sure enough, instead of being called when I crate a new instance, the superclass' initialize is called instead. I can't figure it out. I have other classes that are virtually identical, structurally and they don't have the problem.
So I remove the instance initialize method and then paste it back in. Red flag is gone, instance initialize is now being called. And instead of the red flag I get a green override arrow.
What happened?
===Blake===
Probably a problem with the icon cache.
Well, the icon was correct. I mean, to the extent it was warning me that my routine wasn't going to be called, it was correct. I stepped through it many times trying to figure it out. So, I think Nautilus was right. What I don't get it is how the descendent method wasn't called.
When it happens try to close the browser and to reopen it. You can also use the DEBUG menu to flush the cache.
I'll try that next time, thanks. ===Blake===
participants (2)
-
Benjamin -
blake