Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source flag does not accept str in multiple widgets #1181

Closed
NickelLiang opened this issue Aug 17, 2021 · 1 comment
Closed

source flag does not accept str in multiple widgets #1181

NickelLiang opened this issue Aug 17, 2021 · 1 comment
Labels
state: ready Fixed/Added and will be present in an upcoming release

Comments

@NickelLiang
Copy link

Version of Dear PyGui

Version: 0.8.62
Operating System: macOS Big Sur 11.4

My Issue/Question

source flag does not work with multiple widgets if you pass in an str instead of int
Error thrown: SystemError: <built-in function add_drag_int> returned a result with an error set

To Reproduce

Steps to reproduce the behavior:

  1. Run example code, if you use int as source id, it works fine
  2. Uncommend code under "These does not work", if you use str as source id, it does not work
  3. See error

Expected behavior

source flag should accept both str and int

Screenshots/Video

pass

Standalone, minimal, complete and verifiable example

import dearpygui.dearpygui as dpg

dpg.setup_registries()

with dpg.window() as window:
    id_int_val = dpg.add_int_value(id='int_val', default_value=50)

    # These works
    dpg.add_button(label='+5', callback=lambda:dpg.set_value('int_val', value=dpg.get_value('int_val')+5))
    dpg.add_drag_int(source=id_int_val)
    dpg.add_drag_int(source=dpg.get_alias_id('int_val'))
    dpg.add_slider_int(source=id_int_val)
    dpg.add_input_int(source=id_int_val)

    # These does not works: SystemError: <built-in function add_drag_int> returned a result with an error set
    # dpg.add_drag_int(source=dpg.get_item_alias(id_int_val))
    # dpg.add_drag_int(source='int_val')
    # dpg.add_slider_int(source='int_val')
    # dpg.add_input_int(source='int_val')

dpg.start_dearpygui()
@hoffstadt
Copy link
Owner

Yep. Fixed in next release.

@hoffstadt hoffstadt added the state: ready Fixed/Added and will be present in an upcoming release label Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: ready Fixed/Added and will be present in an upcoming release
Projects
None yet
Development

No branches or pull requests

2 participants