# Pluto.jl - How do I dispatch to a subtype created in a notebook?

**URL:** <https://discourse.julialang.org/t/pluto-jl-how-do-i-dispatch-to-a-subtype-created-in-a-notebook/124162>\
**Category:** General Usage\
**Tags:** question, dispatch, struct, pluto\
**Created:** [December 24, 2024, 11:01pm UTC](https://discourse.julialang.org/t/pluto-jl-how-do-i-dispatch-to-a-subtype-created-in-a-notebook/124162 "2024-12-24T23:01:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [December 25, 2024, 1:12am UTC](https://discourse.julialang.org/t/pluto-jl-how-do-i-dispatch-to-a-subtype-created-in-a-notebook/124162/2 "2024-12-25T01:12:02Z")

</div>

The problem is the definition of the method `sound` in the notebook. See this section of the manual: [Modules · The Julia Language](https://docs.julialang.org/en/v1/manual/modules/#using-and-import-with-specific-identifiers,-and-adding-methods)

The code in the linked notebook defines a new function Main.sound rather than implementing a new method for ProblematicAnimals.sound. You have two choices to fix it, the easiest is to fully qualify the name when defining the new method.

```
ProblematicAnimals.sound(pig::Pig) = "oink"

```

The other is to import that method as described in the manual in the block at the top of the notebook.

---

_[View the full topic](https://discourse.julialang.org/t/pluto-jl-how-do-i-dispatch-to-a-subtype-created-in-a-notebook/124162)._
