How to Customise LearningWorks Class Browser Syntax Colours. Colour coding your code helps you to locate errors.

Customise Class Browser Syntax Colours



More Tutorials
C Programming Tutorial
T223

HTML Tutorial & Web Design
T170,T171 and TT180

Search this site

Home

 

Tutorials
| 1. Starting Smalltalk, and Terminology | 2. Precedence Rules | 3. Classes - Strings | 4. Class Browser | 5. Variables | 6. Error Messages | 12. Control Structures | 16. Dialogs | 23. Collection class | 39. OpenGUI |

 

Information
| Smalltalk Books | Student Software & Books | Hints & Tips | Sites | Download Smalltalk | Coloured code | Download Documents | ASCII Codes |

 

Smalltalk Index

 

 

 

Student
Licence Software
at special prices

 

Updated 23 October 2000

Colour coding your code helps you to locate errors.

Sample of coloured code for the HoverFrog height: method, as can be seen in the class browser, using the colour option.

{Code Window}

  • Notice how the argument, aNumber, coloured green is easier to spot in its 3 locations, in the Code Window
  • You can tell by the colour it is the argument. Such information is invaluable when entering or trying to correct your code after errors have been found.
  • If a part of your code comes up in the wrong colour, would indicate your code is wrong
  • You can customize the colours used in the M206 version of LearningWorks. You can make items bold and/or in italics

| Top of Page |

How to add colour

These instructions are for the M206 version of LearningWorks.
Start the program
In the Launcher window
  1. Click on the Resourses Menu
  2. Select Customise Class Browser Syntax Colours... option

In the Class Browser Syntax Colours Window see Diagram
  1. Make sure you "Check the Use colour check box widget" for each Syntactic element, you wish to colour. There should be a X in it when checked. The default state for most elements is checked. If unchecked the colour is black.
  2. Make your colour choices, or you may decide to leave the colours at the default colours. Note that the same colour is used for more than 1 syntactic elements, in the default mode
  3. You can make any Syntactic element(s) bold to make them stand out
  4. aYou can make any Syntactic element(s) italic if you wish.
  5. IMPORTANT: The browsers will NOT be coloured unless there is a cross in the Affect browsers check box. Unfortunatly you have to do this step EVERY time you start LW, to obtain a coloured browser.

    If any student finds a way of automatically saving the checking of this box, please let me know.
  6. If you have made changes, and wish to save them click save.
  7. Click Exit

{Browser Colours}


| Top of Page |

Print this table to plan out your colour scheme

The bold items in the Syntactic element column, are my choice for particular attention. I.e. Choose easily recognised colour/bold/italic combinations.

My Colour Scheme

Syntax type Syntactic element Default colour Your colour Use Bold Use Colour Use Italic
Variable argument          
  temporary          
  instance Default colour, etc is same. I recommend a Change for 1 of them.        
  class      
  global          
  undeclared          
Literal number Default colour,etc is same Change if you wish        
  array        
  string        
  symbol        
  string        
  character        
  constant          
Misc comment Default colour is same .
This isOK
  Default Yes   Default Yes
  methodComment       Default Yes
  selector Black   Default Yes    
  primitive          
             
             

Top of Page.

 

Sites by John McGuinn . HTML and Web Design | C Programming

Leeds & the UK Tourist Information & guide my home town

Relax in the sun.

Benidorm   Tenerife   San Marino apartments to rent

Holidays and Short Breaks     Manchester Airport

Leeds my home town City of Leeds information  Leeds and Bradford International Airport

AireWeb Web Design
Leeds Web Design Web Designers Hosting Domain names Web site Promotion

Copyright © John McGuinn 2000 - 04