You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A SpApplication is a class that handles many aspects of a Spec Application (hence it's name) in a convenient fashion.
40
-
SpApplication handles your application initialisation, configuration and resources. It also keeps the windows you have currently opened.
41
-
## Initialisation
42
-
Initialisation of an application includes (non mandatory): configure the backend you want to use, add useful resources and define a start method that will call your initial window.
39
+
A SpApplication is a class that handles many aspects of an Spec Application (hence it's name) in a convenient fashion.
40
+
SpApplication handles your application initialization, configuration and resources. It also keeps the windows you have currently opened.
41
+
## Initialization
42
+
Initialization of an application includes (non mandatory): configure the backend you want to use, add useful resources and define a start method that will call your initial window.
43
43
### Configure backend
44
44
Spec2 includes several backends (for the moment, Morphic and Gtk). A SpApplication configures a Morphic backend by default, but you can change it using `#useBackend:` or `#useBackend:with:` and sending the backend identifier and optionally a configuration (you may want to do specific backend things to configure your application behavior).
45
45
@@ -56,7 +56,7 @@ app run
56
56
57
57
see also: [SpApplicationConfiguration](#SpApplicationConfiguration)
58
58
### Add resources
59
-
During initialisation, you may want to add special resources (like icons, themes, etc.).
59
+
During initialization, you may want to add special resources (like icons, themes, etc.).
60
60
While you can add your own way to access resources, SpApplication provides a property registration mechanism (a simple Dictionary and accessors), you may find useful to search at `accessing properties` protocol.
61
61
### Defining a start method.
62
62
This is useful to give your application a starting window (in general, this is what you want).
@@ -69,7 +69,7 @@ MyApplication>>start
69
69
70
70
# Application Configurations
71
71
72
-
Tipically, each Spec application will implement one or several configurations (for example, to run on Morphic or Gtk) by extending this class or one of its children.
72
+
Typically, each Spec application will implement one or several configurations (for example, to run on Morphic or Gtk) by extending this class or one of its children.
73
73
A configuration takes the responsibility to prepare an application to run properly. This preparation can be different depending on the platform where it is running, that's why you have several extension points you can extend/override:
74
74
75
75
-`configure:` a generic configuration point that normally will dispatch the configuration to a plarform specific method.
@@ -79,7 +79,7 @@ A configuration takes the responsibility to prepare an application to run proper
79
79
see also: [SpMorphicConfiguration](#SpMorphicConfiguration), [SpGtkConfiguration](#SpGtkConfiguration)
80
80
# Morphic configurations
81
81
82
-
Morphic configurations will prepare your application to run in a Morphic backend. Tipically, you will not change much of what is already provided on a Pharo system, but there are several entry points you may want to extend/override:
82
+
Morphic configurations will prepare your application to run in a Morphic backend. Typically, you will not change much of what is already provided on a Pharo system, but there are several entry points you may want to extend/override:
As a more complex example, see [SpStyle class>>#createDefaultStyleSheet](#SpStyle class_createDefaultStyleSheet) who defines the default behaviour of all elements of a Morphic Spec backend.
111
+
As a more complex example, see [SpStyle class>>#createDefaultStyleSheet](#SpStyle class_createDefaultStyleSheet) which defines the default behaviour of all elements of a Morphic Spec backend.
112
112
## Referencing style elements in your presenters
113
113
You can add styles to your presenters easily by using [class:SpAbstractWidgetPresenter](>#addStyle:)
0 commit comments