Search code examples
smalltalkpharo

Pharo: menu error


I broke something in my Pharo image, but i don't know exactly what. Now when I try to file-out my package to insert in a new image, I only see 'Why you see this menu' and 'Debug'. If I run menu debug in the playground, I get a FallbackMenu. How can I fix this error?

EDIT: When I try to click on my package, The system browser is acting very weird an the following error pops up: link

Using Max's your code, i get 2 nil keys:

  • The first one is a mistake in my code (I assigned a class binding to nil instead of a instance variable with the same name). But I can't edit this because I can't access it through the System Browser.
  • The second one is ActiveEvent. I don't know where this comes from and whether this or the previous nil causes the System Browser to act weird

Solution

  • One possibility is that you nilled a class binding. Inspect the following to get a list of keys and values that are nil:

    Smalltalk globals associations select: [ :assoc |
        assoc value isNil or: [
            assoc key isNil ] ].
    

    BTW: rather then attaching a screen shot it would help if you attached the stack. To get the stack trace, right click on the topmost entry in the stack list (the one that's selected in your screen shot) and select "Copy to clipboard". Then paste the contents (or at least the first 30 frames) here.

    Update ActiveEvent seems normal. I have the same. The second one is very likely problematic. You may be able to cheat your way out by removing the entry:

    Smalltalk globals removeKey: nil.
    

    If done a quick try and it seems to work.