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

VID actors syntax errors are not caught #5488

Open
hiiamboris opened this issue Feb 23, 2024 · 0 comments
Open

VID actors syntax errors are not caught #5488

hiiamboris opened this issue Feb 23, 2024 · 0 comments
Assignees
Labels

Comments

@hiiamboris
Copy link
Collaborator

Describe the bug

I believe it took @luce80 quite an effort to reduce unexpected VID behavior to this little snippet:

system/view/VID/styles/my-style: [
	template: [
		type: 'base
		actors: [
			1 + 1
			ON-CREATE: func [face][]
		]
	]
]
view [my-style on-time []]

Which when run outputs:

*** Script Error: ON-CREATE: needs a value
*** Where: ON-CREATE
*** Near : ON-CREATE:
*** Stack: view layout fetch-options context 

Assumption source:

red/modules/view/VID.red

Lines 482 to 484 in 5521b51

foreach [name f s b] face/actors [
unless find actors name [repend actors [name f s b]]
]

Root issue: red/REP#132

Expected behavior

Either no assumptions on object source code, or explicit declaration of the format and a runtime check with helpful error message.

Platform version

-----------RED & PLATFORM VERSION----------- 
RED: [ branch: "master" tag: #v0.6.4 ahead: 5120 date: 13-Feb-2024/12:12:43 commit: #f519e8a6d1a6203acd3e808654417b35d23e6dc1 ]
PLATFORM: [ name: "Windows 10" OS: 'Windows arch: 'x86-64 version: 10.0.0 build: 19044 ]
--------------------------------------------
@hiiamboris hiiamboris added the GUI label Feb 23, 2024
@dockimbel dockimbel self-assigned this Feb 25, 2024
@dockimbel dockimbel changed the title VID actors format assumption got its first victim VID actors syntax errors are not caught Feb 26, 2024
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