Visual Smalltalk Enterprise ™ ™

Total Page:16

File Type:pdf, Size:1020Kb

Visual Smalltalk Enterprise ™ ™ Visual Smalltalk Enterprise ™ ™ Language Reference P46-0201-00 Copyright © 1999–2000 Cincom Systems, Inc. All rights reserved. Copyright © 1999–2000 Seagull Systems, Inc. All rights reserved. This product contains copyrighted third-party software. Part Number: P46-0201-00 Software Release 3.2 This document is subject to change without notice. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013. Trademark acknowledgments: CINCOM, CINCOM SYSTEMS, and the Cincom logo are registered trademarks of Cincom Systems, Inc. Visual Smalltalk is a trademark of Cincom Systems, Inc., its subsidiaries, or successors and are registered in the United States and other countries. Microsoft Windows is a registered trademark of Microsoft, Inc. Win32 is a trademark of Microsoft, Inc. OS/2 is a registered trademark of IBM Corporation. Other product names mentioned herein are used for identification purposes only, and may be trademarks of their respective companies. The following copyright notices apply to software that accompanies this documentation: Visual Smalltalk is furnished under a license and may not be used, copied, disclosed, and/or distributed except in accordance with the terms of said license. No class names, hierarchies, or protocols may be copied for implementation in other systems. This manual set and online system documentation copyright © 1999–2000 by Cincom Systems, Inc. All rights reserved. No part of it may be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior written consent from Cincom. Cincom Systems, Inc. 55 Merchant Street Cincinnati, Ohio 45246 Phone: (513) 612-2300 Fax: (513) 612-2000 World Wide Web: http://www.cincom.com Contents Preface ........................................................................................ xv About This Manual ................................................................xv Notation Conventions ................................................xvii Chapter 1 The Smalltalk Language Overview ................................................................................19 Language Changes .................................................................19 Identifiers ...............................................................................20 Literals ...........................................................................20 Variables ........................................................................26 Variable Shadowing ......................................................30 Pseudovariables ............................................................31 Messages ................................................................................31 Sequences of Messages ................................................35 Cascading Messages .....................................................35 Parsing Expressions ....................................................36 Method Syntax .......................................................................37 Message Pattern ............................................................37 Comments .....................................................................38 Assigning Values to Variables ......................................38 Returning Values ...........................................................39 Blocks ...........................................................................39 Control Structures ..................................................................40 Conditional Execution ..................................................41 Iterative Execution ........................................................41 Boolean Evaluation ......................................................42 Evaluating Blocks .........................................................42 Language Upgrade Support ..................................................43 Compiler Options .........................................................43 Conversion Tools ..........................................................45 Chapter 2 Basic Building Blocks Overview ................................................................................47 Object Class ...........................................................................48 Creating and Destroying Instances ..............................48 Accessing Instances ......................................................49 Equality and Identity ....................................................49 Hash Values ..................................................................50 Visual Smalltalk Enterprise Language Reference iii Contents Testing ...........................................................................50 Copying .........................................................................51 Evaluating Messages .....................................................51 Events ............................................................................52 Reporting Exceptions ...................................................57 Object Descriptions ......................................................57 Object Finalization ........................................................58 Boolean Classes .....................................................................59 Boolean Expressions ....................................................59 Magnitude Classes ..................................................................60 Magnitude .....................................................................61 Character .......................................................................62 Date, Time and TimeStamp .........................................65 Numbers ........................................................................67 Float ...............................................................................70 Fraction .........................................................................71 Integer ...........................................................................71 Collection Classes ..................................................................72 Attributes of the Collection Class .................................73 Enumerating Collections ..............................................74 Converting Collections .................................................76 Creating Instances .........................................................76 Common Protocol .........................................................77 Class Bag .......................................................................78 Class HashedCollection ................................................78 Class Set ........................................................................79 Class Dictionary ............................................................79 Class IdentityDictionary ................................................79 Class IndexedCollection ...............................................79 Class FixedSizeCollection .............................................80 Class OrderedCollection ...............................................81 Class SortedCollection ..................................................82 Stream Classes ........................................................................82 Accessing Protocol ........................................................84 Positioning and Reading Protocol ...............................84 Writing Protocol ............................................................86 File System Interface Classes .................................................87 Files ...............................................................................87 Opening and Accessing Files .......................................88 Directories .....................................................................89 File Association .............................................................89 Pattern ....................................................................................91 PropertyManager ....................................................................92 Accessing Properties .....................................................93 iv Visual Smalltalk Enterprise Language Reference Chapter 3 The Graphics Model Overview ................................................................................95 The Coordinate System .........................................................96 Coordinate System Independence ...............................97 Setting Graphics Display Units ....................................97 Graphic Classes ......................................................................98 Point ..............................................................................98 Rectangle ....................................................................101 GraphicsMedium Classes .....................................................103 GraphicsMedium ........................................................104 Bitmap .........................................................................104 StoredPicture ...............................................................106 Printer .........................................................................107 Screen .........................................................................108 Window ......................................................................109 Graphics Tool Classes .........................................................109
Recommended publications
  • ISO/IEC JTC 1/SC 22/WG4 N 0163 Information Technology
    ISO/IEC JTC 1/SC 22/WG4 N 0163 Date: 2002-05-21 Reference number of document: WDTR 19755 Version 1.1 Committee identification: ISO/IEC JTC 1/SC 22 /WG 4 Secretariat: ANSI Information Technology — Programming languages, their environments and system software interfaces — Object finalization for programming language COBOL Warning This document is an ISO/IEC proposed draft Technical Report. It is not an ISO/IEC International Technical Report. It is distributed for review and comment. It is subject to change without notice and shall not be referred to as an International Technical Report or International Standard. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation. Document type: Technical report Document subtype: n/a Document stage: (20) Preparation Document language: E ISO/WDTR 19755 Copyright notice This ISO/IEC document is a working draft and is copyright-protected by ISO/IEC. Requests for permission to reproduce this document for the purpose of selling it should be addressed as shown below or to ISO’s member body in the country of the requester: Copyright manager ISO Central Secretariat 1 rue de Varembé 1211 Geneva 20 Switzerland tel: +41 22 749 0111 fax: +41 22 734 0179 email: [email protected] Reproduction for sales purposes may be subject to royalty payments or a licensing agreement. Violators may be prosecuted. ii © ISO/IEC 2002 – All rights reserved ISO/IEC WDTR 19755 Acknowledgement notice COBOL originated in 1959 as a common business oriented language developed by the Conference on Data Systems Languages (CODASYL).
    [Show full text]
  • Stable/Build) • --Port PORT - Set the PORT Number (Default: 8000)
    Pyodide Release 0.18.1 unknown Sep 16, 2021 CONTENTS 1 Using Pyodide 3 1.1 Getting started..............................................3 1.2 Downloading and deploying Pyodide..................................6 1.3 Using Pyodide..............................................7 1.4 Loading packages............................................ 12 1.5 Type translations............................................. 14 1.6 Pyodide Python compatibility...................................... 25 1.7 API Reference.............................................. 26 1.8 Frequently Asked Questions....................................... 50 2 Development 55 2.1 Building from sources.......................................... 55 2.2 Creating a Pyodide package....................................... 57 2.3 How to Contribute............................................ 64 2.4 Testing and benchmarking........................................ 74 2.5 Interactive Debugging.......................................... 76 3 Project 79 3.1 About Pyodide.............................................. 79 3.2 Roadmap................................................. 80 3.3 Code of Conduct............................................. 82 3.4 Governance and Decision-making.................................... 83 3.5 Change Log............................................... 85 3.6 Related Projects............................................. 95 4 Indices and tables 97 Python Module Index 99 Index 101 i ii Pyodide, Release 0.18.1 Python with the scientific stack, compiled to WebAssembly.
    [Show full text]
  • Gnu Smalltalk Library Reference Version 3.2.5 24 November 2017
    gnu Smalltalk Library Reference Version 3.2.5 24 November 2017 by Paolo Bonzini Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". 1 3 1 Base classes 1.1 Tree Classes documented in this manual are boldfaced. Autoload Object Behavior ClassDescription Class Metaclass BlockClosure Boolean False True CObject CAggregate CArray CPtr CString CCallable CCallbackDescriptor CFunctionDescriptor CCompound CStruct CUnion CScalar CChar CDouble CFloat CInt CLong CLongDouble CLongLong CShort CSmalltalk CUChar CByte CBoolean CUInt CULong CULongLong CUShort ContextPart 4 GNU Smalltalk Library Reference BlockContext MethodContext Continuation CType CPtrCType CArrayCType CScalarCType CStringCType Delay Directory DLD DumperProxy AlternativeObjectProxy NullProxy VersionableObjectProxy PluggableProxy SingletonProxy DynamicVariable Exception Error ArithmeticError ZeroDivide MessageNotUnderstood SystemExceptions.InvalidValue SystemExceptions.EmptyCollection SystemExceptions.InvalidArgument SystemExceptions.AlreadyDefined SystemExceptions.ArgumentOutOfRange SystemExceptions.IndexOutOfRange SystemExceptions.InvalidSize SystemExceptions.NotFound SystemExceptions.PackageNotAvailable SystemExceptions.InvalidProcessState SystemExceptions.InvalidState
    [Show full text]
  • Focal Point Custom Chart Plugin Reference Manual
    Focal Point® Custom Chart Plugin Reference Manual 7.3.0 Publication information Trademarks December 2018 The following are trademarks or registered trademarks of UNICOM Systems, Inc. in the United States and/or other Information in this publication is subject to change. jurisdictions worldwide: Focal Point, UNICOM, Changes will be published in new editions or technical UNICOM Systems. newsletters. Documentation set The documentation relating to this product includes: ■ Focal Point Custom Chart Plugin Reference Manual Copyright notice Focal Point® (the Programs and associated materials) is a proprietary product of UNICOM Systems, Inc. – a division of UNICOM Global. The Programs have been provided pursuant to License Agreement containing restrictions on their use. The programs and associated materials contain valuable trade secrets and proprietary information of UNICOM Systems, Inc. and are protected by United States Federal and non-United States copyright laws. The Programs and associated materials may not be reproduced, copied, changed, stored, disclosed to third parties, and distributed in any form or media (including but not limited to copies on magnetic media) without the express prior written permission of UNICOM Systems, Inc., UNICOM Plaza Suite 310, 15535 San Fernando Mission Blvd., Mission Hills, CA 91345 USA. Focal Point® © Copyright 1997-2018 All Rights Reserved. UNICOM Systems, Inc. – a division of UNICOM Global. No part of this Program may be reproduced in any form or by electronic means, including the use of information storage and retrieval systems, without the express prior written consent and authorization of UNICOM Systems, Inc. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, without prior written permission from UNICOM Systems, Inc.
    [Show full text]
  • A Tour of the Squeak Object Engine
    A Tour of the Squeak Object Engine A Tour of the Squeak Object Engine Tim Rowledge, [email protected] Introduction This chapter is intended to explain some basics of how a Virtual Machine (VM) works, why a VM is useful, what it does for the Squeak programmer and user, and how the Squeak VM might develop in the future. What is a Virtual Machine and why do we need one? A Virtual Machine provides us with a pretense of being a machine other than the actual hardware in use. Using one allows systems that behave differently than the host hardware to run as if on hardware designed for them. The term Object Engine is less commonly used but is a useful concept that includes the lowest system areas of the langauge environment running on the VM. Since there is often some flux in the definition of which components are within the actual VM and which are part of the supported environment, Object Engine is useful as a more inclusive term. The term Virtual Machine is used in several ways. When IBM refer to VM/CMS they are referring to a way of making a mainframe behave as if it is many machines, so that programs can assume they have total control even though they do not. Intel provide a somewhat similar facility in the x86 architecture(?), referred to as Virtual Mode. This sort of VM is a complete hardware simulation, often supported at the lowest level by the hardware. Another sort of VM is the emulator - SoftWindows for the Mac, Acorn's !PC, Linux's WINE are good examples - where another machine and/or OS is simulated to allow a Mac user to run Windows programs, an Acorn RiscPC or a Linux machine to run Windows98 programs and so on.
    [Show full text]
  • Exposing C++ Functions and Classes with Rcpp Modules
    Exposing C++ functions and classes with Rcpp modules Dirk Eddelbuettela and Romain Françoisb ahttp://dirk.eddelbuettel.com; bhttps://romain.rbind.io/ This version was compiled on July 3, 2021 This note discusses Rcpp modules. Rcpp modules allow programmers to Here we use the (templated) Rcpp converter as() which can expose C++ functions and classes to R with relative ease. Rcpp modules transform from a SEXP to a number of different C++ and Rcpp are inspired from the Boost.Python C++ library (Abrahams and Grosse- types. The Rcpp function wrap() offers the opposite functionality Kunstleve, 2003) which provides similar features for Python. and converts many known types to a SEXP. This process is simple enough, and is used by a number of Rcpp | modules | R | C++ CRAN packages. However, it requires direct involvement from the programmer, which quickly becomes tiresome when many functions 1. Motivation are involved. Rcpp modules provides a much more elegant and Exposing C++ functionality to R is greatly facilitated by the Rcpp unintrusive way to expose C++ functions such as the norm function package and its underlying C++ library (Eddelbuettel et al., 2021; shown above to R. Eddelbuettel and François, 2011). Rcpp smoothes many of the We should note that Rcpp now has Rcpp attributes which ex- rough edges in R and C++ integration by replacing the traditional tends certain aspect of Rcpp modules and makes binding to simple R Application Programming Interface (API) described in ‘Writing functions such as this one even easier. With Rcpp attributes we can R Extensions’(R Core Team, 2018) with a consistent set of C++ just write classes.
    [Show full text]
  • FFI: Racket Foreign Interface
    FFI: Racket Foreign Interface Version 5.0 Eli Barzilay June 6, 2010 (require ffi/unsafe) The ffi/unsafe library enables the direct use of C-based APIs within Racket programs— without writing any new C code. From the Racket perspective, functions and data with a C-based API are foreign, hence the term foreign interface. Furthermore, since most APIs consist mostly of functions, the foreign interface is sometimes called a foreign function in- terface, abbreviated FFI. 1 Contents 1 Overview 4 2 Loading Foreign Libraries 5 3 C Types 8 3.1 Type Constructors . 8 3.2 Numeric Types . 9 3.3 Other Atomic Types . 10 3.4 String Types . 11 3.4.1 Primitive String Types . 11 3.4.2 Fixed Auto-Converting String Types . 11 3.4.3 Variable Auto-Converting String Type . 12 3.4.4 Other String Types . 12 3.5 Pointer Types . 13 3.6 Function Types . 14 3.6.1 Custom Function Types . 18 3.7 C Struct Types . 21 3.8 Enumerations and Masks . 24 4 Pointer Functions 26 4.1 Pointer Dereferencing . 27 4.2 Memory Management . 30 5 Derived Utilities 34 5.1 Safe Homogenous Vectors . 34 5.2 Safe C Vectors . 40 2 5.3 Tagged C Pointer Types . 42 5.4 Defining Bindings . 44 5.5 Allocation and Finalization . 46 5.6 Atomic Execution . 47 5.7 Objective-C FFI . 48 5.7.1 FFI Types and Constants . 48 5.7.2 Syntactic Forms and Procedures . 49 5.7.3 Raw Runtime Functions . 53 5.7.4 Legacy Library .
    [Show full text]
  • Editor, Captain Scott B. Murray Editorial Assistant, Mr. Charles J
    Editor, Captain Scott B. Murray Editorial Assistant, Mr. Charles J. Strong The Army Lawyer is published monthly by The Judge Advocate General's School for the official use of Army lawyers in the performance of their legal responsibilities. The opinions e xpressed by the authors in the articles, however, do not necessarily reflect the view of The Judge Advocate General or the Department of the Army. Masculine or feminine pronouns appearing in this pamphlet refer to both genders unless the context indicates another use. The Army Lawyer welcomes articles on topics of interest to military lawyers. Articles should be submitted on 3 1/2” diskettes to Editor, The Army Lawyer, The Judge Advocate General's School, U.S. Army, ATTN: JAGS-ADL-P, Charlottesville, Virginia 22903-1781. Article text and footnotes should be double-spaced in Times New Roman, 10 point font, and Microsoft Word format. Articles should follow A Uniform System of Citation (16th ed. 1996) and Military Citation (TJAGSA, July 1997). Manuscripts will be returned upon specific request. No compensation can be paid for articles. The Army Lawyer articles are indexed in the Index to Legal Periodicals, the Current Law Index, the Legal Resources Index, and the Index to U.S. Government Periodicals. Address changes for official channels distribution: Provide changes to the Editor, The Army Lawyer, TJAGSA, 600 Massie Road, Charlottesville, Virginia 22903-1781, telephone 1 -800-552-3978, ext. 396 or e-mail: [email protected]. Issues may be cited as Army Law., [date], at [page number]. Periodicals postage paid at Charlottesville, Virginia and additional mailing offices.
    [Show full text]
  • Nested Class Modularity in Squeak/Smalltalk
    Springer, Nested Class Modularity in Squeak/Smalltalk Nested Class Modularity in Squeak/Smalltalk Modularität mit geschachtelten Klassen in Squeak/Smalltalk by Matthias Springer A thesis submitted to the Hasso Plattner Institute at the University of Potsdam, Germany in partial fulfillment of the requirements for the degree of Master of Science in ITSystems Engineering Supervisor Prof. Dr. Robert Hirschfeld Software Architecture Group Hasso Plattner Institute University of Potsdam, Germany August 17, 2015 Abstract We present the concept, the implementation, and an evaluation of Matriona, a module system for and written in Squeak/Smalltalk. Matriona is inspired by Newspeak and based on class nesting: classes are members of other classes, similarly to class instance variables. Top-level classes (modules) are globals and nested classes can be accessed using message sends to the corresponding enclosing class. Class nesting effec- tively establishes a global and hierarchical namespace, and allows for modular decomposition, resulting in better understandability, if applied properly. Classes can be parameterized, allowing for external configuration of classes, a form of dependency management. Furthermore, parameterized classes go hand in hand with mixin modularity. Mixins are a form of inter-class code reuse and based on single inheritance. We show how Matriona can be used to solve the problem of duplicate classes in different modules, to provide a versioning and dependency management mech- anism, and to improve understandability through hierarchical decomposition. v Zusammenfassung Diese Arbeit beschreibt das Konzept, die Implementierung und die Evaluierung von Matriona, einem Modulsystem für und entwickelt in Squeak/Smalltalk. Ma- triona ist an Newspeak angelehnt und basiert auf geschachtelten Klassen: Klassen, die, wie zum Beispiel auch klassenseitige Instanzvariablen, zu anderen Klassen gehören.
    [Show full text]
  • Windowbuilder Pro/V 3.1
    Cincom WindowBuilder Pro/V 3.1 P46-0208-00 Software to Simplify Our Complex World ® Copyright © 1999–2000 Cincom Systems, Inc. All rights reserved. Copyright © 1999–2000 Seagull Systems, Inc. All rights reserved. This product contains copyrighted third-party software. Part Number: P46-0208-00 Software Release 3.2 This document is subject to change without notice. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013. Trademark acknowledgments: CINCOM, CINCOM SYSTEMS, and the Cincom logo are registered trademarks of Cincom Systems, Inc. Visual Smalltalk is a trademark of Cincom Systems, Inc., its subsidiaries, or successors and are registered in the United States and other countries. Microsoft Windows is a registered trademark of Microsoft, Inc. Win32 is a trademark of Microsoft, Inc. OS/2 is a registered trademark of IBM Corporation. Other product names mentioned herein are used for identification purposes only, and may be trademarks of their respective companies. The following copyright notices apply to software that accompanies this documentation: Visual Smalltalk is furnished under a license and may not be used, copied, disclosed, and/or distributed except in accordance with the terms of said license. No class names, hierarchies, or protocols may be copied for implementation in other systems. This manual set and online system documentation copyright © 1999–2000 by Cincom Systems, Inc. All rights reserved. No part of it may be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior written consent from Cincom.
    [Show full text]
  • Running Android Applications Without a Virtual Machine
    Running Android Applications without a Virtual Machine Arno Puder San Francisco State University Computer Science Department 1600 Holloway Avenue San Francisco, CA 94132 [email protected] Abstract. Android has gained significant popularity in the smartphone market since its introduction in 2007. While Android applications are written in Java, Android uses its own virtual machine called Dalvik. Other smartphone platforms, most notably Apple’s iOS, do not permit the installation of any kind of virtual machine. App developers who want to publish their applications for different platforms are required to re- implement the application using the respective native SDK. In this paper we describe a cross-compilation approach, whereby Android applications are cross-compiled to portable C code. With this approach it is not nec- essary to have a Dalvik virtual machine deployed on the target platform. We describe different aspects of our cross-compiler, from byte code level cross-compilation, memory management, to API mapping. A prototype of our cross-compiler called XMLVM is available under an Open Source license. 1 Introduction Android is a software stack for mobile devices initially developed by a company called Android, Inc. before being bought by Google in 2005. Since 2007, mem- bers of the Open Handset Alliance (OHA) collaborate on the development of Android which nowadays has become one of the main development platforms for smartphone applications. Although Android employs Java as a programming language as well as a subset of the standard J2SE API, it does not make use of Oracle’s (formerly Sun Microsystem’s) virtual machine technology for technical and political reasons.
    [Show full text]
  • Diagnostic Data Collection and Analysis Tools
    Lesson 3 Diagnostic Data Collection and Analysis tools Poonam Parhar JVM Sustaining Engineer Oracle Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Agenda Diagnostic Data, Data Collection and Analysis tools 1. Java Heap Memory Issues 2. OutOfMemoryError due to Finalization 3. PermGen/Metaspace Memory Issues 4. CodeCache Issues 5. Native Memory Issues Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 3 Java Heap: Memory Leak Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 4 Confirm Memory Leak • Monitor Java Heap usage over time • If the Full GCs are not able to claim any space in the Old Gen of the heap then it could be a configuration issue • Heap might be sized too small • Increase the heap size and test the application again • If there is continuous memory growth and the failure persists at the increased heap size too, there could be a memory leak Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 5 Monitor using GC Logs [GC (Allocation Failure) [PSYoungGen: 318596K->153251K(433152K)] 1184491K->1182018K(1556992K), 0.5548358 secs] [Times: user=1.78 sys=0.13, real=0.56 secs] [Full GC (Ergonomics) [PSYoungGen: 153251K->0K(433152K)] [ParOldGen: 1028766K->1054946K(1345024K)] 1182018K->1054946K(1778176K), [Metaspace: 2722K->2722K(1056768K)], 4.5281743 secs] [Times: user=10.09 sys=0.00, real=4.52 secs] [GC (Allocation Failure) [PSYoungGen: 209408K->209511K(448512K)] 1264354K->1264458K(1793536K), 0.1590964 secs] [Times: user=0.48 sys=0.06, real=0.15 secs]
    [Show full text]