Search code examples
amber-smalltalk

How do I add a new package?


How do I add a new package in the current IDE?

I do not see a button for adding a package.

This is on MSWindows 7 with Firefox 23.

To start the amber server I had opened a command window and then I navigated to the amber directory.

 C:\Users\User\Documents\amber-master>bin\amber serve
 Starting file server on http://127.0.0.1:4000 

Solution

  • To create a new class in a new package add the following code snippet in the browser

        Object subclass: #MyClass
        instanceVariableNames: ''
        package: 'MyPackage'
    

    and hit save. This works in the very latest amber. Not in the one two weeks before. https://github.com/amber-smalltalk/amber

    5th September 2013

    Addition

    The new packages created will be in the amber namespace which is not recommended. To have your own name space for your amber application use these instructions Writing my first amber app. It shows the directory layout to have your own name space.

    How to load amber shows how to configure amber to use your own namespace.