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

Script Buttons Should Not Be Added If Their Code Cannot Compile #84

Open
tbpassin opened this issue Dec 21, 2023 · 7 comments
Open

Script Buttons Should Not Be Added If Their Code Cannot Compile #84

tbpassin opened this issue Dec 21, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@tbpassin
Copy link

I noticed that when I open an outline, I see buttons that I've defined in myLeoSettings.leo. But they don't work since they contain Python code that works with Leo. Also, the right-click goto Script does not work with them.

These buttons should not be shown.

@boltex boltex self-assigned this Dec 23, 2023
@boltex boltex added the enhancement New feature or request label Dec 23, 2023
@boltex
Copy link
Owner

boltex commented Dec 23, 2023

Thanks for this. I'll look into it.

The 'goto script' that does not lead to the nodes is weird... Does it also do that for newly created buttons? (with the '+ script-button' button?) Or just with buttons created upon loading the file?

@tbpassin
Copy link
Author

I don't know about buttons created by the "script-button" button. I know that the goto script capability works for buttons created by @button nodes.

@boltex
Copy link
Owner

boltex commented Dec 24, 2023

@tbpassin

I'm not sure I understand this issue. I'm not aware of many of Leo's possible usage, so this might be one of those instance where someone uses Leo in a way that I'm totally unaware of... and so, I don't see what is happening from such a short issue description.

Can you restate what the issue is in a much more verbose way, and provide more context, screenshots and sample file, or sample code?

@boltex
Copy link
Owner

boltex commented Dec 24, 2023

@tbpassin Oh! I see what you mean: buttons in myLeoSettings file can also be child of an at buttons (plural) to be seen in all opened files. and the goto-script should open it and focus on the button.
image

Thanks again for this issue! :)

@tbpassin
Copy link
Author

Yes, just so.

@boltex
Copy link
Owner

boltex commented Jan 15, 2024

@tbpassin The part about goto-script for script originating in @buttons (plural) in myLeosettings is now fixed in the latest beta version 0.2.10

Also, the part about not running if the code is python is being fixed in #74 (branch 'boltex/issue/74 )

I'll close this issue when #74 is released in the next version (likely 0.2.11)

@boltex
Copy link
Owner

boltex commented Jan 18, 2024

@tbpassin I'll leave this opened, as you requested to try to 'compile', instead of just detecting the @language in effect. (which I added in latest 'dev' commits of #74)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants