Lazarus for education

From Free Pascal wiki
Jump to navigationJump to search

Overview

The standard Lazarus IDE is setup for professional developers. This page describes how to setup the IDE for courses and beginners.

Since 0.9.29 lazarus comes with a package EducationLaz which adds some extra option pages to the IDE helping teachers to setup Lazarus for students and pupils.

Installing the package EducationLaz

  • Go to Packages / Configure installed packages. A dialog opens.
  • Select educationlaz from the right list and click below on Install selection to add it to the left list.
  • You may want to uninstall some packages that are too complex for your students.
  • Click on Save and rebuild. The IDE will ask for confirmation.
  • Restart the IDE.
  • There are now some new option pages under Environment / Options ... / Education.

Configuring the IDE

On the Environment / Options ... / Education / General page you can turn the education mode on and off.

Component names

When dropping components on a form, the IDE gives default names (Button1, Button2, ...). This is very useful for rapid design and testing but it does not help beginners to create readable code. There is an option to show a naming dialog under Environment / Options .. / Environment / Form Editor / Misc / Focus name on create.

Component palette

If you teach basic programming, then the component palette is only distracting for the students. You can hide any or all components on Environment / Options ... / Education / Component palette.

New files with name

When creating a new unit or a new form the IDE gives a standard name and the file is virtual. This is very useful for experts working with several projects and package at the same time, but it is confusing for beginners. The IDE can show immediately a save dialog. The option for this is Environment / Options ... / Environment / Naming / Ask for file name on new file.

Helpful IDE features

Some features are especially useful for beginners.

Working

  • A designtime package should be created, that allows to easily setup the IDE for various levels.
  • Less files: put all .lrs files of .lfm files into output directory
  • Rename a unit should rename the references in other units
  • 'unit not found' quick fix item: search unit
  • 'identifier not found' quick fix item: search identifier

ToDos

  • For example to hide the complex topics of the IDE like frames and packages.
  • A dialog to setup the education level, for example to hide the form editing options
  • Most beginners find the concept of 'projects' confusing. Instead they create a lot of small test programs which often contain only one file. And all these programs are stored in one directory. The solution is to use only one project and use the run/configure file options. For example the 'new form' button can be replaced with a 'new program' button.
  • When a component is created the IDE should ask for a new name immediately, because beginners have no workflow
  • When a unit is created the IDE should ask for the new name immediately (optional: save immediately), because beginners have problems with the concept of virtual files
  • when exploring a foreign unit (a unit that does not belong to neither project nor package) allow to extend the SrcPath for this directory and store this info in the project session
  • F1 on an identifier in the source editor should be extended to search out of scope
  • off line help for RTL, FCL
  • less files: put auto created files into a separate directory: lrs, rc, res
  • For beginner courses a minimal IDE is needed.

Further ideas from non lazarus developers