Search
- Filter Results
- Location
- Classification
- Include attachments
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/09%3A_SUnit/9.07%3A_Advanced_Features_of_SUnitThe TestAsserter assertion protocol includes a number of methods that allow the programmer to supply a description of the assertion. The description is a String; if the test case fails, this string wi...The TestAsserter assertion protocol includes a number of methods that allow the programmer to supply a description of the assertion. The description is a String; if the test case fails, this string will be displayed by the test runner. However, the second one will report the value that the test is expecting: this makes easier to understand the failure. Sometimes in the middle of a development, you may want to skip a test instead of removing it or renaming it to prevent it from running.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/11%3A_Collections/11.07%3A_Chapter_SummaryThe basic iteration message is do:. It is useful for imperative code, such as modifying each element of a collection, or sending each element a message. Instead of using do:, it is more common to use ...The basic iteration message is do:. It is useful for imperative code, such as modifying each element of a collection, or sending each element a message. Instead of using do:, it is more common to use collect:, select:, reject:, includes:, inject:into: and other higher-level messages to process collections in a uniform way.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/09%3A_SUnit/9.11%3A_Chapter_summaryThen we gave an overview of the core of the SUnit framework by presenting the classes TestCase, TestResult, TestSuite and TestResources. Finally we looked deep inside SUnit by following the execution ...Then we gave an overview of the core of the SUnit framework by presenting the classes TestCase, TestResult, TestSuite and TestResources. Finally we looked deep inside SUnit by following the execution of a test and a test suite. Tests for a class called MyClass belong in a class named MyClassTest, which should be introduced as a subclass of TestCase.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/07%3A_Some_of_the_Key_Tools_of_the_Pharo_Environment/7.06%3A_Finding_MethodsThe Finder is one of several code search tools in Pharo to help you find methods by name (or even functionality). We’ve discussed it in some length in Chapter : A Quick Tour of Pharo.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/04%3A_Syntax_in_a_Nutshell/4.03%3A_Message_Sends2 raisedTo: 6 modulo: 10 sends the message consisting of the message selector raisedTo:modulo: and the arguments 6 and 10 to the object 2. Keyword message selectors consist of a series of alphanumeric...2 raisedTo: 6 modulo: 10 sends the message consisting of the message selector raisedTo:modulo: and the arguments 6 and 10 to the object 2. Keyword message selectors consist of a series of alphanumeric keywords, where each keyword starts with a lower-case letter and ends with a colon. A period separated sequence of expressions causes each expression in the series to be evaluated as a statement, one after the other.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/09%3A_SUnit/9.08%3A_Continuing_After_a_FailureSUnit also allows us to specify whether or not a test should continue after a failure. In this case, as soon as the test finds the first element of the collection that isn’t even, the test stops. aCol...SUnit also allows us to specify whether or not a test should continue after a failure. In this case, as soon as the test finds the first element of the collection that isn’t even, the test stops. aCollection do: [ :each | self assert: each even description: each printString, ' is not even' resumable: true ] All the other assertion methods that we have seen are not resumable by default; assert: p description: s is equivalent to assert: p description: s resumable: false.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/06%3A_The_Pharo_Object_Model/6.01%3A_The_Rules_of_the_ModelThe object model is based on a set of simple rules that are applied uniformly. The rules are as follows: Rule 1. Everything is an object. Rule 2. Every object is an instance of a class. Rule 3. Every ...The object model is based on a set of simple rules that are applied uniformly. The rules are as follows: Rule 1. Everything is an object. Rule 2. Every object is an instance of a class. Rule 3. Every class has a superclass. Rule 4. Everything happens by sending messages. Rule 5. Method lookup dynamically follows the inheritance chain. Let us look at each of these rules in some detail.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/06%3A_The_Pharo_Object_Model/6.07%3A_Everything_Happens_by_Sending_MessagesIt implies that this is not the responsibility of the client to select the method to be executed, it is the one of the receiver of the message. One of the consequences of Pharo’s model of message send...It implies that this is not the responsibility of the client to select the method to be executed, it is the one of the receiver of the message. One of the consequences of Pharo’s model of message sending is that it encour- ages a style in which objects tend to have very small methods and delegate tasks to other objects, rather than implementing huge, procedural methods that assume too much responsibility.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/02%3A_A_Quick_Tour_of_Pharo/2.05%3A_The_World_MenuClicking anywhere on the background of the Pharo window will display the World Menu, which contains many of the Pharo tools, utilities and settings. At the top of the World Menu, you will see a list o...Clicking anywhere on the background of the Pharo window will display the World Menu, which contains many of the Pharo tools, utilities and settings. At the top of the World Menu, you will see a list of several core tools in Pharo, including the System Browser, the Playground, the Monticello package manager, and others.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/13%3A_Morphic/13.02%3A_Manipulating_MorphsFor convenience, all morphs are considered to occupy a rectangular region of the screen; if they are irregularly shaped, their position and size are those of the smallest rectangular box that surround...For convenience, all morphs are considered to occupy a rectangular region of the screen; if they are irregularly shaped, their position and size are those of the smallest rectangular box that surrounds them, which is known as the morph’s bounding box, or just its bounds. To change the color of a morph, send it the color: message with the desired Color object as argument, for instance, joe color: Color orange.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Book%3A_Pharo_by_Example_5.0_(Ducasse_Zagidulin_Hess_and_Chloupis)/03%3A_A_First_Application/3.06%3A_Defining_the_Class_LOGameAs there is no magic, the created method will simply raise an exception and the debugger will stop again (as shown in Figure \(\PageIndex{3}\)) giving you the opportunity to define the behavior of the...As there is no magic, the created method will simply raise an exception and the debugger will stop again (as shown in Figure \(\PageIndex{3}\)) giving you the opportunity to define the behavior of the method. Close the debugger, and look at the class definition once again (which you can do by clicking on LOGame on the second pane of the System Browser), you will see that the browser has modified it to include the instance variable cells.