New in REALbasic 2006r3 [Mac OS X 10.4.7]

The following line gets an error in r3, but works fine in r2:

  If Canvas(Self.Focus) = Me Then


but the corrected lines works OK:

  Dim theCtrl As Control

  // Get the Control who have the focus
  theCtrl = Self.Focus

  // Toogle the current Focus (value)
  If Canvas(theCtrl) = Me Then


The error was IllegalCastException.


The code is in Canvas1.MouseDown...



Why ?



IllegalCast Exception follow-up
-------------------------------

REALbasic 2006r3 Commercial Pro
Mac OS X 10.4.7

The newly changed code does not works too, now, several minutes after the previous change:

  Dim theCtrl      As Control
  Dim ChoosedColor As Variant

  // Get the Control who have the focus
  theCtrl = Self.Focus

  // Toogle the current Focus (value)
  If Canvas(theCtrl) = Me Then


and once I have added the second Dim line (and code below the If .../... Else If block!

What happens ?


I've made a simple change in the code:

  Dim theCtrl      As Control
  Dim myCanvas     As Canvas
  Dim ChoosedColor As Variant

  // Get the Control who have the focus
  theCtrl = Self.Focus

  // Toogle the current Focus (value)
  myCanvas = Canvas(theCtrl)
  If myCanvas = Me Then


How many times will that work ?

Emile
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to