Overriding methods

I have a listbox subclass that adds property arrays that need to be synchronized with the standard list and row tags. To do this I need to override some of the standard methods. For example, my AddRow(value) is:
super.AddRow(value) // update standard item list
AuxList.Append(dummy) // update subclass property
// do other stuff with AuxList

I need to override RowTag(), for which the syntax is: RowTag(i) = value. My version would be like:
super.RowTag(row) = ???
AuxRowTag(row) = dummy
// do something with AuxRowTag

Problem: How do I capture the value parameter (???). It doesn’t seem to be available in the method editor.
Workaround: Change the syntax to RowTag(i, value). This would force a rewrite of existing code.

Any suggestions?

I’ve read your post a few times, and am not sure what you are asking?

are you saying “super.RowTag(row)=value” creates an error?

technically RowTag is an overloaded function in the Listbox class

Function RowTag(row:Integer) as Variant
Sub RowTag(row:integer, assigns newValue as Variant)

When you add a method to a subclass, go to the method name field and on the right is a drop down menu button. Click that and it’ll list all the methods for overriding, and select one to fill out the whole signature.

For RowTag on Listbox fills out as

[code]Public Function RowTag(row As Integer) as Variant

Public Sub RowTag(row As Integer, Assigns _value As Variant)[/code]

Assigns is probably a keyword you’re not familiar with yet. That’s where the ??? comes through.

and don’t get OVERRIDE and OVERLOAD confused…

Override means to perform a newly defined action instead of the default action.

OverLoad means to ADD a new way of calling the method/function, and requires the signature be different than the orignal

The examples Will and I showed, illustrate OVERLOAD, since there is a FUNCTION and a SUB with the same name

Thanks for the input. In my example, I was overriding the base class AddRow method (same name & signature, different behavior). I didn’t use the method name drop down, so I didn’t realize there was an overloaded subroutine (same name, different signature) for the RowTag function. It looks like “assigns” is what I was missing. Thanks again!