Changes between Version 31 and Version 32 of Tutorials/DevelopingAndDeployingAnApplication


Ignore:
Timestamp:
Apr 27, 2018, 9:14:57 AM (6 years ago)
Author:
patrik.svestka@…
Comment:

adding information about the start-up method, improved spelling

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/DevelopingAndDeployingAnApplication

    v31 v32  
    1111First you need to make sure you're able to compile ''Smalltalk/X jv-branch'' as such.
    1212
    13 Make sure you have [[Documentation/BuildingStXWithRakefiles#SettingupaBuildEnvironment|installed a C compiler toolchain and version control tools]] as they are essential for compiling ''Smalltalk/X jv-branch''.
     13Make sure you have [[Documentation/BuildingStXWithRakefiles#SettingupaBuildEnvironment|installed a C compiler tool-chain and version control tools]] as they are essential for compiling ''Smalltalk/X jv-branch''.
    1414
    1515In order to build the complete environment you should follow the steps described in the [[Documentation/BuildingStXWithRakefiles|Building Smalltalk/X jv-branch]] section.
     
    2727This may take some time.  It depends you your CPU, internet connecting, etc.
    2828
    29 (note: Be aware that you may experience difficulties conneting to some of the sources in heavy firewalled environments.)
     29(note: Be aware that you may experience difficulties connecting to some of the sources in heavy firewall(ed) environments.)
    3030
    3131== Step 2: Creating a Repository for Application Code ==
     
    3434
    3535Smalltalk/X jv-branch comes with [[https://bitbucket.org/janvrany/stx-libscm|decent support for Mercurial]] so let's use it in this tutorial.
    36 (note: You may also use [[http://swing.fit.cvut.cz/projects/stx/doc/online/english/programming/sourcemanager_cvs.html|CVS]] but, believe me, you don't want to use it, especially, if far superior versioning system as Mercurial is availabe at your disposal.)
     36(note: You may also use [[http://swing.fit.cvut.cz/projects/stx/doc/online/english/programming/sourcemanager_cvs.html|CVS]] but, believe me, you don't want to use it, especially, if far superior versioning system as Mercurial is available at your disposal.)
    3737
    3838First, you need to decide to which (Smalltalk/X) package would code go. Let's say it should go to package named ''jv:demos/helloworld_0''.  Enter {{{demo0}}} subdir and create a new repository for it:
     
    5353Before we start writing the code Mercurial needs to be configured:
    5454
    55 * Setup the path for the Mercurial+ exacutable
     55* Setup the path for the Mercurial+ executable
    5656
    5757 [[Image(settings_mercurial.png​​)]]
     
    6565 [[Image(module_settings.png)]]
    6666
    67 * To verify you have Mecurial+ setup correctly print this: {{{AbstractSourceCodeManager  managerForPackage: Smalltalk package}}} => the result should be {{{HGSourceCodeManager}}}
     67* To verify you have Mercurial+ setup correctly print this: {{{AbstractSourceCodeManager  managerForPackage: Smalltalk package}}} => the result should be {{{HGSourceCodeManager}}}
    6868
    6969Now it's time to write some code. Basically you need to create at least three classes:
     
    8787* In the first dialog, choose ''GUI-Application'' as application type and fill in a package name - ''jv:demos/helloworld_0'' and click ''Create''. This would create an empty "application" package.
    8888* Next you'd be asked for an application class name. Fill in {{{HelloWorld0}}}. Once you click ''OK'' the wizard will create the class and generate some initial code. You may change the code later.
    89 * Next you'd be asked for a statup class name. Likewise, this will create an initial startup class and generate a default {{{main:}}} method that will open an application specified in previous step.
    90 
    91 Although most of the code has been generated, one little tweak may be needed. When user closes main application window either by clicking to ''X'' button in titlebar or picking an ''exit'' menu item, we'd like the whole application to terminate. This is not done automatically but it's easy to fix. All we need to is in method
     89* Next you'd be asked for a startup class name (the suggestion will be {{{HelloWorld0Start}}}). Likewise, this will create an initial startup class and generate a default {{{main:}}} method that will open an application specified in previous step.
     90
     91Although most of the code has been generated, one little tweak may be needed. When user closes main application window either by clicking to ''X'' button in title bar or picking an ''exit'' menu item, we'd like the whole application to terminate. This is not done automatically but it's easy to fix. All we need to is in method
    9292{{{HelloWorld0>>closeDownViews}}} call {{{Smalltalk exitIfStandalone: 0}}}:
    9393
     
    118118
    119119
    120 == Step 5: Commiting Code ==
     120== Step 5: Committing Code ==
    121121
    122122To commit the code to Mercurial repository, simply select the package in browser and pick ''Package'' ▷ ''Repository'' ▷ ''CheckIn...'' menu. Fill in a commit message and click ''Commit'':