Skip to content

Sender forced to use IDs in 1.9.1 #2122

Description

@ChabaneAmaury

Version of Dear PyGui

Version: 1.9.1
Operating System: Windows 10

My Issue/Question

Version 1.9.1 introduced a bug when triggering a callback. The sender is not returned the custom tag (if any), but the id instead. This force us to update the entire code to add get_item_alias to allow us to use custom tags on the sender (we use tags for naming conventions making it easier to go deeper i the objects procedurally)

To Reproduce

Steps to reproduce the behavior:

  1. Use version 1.9.0
  2. Execute the code below and click on the button (see how the tag is 'windowTuto')
  3. Install version 1.9.1
  4. Do the same as before (see how it is the ID now)

Expected behavior

Sender should return the custom tag as in 1.9.0.

Standalone, minimal, complete and verifiable example

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="tutorial", tag="windowTuto") as window:
    dpg.add_button(label="Press me", callback=lambda s: print(s))

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions