The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....

How to Deal with a Canvas Reference Change


How to deal with the canvas reference change that took place with the shift from release 10.0 to 10.1?


The change of the declarations concerning the referencing of a canvas in some event declarations had to be performed in order to support future compiler versions and to improve C++ compatibility. The following declarations are affected by the change:

'var' removed:

'const' removed: As a consequence you have to apply a few changes in your source code when updating from any release of the SDL Suite previous to 10.1 to a release 10.1 or higher. If you do not apply the changes, two effects will arise: (1) the compiler may complain about an invalid reference and will ask whether to remove the reference (say NO); (2) your program may generate a "general access error" and crash on certain actions.

In any case you should search through your source code for expressions such as 'var XYXYXY: TCanvas' and 'const XYXYXY: TCanvas'. The best way to do this is to use the following regular expression in your search term: 'var .*TCanvas' (or 'const .*TCanvas') and remove the 'var' (or the 'const') substring, respectively.

Last Update: 2012-Okt-26