[Fixed] Bug in Anvil's custom component event handling

What I’m trying to do:

I created a custom component. (Well, many, actually, but that’s a separate topic. :wink:) Component included an event, did_this.

I developed for awhile, adding event handler did_this_handler to the form that contained the custom component. All was good.

On further development/debugging, I refactored the component to remove did_this and use instead the superior event did_this_instead

Like a good Anvil component, only did_this_instead pops up as an event I can capture in the IDE. I cleaned up my code, deleting now obsolete event handler, etc.

What I’ve tried and what’s not working:

Each time I ran the code I got persistent whiny error messages like this:
Warning: XX.did_this_handler does not exist. Trying to set the ‘did_this’ event of self.yy from XX.

Fix

I re-added the event to the component and deleted the assigned handler. (Then deleted the event.) But really, shouldn’t Anvil clean up this ghost event handler assignment when the event was removed from the component?

  • Heidi
1 Like

Thanks for reporting. We’ve added it to our list.

3 Likes

Thanks for the fix @stucork & Anvil Team!!! :heart: :heart: :heart: :heart: :heart: