Category: Tutorials

  • Naming and Referencing Morphs in Squeak/Smalltalk

    Naming and Referencing Morphs in Squeak/Smalltalk

    Dr. Nicola Mingotti has released a new in-depth tutorial video that explores how to identify and name Morphs in the Squeak/Smalltalk environment. If you have ever wondered how to refer to a specific Morph – for example, how to say “make that Morph yellow” – this video walks you through several effective techniques.

    Throughout the video, you will learn how to use tools such as the object explorer and the workspace to better understand and interact with objects in Squeak. The tutorial introduces a variety of methods, including assigning names to Morphs, identifying them using properties such as identityHash and knownName, and inspecting objects with user interface tools that are not immediately obvious to new users.

    This tutorial is particularly useful for those who wish to go beyond the basics and gain more precise control over their Squeak projects. It also includes several helpful interface tips that may be difficult to discover independently.

    Check out the video here!

    Have a great time with Smalltalk and keep on Squeaking!

  • What Are Flaps in Squeak?

    What Are Flaps in Squeak?

    Dr. Nicola Mingotti has created a short introductory video, “Flaps in Squeak Smalltalk,” that explains how to get started using flaps in the Squeak environment. In the video, he demonstrates how to enable flaps, use them to drag objects into the Squeak World, and explores a few basic configuration options. If you are new to flaps or looking for a quick overview, this video provides a clear and helpful starting point. You can watch it here.

    Have a great time with Smalltalk and keep on Squeaking!

  • Using the Squeak Help System for Your Projects

    Using the Squeak Help System for Your Projects

    Dr. Nicola Mingotti has created a highly useful video tutorial, “The Squeak Smalltalk Help System”, where he demonstrates how to use and implement the Squeak Help System in your projects. In the video, Dr. Mingotti walks you through a step-by-step guide on creating documentation for your code, providing valuable insights into integrating the help system into your workflow. You can check out his video here.

    Additionally, Dr. Mingotti offers supporting materials in his Swiki article here, which includes code snippets and further comments to aid your understanding.

    Overview of the Squeak Help System

    One of the many great features of Squeak is its rich set of help documentation. The default Squeak image comes with valuable documentation that covers topics such as: How to Use Squeak, How to Contribute to Squeak, Tutorials, The Terse Guide to Squeak, and Using WebClient and WebServer. This documentation is easily searchable, making it a highly useful resource for your projects.

    Help System vs. Code Comments

    It is important to note that the Squeak Help System is not intended to replace code comments. Squeak/Smalltalk provides excellent functionality for adding comments directly in your code, and these should remain the primary way to document code behavior, logic, and functionality. The Help System is designed for documentation outside the scope of code comments, such as explaining overall project goals, providing tutorials, or offering guidance on using tools and features in your project.

    Features of the Help System

    The help documentation system offers a variety of features, including text styling (bold, italics, strikethrough, underline), code formatting and syntax highlighting, and URLs, to name a few.

    Additionally, you can add images to your documentation. This feature is currently available in the Trunk image, but you can implement it in other images as well by using its code as a reference. For the 6.0 image, you can perform a fileout of the SqueakHelpTextImage class from the Trunk image and then filein it into the 6.0 image. Alternatively, you can create your own code to implement this functionality! Thanks to Christoph Thiede for providing guidance on how he implemented this feature. You can find his post here.

    How to Insert an Image into Your Help Page

    1. Open a Workspace window.
    2. In the Workspace, perform a “do it” on the following code:
      Clipboard clipboardText: Character startOfHeader asString.
    3. In your help page window, move your cursor to the location where you want to insert the image. Paste the clipboard contents (Ctrl+v or Cmd+v on Mac). At this point, you won’t see anything yet.
    4. (Optional) Skip this step if you prefer typing the code manually. Copy the following code, replacing /path/to/file/image.png with the actual path and filename of your image:
      SqueakHelpTextImage forForm: (ImageReadWriter formFromFileNamed: '/path/to/file/image.png')
    5. Return to your help page window and move your cursor to the same location where you want to insert the image. Press Alt+5 (or Cmd+5 on Mac), then select “Custom attribute…” from the bottom of the list.
    6. When the Input Requested box appears, paste the image code from Step 4 (or manually type it in) into the field labeled “Enter expression for text attribute:”. You should now see a shaded outline where the image will appear.
    7. Save your changes by pressing Ctrl+s (or Cmd+s on Mac).

    Your image is now successfully inserted into your help document!

    Conclusion

    A big thank you to Dr. Nicola Mingotti for his helpful video tutorial on using the Squeak Help System, which offers a step-by-step guide for integrating the help system into your workflow. His Swiki article is also a helpful resource with code snippets and additional comments. Be sure to check out his materials to further enhance your understanding of Squeak and the Help System!

    Have a great time with Smalltalk and keep on Squeaking!

  • Using TextLineMorph in Squeak for Single-Line Text Input in Graphical Interfaces

    Using TextLineMorph in Squeak for Single-Line Text Input in Graphical Interfaces

    While working with Morphs can be quite easy at times, working with both text and Morphs might not always seem as straightforward. Dr. Nicola Mingotti provides a helpful video that demonstrates a commonly needed functionality in graphical interfaces, where you would typically want to accept a single line of textual data. Check out his video to see how this can be easily accomplished. You can view the video demonstration “Make a TextLineMorph in Squeak Smalltalk” here.

    Have a great time with Smalltalk and keep on Squeaking!

  • New Video Demonstrating Morphic Animation

    New Video Demonstrating Morphic Animation

    Would you like to view a demonstration of how to take advantage of the Morphic animation system in Squeak? If so, you are in luck! A new video has recently been posted that takes you through the steps of doing just that. The Morphic animation system in Squeak offers a simple way to animate and interact with objects in your environment. Whether you are building basic animations or more complex interactive systems, Morphic provides a wealth of possibilities for both beginners and seasoned developers alike. You can watch the video titled “A BlinkingRectangle Morph in Smalltalk” here.

    In addition to the video tutorial, you can explore a very simple, yet powerful example included in the Squeak image. This example morph can be found with the somewhat hard-to-remember name, MorphExample. By evaluating “MorphExample new openInWorld” (without the surrounding parentheses) in a Workspace, you can discover how easy it is to make morphs perform various actions. This demonstration emphasizes the beauty of the Morphic system’s simplicity: you do not need to write complex code to animate objects. Instead, you can focus on creating rich, interactive applications and interfaces with just a few lines of code.

    One of the most compelling aspects of the Morphic system is how effortlessly it enables dynamic, real-time interaction, especially when used within the Smalltalk environment. Compared to many other graphical frameworks, where handling interactions often requires more complex event handling and manual updates, Morphic allows you to create interactive, animated objects with minimal code. For example, you can open a halo on the star, resize or rotate it, and the animation will continue to perform and adjust dynamically to the star’s new dimensions. This responsiveness highlights the simplicity and flexibility of the Morphic system, making it an ideal choice for building interactive systems without the need for manual recalculations or updates.

    If you are interested in delving deeper into the Morphic system, you can access Chapter 12 of Squeak by Example for more detailed explanations and examples. The book offers a clear guide to the system, making it an excellent resource for developers looking to better understand Morphic. You can read the full chapter here.

    For those who want to learn more about using halos with morphs in Squeak, there is another excellent video resource available. The video “Morphic Halo icons in Squeak Smalltalk” demonstrates how to interact with the Morphic halo icons to manipulate morphs in the Squeak environment. Whether you are new to Squeak or already familiar with the basics, this video provides valuable insights into how halos can be used to interact with morphs. Check it out here.

    Have a great time with Smalltalk and keep on Squeaking!

  • Imagine Invent Inspire – Etoys

    Etoys-iii

    Don’t miss the new Etoys book: http://wiki.squeakland.org/index.php/LearningWithEtoysI3.

    Etoys is:

    • an educational tool for teaching children powerful ideas in compelling ways
    • a media-rich authoring environment and visual programming system
    • a free software program that works on almost all personal computers

    All school children should have the opportunity to engage with computers in the most meaningful way. Learning to think and using the computer to discover and work with powerful ideas is the knowledge of true value. The community of Etoys users is working toward the dream of having all students become computer literate. This book only covers a small portion of those items. As you and your students learn some of the basic techniques, you will find more and more uses for them. The process of learning Etoys is just that, a process; the learning is on-going even though projects are begun and finished. Students will enjoy becoming experts and sharing their knowledge with others in the classroom.

    Imagine this: A group of learners want to visualize what they Imagine so they go to Etoys to Invent their dreams and Inspire each other by building on their various Etoys projects. Today’s learners need this kind of experience to be prepared for the future.

    For more information about Etoys visit www.squeakland.org

  • Back to the Future: Programming in Smalltalk

    back-to-the-future

    More exciting conference news for Smalltalk aficionados: James Foster has announced on his blog that this year’s OOPSLA conference will include several tutorials with a Smalltalk theme including his “Back to the Future: Programming in Smalltalk” in which he will look at the “new” ideas from Smalltalk that are still influencing newer programming languages. He will examine some of these ideas and present a number of tutorial exercises that explore some of Smalltalk’s  fundamentally different approach to language design and object orientation, including the following aspects:

    • All values are objects, even integers, booleans, and characters (no boxing/unboxing);
    • Classes and methods are objects (supporting reflection);
    • The language has only five reserved words;
    • All control flow (looping and conditional branching) is done through message sends;
    • Programming is done by sending messages to existing objects; and
    • The base class library can be modified.

    James works on Gemstone’s high performance product family based on Smalltalk, but intends the exercises to be relevant across different versions.

    This year’s OOPSLA will be held in Orlando, Florida from 25 to 29 October, and will also be co-located with the Dynamic Languages Symposium, which will doubtless have lots to interest Smalltalkers.

    On the other hand, if you’re looking for a European break this year, don’t forget that the 2009 International Smalltalk Conference, organised by ESUG, will be held in Brest, France, from 31 August to 4 September, and also has a great set of sessions lined up.

  • New Screencasts on DrGeoII

    Hilaire Fernandes has announced that he has created over 50 screencasts illustrating the capabilities of DrGeoII. DrGeoII allows students at primary or secondary level to create and interactively manipulate geometric figures within definable constraints.

    It is written using Morphic in Squeak Smalltalk, and can be embedded and mixed with existing Morph elements of the Squeak environment on the OLPC XO to produce some very impressive-looking activities to help students learn about mathematics and physics. The DrGeo wiki has lots of useful advice on how to get the best from the application.

    Development of Dr. Geo II was partly sponsored by TOP, the Taiwan Open Source Project, with funding from the Taiwan Ministry of Economy, and by ESUG to promote the Smalltalk language.

  • New Video Tutorial – Squeak Bug/Fix Reporting

    Ken Causey has added a very useful video to the Squeak Smalltalk group at vimeo.com, in which he demonstrates the entire process of creating and submitting a bug/fix or enhancement for Squeak. Along the way he also explains how to track down simple bugs, how to manage changesets, and how to navigate your way around the Mantis bug tracking system.

  • Get recording your Squeak videos now!

    The Squeak mailing lists have recently seen a surge of interest in getting videos published to help explain Squeak and Smalltalk to developers coming to the language and environment for the first time.

    In response to this Randal L. Schwartz has set up a new Squeak Smalltalk group on vimeo.com to allow Squeakers to easily upload and share their videos.

    Videos can be a great way to help people quickly pick up a lot of complex information, which makes this an opportunity for Squeakers old and new to help promote Squeak. If there are any topics that you think would suit a short video, why not try recording one and publishing it? If you’re the developer of a powerful Squeak developer tool, and you’re amazed that no-one seems to use all of its functionality, this would be a great way to expose all of those features in a compelling way.

    If you’re a new developer struggling with Squeak, let us know what topics you’d like to see covered in video tutorials. If you’ve got any recommendations for recording and editing software for Windows, Mac or Linux, please leave a comment.