[V4Rb 2] Constructor overriding problem
Charles Yeomans
yeomans at desuetude.com
Fri Jun 3 11:03:20 CDT 2005
On Jun 3, 2005, at 12:58 AM, Ruslan Zasukhin wrote:
> On 6/3/05 3:27 AM, "Charles Yeomans" <yeomans at desuetude.com> wrote:
>
> Hi Charles,
>
>> I've encountered an interesting little problem. I'd like to override
>> the VDatabase constructor for creating a remote db object, but I
>> can't,
>> because REALbasic doesn't believe that VDatabase has such a
>> constructor. It only sees the local db constructor (whose name should
>> be changed to "Constructor" to conform to the way REALbasic works
>> now).
>
> Well, I think it is task of REALbasic correct work with
>
> ClassName = Constructor issue.
I think REALbasic has it correct and working. My suggestion is that
constructors should now be named "Constructor".
>
> About first problem:
> can you show some code what you do ?
> or send small project
The code is quite simple. Define a subclass QMDatabase of VDatabase.
Then add the following method.
Sub Constructor(inHost as String, inUserName as String, inUserPassword
as String, inPort as Integer=15432, inTimeOut as Integer=60, inOptions
as String="")
Super.VDatabase(inHost as String, inUserName as String,
inUserPassword as String, inPort as Integer=15432, inTimeOut as
Integer=60, inOptions as String="")
//subclass code to create VTable objects here
End Sub
REALbasic doesn't believe that there is such a method as
Super.VDatabase with this signature; it only claims to know about the
other VDatabase constructor.
--------------
Charles Yeomans
More information about the Valentina
mailing list