You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever a custom datatype such as the following is rendered in the program:
data Posn:
| posn(x :: Number, y :: Number)
| nice(s :: String)
end
The block node of the title of the datatype "Posn" is rendered as "blocks-node-undefined" with an undefined id, and consequently clicking on the name also crashes the program. The workaround currently is to instead render the title using the String of the title instead. The tradeoff is that custom datatype names are currently uneditable.
The relevant constructor is the class Data in "ast.tsx" and the class s-data in "PyretParser.ts"
The text was updated successfully, but these errors were encountered:
Fixed by re-implementing the Nodes.Literal rendering and changing Spec.value('name') to Spec.required('name') in the body of the Data AST Node.
However, the problem was that because the spec for the property was value, the block was being rendered with no id since it wasn't being assigned in AST.annotateNodes() in CodemirrorBlocks (since I assume that value tells it that it is not an AST node), which leads me to suggest maybe a check somewhere to catch undefined id prior to render and throw a more precise error. Otherwise, this appears relatively mystic and strange to debug.
Whenever a custom datatype such as the following is rendered in the program:
The block node of the title of the datatype "Posn" is rendered as "blocks-node-undefined" with an undefined id, and consequently clicking on the name also crashes the program. The workaround currently is to instead render the title using the String of the title instead. The tradeoff is that custom datatype names are currently uneditable.
The relevant constructor is the class Data in "ast.tsx" and the class s-data in "PyretParser.ts"
The text was updated successfully, but these errors were encountered: