On Wednesday, April 5, 2017 at 12:10:51 PM UTC-5, Edward K. Ream wrote: Thinking about this in the shower I realized that all the troubles arose > from the desire to eliminate duplicate code. >
A cff reveals that only three methods call ic.createOutline. Two are in the atFile read logic: at.readOneAtAutoNode and at.importAtShadowNode. Presumably these do approximately the same things: restore *existing* @auto or @shadow nodes. But maybe they too create top-level nodes. The other call is ic.importFilesCommand. It needs to *create *a new top-level node. Depending on context, all three methods implement undoable commands. The undo logic seems to be the reason why code is shared. Because there are so many flags involved, it's difficult to know exactly what the calls do. Traces should reveal that. Imo, the keyword args are not the primary culprits. Indeed, new keyword args may simplify and clarify matters. What we want are are *simple* if statements, depending on at most one keyword arg. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
