V5 Wish List

 From:  Larry Fahnoe (FAHNOE)
10114.448 In reply to 10114.447 
> Hi Larry, re: object dump method - if you could give a more complete spec of exactly what output you would want that would help.

Hi Michael,

Not knowing what’s inside "the box" makes it challenging to provide a more complete spec, hence my explanation of how I’d make use of whatever info could reasonably be provided. So, guessing at the box’s contents, perhaps something along the lines of:

code:
object type: MoI object class/subclass name, e.g. ObjectList or curve
    object properties:
        name: value (perhaps RO, or RW)
        […]
    object methods: (this is maybe too much to suggest)
        name: brief parameter description
        […]


I’m thinking that this sort of information would be used in the context of moi.ui.alert() or moi.log() and would be intended to help someone writing a script diagnose issues while debugging. I think this helps to address a class of mistakes that arise from a misunderstanding of the object model. Perhaps there are other attributes that might make sense in this context.

As an example of where a dump tool might help: I kept getting “calculation failed” from my attempts to use the offset factory and after a bunch of flailing about the lightbulb finally came on: I was passing in a drawing object as input 0 when offset expects an ObjectList. I had been convinced (and thus focused on) that I was not passing input 2 (the offset point) properly instead of realizing that I’d provided the wrong object type. Having (and using!) a dump tool would have exposed my mistake.

Perhaps such an effort is a step toward some future enhanced scripting environment; my intention is to suggest work that ideally benefits your future aims while providing value for users who are trying to write and debug their scripts. Maybe V5 provides some beneficial low hanging fruit, but V6 expands upon it as you see fit; the output of the dump would grow and change as MoI evolves.

--Larry

EDITED: 7 Dec 2022 by FAHNOE