AcceptFileDrop and other methods

I have been using Xojo for many years… and 99% of the time when I add a method… I give it a name and add the code etc.

The only time I have really used the dropdown menu in the Inspector, was for adding Constructor methods.
I just realized there are dozens of other “pre-defined” methods there as well.

But most of them are not mentioned in the LR as “methods”

Example.
AcceptFileDrop, this is used as “me.AcceptFileDrop(imgtype)”
but it can be added as a METHOD as well?

Public Sub AcceptFileDrop(type As String)
  // what would go here?
End Sub

This is just one of dozens of things that I saw… all of which would be used as in the first example, and not (or I have never) used in the second example

If you’re adding a method to a window, it would make sense that the window class methods would be in the dropdown so you can override them. I’m not sure why you would want to, but it’s legit. I wouldn’t expect them to show up in a module, however.

[quote=409571:@Dave S]I have been using Xojo for many years… and 99% of the time when I add a method… I give it a name and add the code etc.

The only time I have really used the dropdown menu in the Inspector, was for adding Constructor methods.
I just realized there are dozens of other “pre-defined” methods there as well.

But most of them are not mentioned in the LR as “methods”

Example.
AcceptFileDrop, this is used as “me.AcceptFileDrop(imgtype)”
but it can be added as a METHOD as well?

Public Sub AcceptFileDrop(type As String)
  // what would go here?
End Sub

This is just one of dozens of things that I saw… all of which would be used as in the first example, and not (or I have never) used in the second example[/quote]
I’m guessing that this is a scenario where you are subclassing another control. In that case, the menu shows you the list of public and protected methods from the super (and it’s supers) and their signatures so you can override them if you want to.

Actually no… I dragged a bevel button, went to add a method. hit the drop-down by mistake and saw a boat load of items… I know what they all are… just wondered why (other than constructor/destructor) they would be “available”

for a subclass, ok that makes sense… but not for a “base” control?

If you dragged a bevelbutton onto the window and then added a method, then you’re adding a method to the window, which is basically a subclass.

They’re available to override because there’s no such thing as final methods in Xojo so if its a declared public method a subclass can override it. There’s no mechanism to prevent that.