Early access update: PR #13

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Early access update: PR #13

GLASS mailing list


On Thu, Nov 5, 2015 at 12:11 PM, Dale Henrichs <[hidden email]> wrote:
Jon,

I would like you to check the source in MetacelloToolBox>>baselineNamed:. It should look like the following:

baselineNamed: baseName
  | baselineName |
  "Check if the class does not exist"
  baselineName := self baselineNameFrom: baseName.
  (Smalltalk includesKey: baselineName asSymbol)
    ifFalse: [
      "Create the configuration class"
      self ensureMetacello.
      BaselineOf
        subclass: baselineName asSymbol
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: baselineName.
      MetacelloPlatform current registerPackageNamed: baselineName.
      (MetacelloPlatform current globalNamed: baselineName asSymbol)
        compile: 'baseline: spec <baseline>'
        classified: 'baseline'    "a bit of a hack here to create an initial null basline method" ].
  project := (MetacelloPlatform current globalNamed: baselineName asSymbol)
    project

Note the #compile:classified: method when the class is being created ... if you don't have that code in you image, then you haven't updated to the latest version of Metacello:
the #compile:classified: method is indeed missing
 

  updateGsDevKit -s

and then in the tODE shell of your stone:

  project load Tode
so I ran the commands, and they both ran without errors

i noticed my copy was a bit behind the times:
   Updating GsDevKit_home
>>>>>>
Already on 'master'
Your branch is ahead of 'origin/master' by 58 commits.

 

which should refresh tODE as well as the Metacello and GLASS1 (see the "Update Script for Client/Server and Server" section of the EA #15[1]).

If you have that code, then it's back to the drawing board ... BTW I'm bullet-proofing the `project new` command and adding a --force option that should do some self cleaning in the event of errors ...
running project new works "better" - but this time I got an error message back from git because user & email were not set.

So I fixed that, manually removed the project, re-ran "project new" and now I appear to have a working project.

....but even after reading the pdf doc on metacello from the pharo book -- I dont know how to add stuff to the project.  It seems I need a ConfiigurationOf<myProject> class to be created somewhere... or I need to know how to edit the #baseline: method to add existing categories.

I have an existing category named 'Route-Events' with 4 classes.

So I changed the #baseline: method from
baseline: spec
    <baseline>
    spec for: #'common' do: [
        spec package: 'RouteEvent-Core'.
    ].


to:
baseline: spec
    <baseline>
    spec for: #'common' do: [
        spec package: 'RouteEvent-Core';
            package: 'Route-Events' with: [ spec requires: #( 'RouteEvent-Core')].

        spec group: 'default' with: #('RouteEvent-Core' 'Route-Event')
    ].

then I tried refreshing and re-opening the project list window, but I cant get 'browse categories' or 'browse classes' from the project window to display the additional classes or the new category.

what am I missing here?

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Early access update: PR #13

GLASS mailing list


On 11/05/2015 01:46 PM, Jon Paynter wrote:


On Thu, Nov 5, 2015 at 12:11 PM, Dale Henrichs <[hidden email]> wrote:
Jon,

I would like you to check the source in MetacelloToolBox>>baselineNamed:. It should look like the following:

baselineNamed: baseName
  | baselineName |
  "Check if the class does not exist"
  baselineName := self baselineNameFrom: baseName.
  (Smalltalk includesKey: baselineName asSymbol)
    ifFalse: [
      "Create the configuration class"
      self ensureMetacello.
      BaselineOf
        subclass: baselineName asSymbol
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: baselineName.
      MetacelloPlatform current registerPackageNamed: baselineName.
      (MetacelloPlatform current globalNamed: baselineName asSymbol)
        compile: 'baseline: spec <baseline>'
        classified: 'baseline'    "a bit of a hack here to create an initial null basline method" ].
  project := (MetacelloPlatform current globalNamed: baselineName asSymbol)
    project

Note the #compile:classified: method when the class is being created ... if you don't have that code in you image, then you haven't updated to the latest version of Metacello:
the #compile:classified: method is indeed missing
 

  updateGsDevKit -s

and then in the tODE shell of your stone:

  project load Tode
so I ran the commands, and they both ran without errors

i noticed my copy was a bit behind the times:
   Updating GsDevKit_home
>>>>>>
Already on 'master'
Your branch is ahead of 'origin/master' by 58 commits.

 

which should refresh tODE as well as the Metacello and GLASS1 (see the "Update Script for Client/Server and Server" section of the EA #15[1]).

If you have that code, then it's back to the drawing board ... BTW I'm bullet-proofing the `project new` command and adding a --force option that should do some self cleaning in the event of errors ...
running project new works "better" - but this time I got an error message back from git because user & email were not set.

So I fixed that, manually removed the project, re-ran "project new" and now I appear to have a working project.
oh good ... the new version of `project new` is still under test along with a few other doc updates and minor bugfixes and I'll probably release another EA in a day or two.

....but even after reading the pdf doc on metacello from the pharo book -- I dont know how to add stuff to the project.  It seems I need a ConfiigurationOf<myProject> class to be created somewhere... or I need to know how to edit the #baseline: method to add existing categories.

I have an existing category named 'Route-Events' with 4 classes.

So I changed the #baseline: method from
baseline: spec
    <baseline>
    spec for: #'common' do: [
        spec package: 'RouteEvent-Core'.
    ].

Move the 4 classes to the RouteEvent-Core (use the "Class > move to package" menu item) to put the classes into the RouteEvent-Core package ... at this level it is more about learning the basics of Monticello than Metacello ...

to:
baseline: spec
    <baseline>
    spec for: #'common' do: [
        spec package: 'RouteEvent-Core';
            package: 'Route-Events' with: [ spec requires: #( 'RouteEvent-Core')].

        spec group: 'default' with: #('RouteEvent-Core' 'Route-Event')
    ].
This is an alternate approach ... although you do need to create the package Route-Event:

  mc create Route-Event

will create the package and then the project list menu items should start working

I think this should get you going ...

Dale

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Early access update: PR #13

GLASS mailing list


On Thu, Nov 5, 2015 at 3:14 PM, Dale Henrichs <[hidden email]> wrote:


This is an alternate approach ... although you do need to create the package Route-Event:

  mc create Route-Event

will create the package and then the project list menu items should start working

I think this should get you going ...

Dale
That worked nicely -- thanks much


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
12