On Nov 13, 2006, at 8:58 PM, [EMAIL PROTECTED] wrote:

On Nov 14, 2006, at 01:53 UTC, Brendan Murphy wrote:

It is getting real old having the IDE add super.constructor calls
to the code. It rarely gets it right and causes more problems than
it is worth. I have several complex inheritance chains in my code
and it randomly places these calls into the constructor even
though it already has the proper call!!!

I haven't noticed this, but...

In general the IDE should NEVER add code to a method. This is a
disaster waiting to happen since if you don't catch it, it can
cause the code to fail. Modifying code should only be done by the
developer.

I do agree with this.  I think there's no harm in *creating* a new
method with some default code -- for example, if you're adding a Window
constructor, it's very useful to have Super.Window in there, with the
comment that without this then Open events will not fire. But once the
method is created, it should never be mucked with by the IDE again.

If code is being added to an existing method, I suspect that this is
simply a bug, and the guys at RS will be eager to fix it if they can
pin it down.

Of course we have no way of knowing whether it is a bug, but I am able to produce the following behavior. Given a class A and a subclass B, add a method Constructor() to A. Then add a method X to B --

Sub X()
  dim s as String
End Sub

Now change the name of X to 'Constructor'; the IDE does this --


Sub Constructor()
  // Calling the overridden superclass constructor.
  Super.Constructordim s as string
End Sub


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>

Reply via email to