Giter VIP home page Giter VIP logo

Comments (11)

veksha avatar veksha commented on July 26, 2024

fixed crash. please try again.

from cuda_exterminal.

Alexey-T avatar Alexey-T commented on July 26, 2024

new error

Python 3.8.10
Startup: 180ms, plugins: 0ms ()
Init: cuda_example_terminal
Init: cudatext
Traceback (most recent call last):
  File "/home/user/cuda/cuda/app/py/cudatext.py", line 1232, in _dlg_proc_callback_proxy
    return _live[info](id_dlg, id_ctl, data=data)
  File "/home/user/cuda/cuda/app/py/cuda_example_terminal/terminal.py", line 247, in form_key_down
    if is_toggle_focus_hotkey(key, data):
  File "/home/user/cuda/cuda/app/py/cuda_example_terminal/terminal.py", line 479, in is_toggle_focus_hotkey
    for hotkey in get_hotkeys('toggle_focus'):
TypeError: 'NoneType' object is not iterable
ERROR: Exception in CudaText for cudatext._dlg_proc_callback_proxy: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/home/user/cuda/cuda/app/py/cudatext.py", line 1232, in _dlg_proc_callback_proxy
    return _live[info](id_dlg, id_ctl, data=data)
  File "/home/user/cuda/cuda/app/py/cuda_example_terminal/terminal.py", line 247, in form_key_down
    if is_toggle_focus_hotkey(key, data):
  File "/home/user/cuda/cuda/app/py/cuda_example_terminal/terminal.py", line 479, in is_toggle_focus_hotkey
    for hotkey in get_hotkeys('toggle_focus'):
TypeError: 'NoneType' object is not iterable
ERROR: Exception in CudaText for cudatext._dlg_proc_callback_proxy: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/home/user/cuda/cuda/app/py/cudatext.py", line 1232, in _dlg_proc_callback_proxy
    return _live[info](id_dlg, id_ctl, data=data)
  File "/home/user/cuda/cuda/app/py/cuda_example_terminal/terminal.py", line 247, in form_key_down
    if is_toggle_focus_hotkey(key, data):
  File "/home/user/cuda/cuda/app/py/cuda_example_terminal/terminal.py", line 479, in is_toggle_focus_hotkey
    for hotkey in get_hotkeys('toggle_focus'):
TypeError: 'NoneType' object is not iterable
ERROR: Exception in CudaText for cudatext._dlg_proc_callback_proxy: TypeError: 'NoneType' object is not iterable

from cuda_exterminal.

veksha avatar veksha commented on July 26, 2024

they only reason i need this code is for checking if I press hotkey for "toggle focus terminal/editor" command.
because for some reason hotkeys are not working in bottom dock panel. except for Console/Output/Validate panels.

What should I do to make hotkeys work in bottom panel for plugins?

from cuda_exterminal.

Alexey-T avatar Alexey-T commented on July 26, 2024

when bottom-panel is docked, hotkeys are going to main form (Cud) , not to your form, so i guess you won't get on_key events.

from cuda_exterminal.

Alexey-T avatar Alexey-T commented on July 26, 2024

maybe change for hotkey in get_hotkeys('toggle_focus'):
to
for hotkey in (get_hotkeys('toggle_focus') or []):

from cuda_exterminal.

veksha avatar veksha commented on July 26, 2024

when bottom-panel is docked, hotkeys are going to main form (Cud) , not to your form, so i guess you won't get on_key events

no. the problem is opposite. on_key events work normally (without them terminal cannot work).
when I return not False from on_key events I expect they go to Cud. but that not happens.

from cuda_exterminal.

veksha avatar veksha commented on July 26, 2024

maybe it's failing for you because your folder is still "cuda_example_terminal".
there is a check in get_hotkeys: cmd['p_module']=='cuda_exterminal'

(it is using PROC_GET_COMMANDS api.)

from cuda_exterminal.

veksha avatar veksha commented on July 26, 2024

get latest fix and try again, please.

from cuda_exterminal.

veksha avatar veksha commented on July 26, 2024

I would remove all this PROC_GET_COMMANDS code if I will find the way to pass hotkeys to main Cud form from docked panel.

from cuda_exterminal.

Alexey-T avatar Alexey-T commented on July 26, 2024

Yes it was old folder name
Fixed

from cuda_exterminal.

Alexey-T avatar Alexey-T commented on July 26, 2024

IDK how to improve hotkeys yet

from cuda_exterminal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.