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

Add blockly for getEnums #1379

Open
klein0r opened this issue Aug 12, 2023 · 3 comments
Open

Add blockly for getEnums #1379

klein0r opened this issue Aug 12, 2023 · 3 comments
Assignees
Labels

Comments

@klein0r
Copy link
Collaborator

klein0r commented Aug 12, 2023

Describe the solution you'd like

e.g. return all room or function names:

return getEnums('rooms').map(room => typeof room.name === 'object' ? room.name.de : room.name);
@klein0r klein0r self-assigned this Aug 12, 2023
@TDCroPower
Copy link

please add this as a simple blockly.
i use actually this in an js-function...
let room = getObject(ObjectID, 'rooms').enumNames[0]; return room.de;
.. for the room name

and this...
return getObject(ObjectID).common.name;
... for Object name

but is very buggy in the version 7.7.0

@klein0r
Copy link
Collaborator Author

klein0r commented Jan 24, 2024

but is very buggy in the version 7.7.0

Was is buggy? Do you have an example?

@TDCroPower
Copy link

Ich wechsel mal auf Deutsch, da du es ja verstehst ;).
Hat mich gestern einiges an Nerven gekostet der Bug aber ich konnte ihn am Ende dann doch reproduzieren.

Wenn man ein Block "JS-Function mit Ergebnis" einbaut und per Zahnrad eine Variable zuordnen will gibt es einen nervigen Bug.
Setzt man den Variablen Namen links bevor man ihn rechts unterhalb von Parameter hängt, bekommt man eine "ReferenceError: VARIABLE is not defined" Meldung und es funktioniert nicht.
Schiebt man die Variable zuerst rechts an das Parameter und benennt diese erst dort um, funktioniert es dann korrekt.

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

No branches or pull requests

2 participants