Changes between Version 31 and Version 32 of Tutorials/DevelopingAndDeployingAnApplication
- Timestamp:
- Apr 27, 2018, 9:14:57 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/DevelopingAndDeployingAnApplication
v31 v32 11 11 First you need to make sure you're able to compile ''Smalltalk/X jv-branch'' as such. 12 12 13 Make 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''.13 Make 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''. 14 14 15 15 In order to build the complete environment you should follow the steps described in the [[Documentation/BuildingStXWithRakefiles|Building Smalltalk/X jv-branch]] section. … … 27 27 This may take some time. It depends you your CPU, internet connecting, etc. 28 28 29 (note: Be aware that you may experience difficulties conne ting to some of the sources in heavy firewalledenvironments.)29 (note: Be aware that you may experience difficulties connecting to some of the sources in heavy firewall(ed) environments.) 30 30 31 31 == Step 2: Creating a Repository for Application Code == … … 34 34 35 35 Smalltalk/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 availab e 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.) 37 37 38 38 First, 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: … … 53 53 Before we start writing the code Mercurial needs to be configured: 54 54 55 * Setup the path for the Mercurial+ ex acutable55 * Setup the path for the Mercurial+ executable 56 56 57 57 [[Image(settings_mercurial.png)]] … … 65 65 [[Image(module_settings.png)]] 66 66 67 * To verify you have Me curial+ 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}}} 68 68 69 69 Now it's time to write some code. Basically you need to create at least three classes: … … 87 87 * 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. 88 88 * 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 sta tup 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 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 method89 * 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 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 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 92 92 {{{HelloWorld0>>closeDownViews}}} call {{{Smalltalk exitIfStandalone: 0}}}: 93 93 … … 118 118 119 119 120 == Step 5: Commit ing Code ==120 == Step 5: Committing Code == 121 121 122 122 To 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'':