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
I'm trying to use -webide-representation to display the values of a parameterized type. My guess is that it isn't supported, but I was kind of hoping there might be a way to make it work -- it's similar but not identical to the example using MACH-O on the website. My type definition is:
Parse error (TypeError): Cannot read properties of undefined (reading 'ksyType')
Call stack: TypeError: Cannot read properties of undefined (reading 'ksyType')
at ParsedTreeHandler.reprObject (https://ide.kaitai.io/js/v1/parsedToTree.js:81:35)
at https://ide.kaitai.io/js/v1/parsedToTree.js:119:65
at Array.map (<anonymous>)
at https://ide.kaitai.io/js/v1/parsedToTree.js:119:48
at [Symbol.replace] (<anonymous>)
at String.replace (<anonymous>)
at ParsedTreeHandler.reprObject (https://ide.kaitai.io/js/v1/parsedToTree.js:85:45)
at ParsedTreeHandler.childItemToNode (https://ide.kaitai.io/js/v1/parsedToTree.js:145:33)
at https://ide.kaitai.io/js/v1/parsedToTree.js:189:70
at Array.map (<anonymous>)
at ParsedTreeHandler.exportedToNodes (https://ide.kaitai.io/js/v1/parsedToTree.js:189:48)
at https://ide.kaitai.io/js/v1/parsedToTree.js:267:34
My assumption is that the representation generation is being called before the type gets added as a property on the object by the switch statement, but perhaps that's wrong. I've tried a few different things, like using {value[0]} and whatnot, but it didn't quite work. Any ideas, or will this just require efforts along the same lines as kaitai-io/kaitai_struct#1073 ? Thanks!
The text was updated successfully, but these errors were encountered:
Parse error (TypeError): Cannot read properties of undefined (reading 'ksyType')
So if wrapping the item type to user-defined type is acceptable for you, it seems to work around the problem.
generalmimon
changed the title
-webide-representation of parameterized types-webide-representation doesn't work for arrays of primitive values
Nov 12, 2023
I'm trying to use
-webide-representation
to display the values of a parameterized type. My guess is that it isn't supported, but I was kind of hoping there might be a way to make it work -- it's similar but not identical to the example using MACH-O on the website. My type definition is:When it parses, it throws this error:
My assumption is that the representation generation is being called before the type gets added as a property on the object by the
switch
statement, but perhaps that's wrong. I've tried a few different things, like using{value[0]}
and whatnot, but it didn't quite work. Any ideas, or will this just require efforts along the same lines as kaitai-io/kaitai_struct#1073 ? Thanks!The text was updated successfully, but these errors were encountered: