# AcceptFileDrop and other methods

**URL:** <https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760>\
**Category:** General\
**Created:** [October 12, 2018, 4:43pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760 "2018-10-12T16:43:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [October 12, 2018, 4:43pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/1 "2018-10-12T16:43:35Z")

</div>

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?

```auto
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

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [October 12, 2018, 6:07pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/2 "2018-10-12T18:07:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [October 12, 2018, 6:23pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/3 "2018-10-12T18:23:53Z")

</div>

[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?

```auto
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.

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [October 12, 2018, 6:32pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/4 "2018-10-12T18:32:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [October 12, 2018, 6:41pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/5 "2018-10-12T18:41:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jason\_Parsley](https://forum.xojo.com/user_avatar/forum.xojo.com/jason_parsley/32/152_2.png) [@Jason\_Parsley](https://forum.xojo.com/u/Jason_Parsley)\
**Post date:** [October 12, 2018, 6:42pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/6 "2018-10-12T18:42:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:24pm UTC](https://forum.xojo.com/t/acceptfiledrop-and-other-methods/45760/7 "2020-10-29T19:24:56Z")

</div>


