# Class Extensions possible error

**URL:** <https://discourse.processing.org/t/class-extensions-possible-error/18148>\
**Category:** Beginners\
**Created:** [February 26, 2020, 4:10pm UTC](https://discourse.processing.org/t/class-extensions-possible-error/18148 "2020-02-26T16:10:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [February 26, 2020, 4:10pm UTC](https://discourse.processing.org/t/class-extensions-possible-error/18148/1 "2020-02-26T16:10:20Z")

</div>

Just wandering if this is a bug.

I have a constructor called tab.

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/66963fb9adc3255043c1ddaa19a8edadd04cc0d8.png)

then I have created a horizontal tab constructor which extends tab

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/81bc9171f548517f678d8ddcdbc4553d692a01e3.png)

This class works seemingly fine but when I use the following constructor

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c3671b79040c849ebadf6efd2ca9f2aab40a4248.png)

I am able to call it both using horizontaltab and tab;

This constructor takes a prebuilt horizontal tab as a parameter to mimick its current tab structure.

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1e808fb6264cd6fad89e8dd5900421d122c1a9dd.png)

this gives me no error when initialized, however obviously causes problems later, as I cannot call functions associated with the horizontal tabs.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [February 26, 2020, 4:28pm UTC](https://discourse.processing.org/t/class-extensions-possible-error/18148/2 "2020-02-26T16:28:31Z")

</div>

[Processing.org/reference/super.html](http://Processing.org/reference/super.html)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 26, 2020, 7:04pm UTC](https://discourse.processing.org/t/class-extensions-possible-error/18148/3 "2020-02-26T19:04:57Z")

</div>

Hey @paulgoux – so glad this was resolved with `super()`!

(Just a reminder for the future that in general we request that people paste code blocks or link to an online sketch / repo – not screenshots.)
