Woudn't you need to cast it as a MyEditField (rather than a vanilla Editfield) in order to trigger a custom method..

ie.
if app.LayoutPraticiens.Control(i) isa MyEditField then
      MyEditField(app.LayoutPraticiens.Control(i)).raz

- Tom


On 23/12/2006, at 10:09 AM, Charles Yeomans wrote:


On Dec 22, 2006, at 6:05 PM, Youri wrote:



Hi,


I have in a Container Control some myEditField (custom class with a raz method). I simply want to loop throught all control, test if it is a MyEditField, if so trigger the raz method of this control. I'm using the following code which fails :


  dim n, i as Integer
  dim s as MyEditField


  n = app.LayoutPraticiens.ControlCount - 1

  for i = 0 to (n-1)

    if app.LayoutPraticiens.Control(i) isa MyEditField then
      EditField(app.LayoutPraticiens.Control(i)).raz

Rewrite it as above.

Charles Yeomans
_______________________________________________
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>

_______________________________________________
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