[V4RB] fields
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Feb 11 21:10:43 CST 2003
on 2/11/03 8:01 PM, Pedro fp at lists at pedro.net.au wrote:
Hi Pedro,
> I have sub-classed some Valentina filed classes so that I can give them
> a couple of extra properties. Currently each sub-classed field has a
> method setExtras which simply assigns the parameters passed to the
> extra properties like this ...
>
> fSeqTop = new P2VVarChar( "seqTop", 504, "ASCII", kv_Nullable )
> fSeqTop.setExtras( "Top", true )
>
> If possible I would prefer to give my sub-classes constructors so that
> those 2 lines would become ...
>
> fSeqTop = new P2VVarChar( parameter list )
>
> Is this possible?
This MUST be possible from OO point of view.
But I recall that about 2 years ago somebody have try subclass in this way
Cursors...and fail because of bug in REALbasic, which prevent correct sub
classing of plugin classes.
May be this bug already fixed.
I just don't know. So try to see.
> If so can anyone offer tips as to how I set the field
> properties within the constructor of my sub-class?
Just an idea, this is NOT correct syntax of RB!
You need look into RB docs for correct syntax how to create ctor of
subclass.
MyClass( .. )
VVarChar( name, ... )
p1 = ..
p2 = ...
end
> Also, I have group of fields which are the same except for their names.
> Could I declare a field property in my BaseObject as an array &
> construct those fields in a loop?
I think yes, no problems here.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list