Friday, April 9, 2010

Debug View Improvements

There are a lot of things that work transparently in the back of the scene in NaroCAD and things things may pin down lot of problems much easier.
The core component that should work flawless and to expose things that developers work is the Document tree. This should store the right data in the right way. Sometimes it may happen just to not do it. The constraints work in the previous week show some flaws that some constraints override the values of other constraints. NaroCAD from old times have some code to show and debug internal structures named by developers as "Output Debug". This code was fairly old but did work nicely in most cases, and it need some love. It does expose some problems like the crashing Dimension as it store in a wrong way some data. (Don't play with dimension, the actual version does crash for this reason and please wait the future version to get those fixes).
This tree can be playable for a 3 shape test, (NaroCAD did create sometimes lot of shapes, some of them invisible) but it will not work nice from developer standpoint when are more than 5 shapes as you need scrollong. Why? Look on the photo. On the left the OutputDebug form shows the the initial rectangles that NaroCAD starts and what is it's full representation.
This code was vastly cleaned up and things are much cleaner and you can see this on the right.
What it does better? It will trim the attributes that have no extra arguments and compact the view with that. Also write the shorter name that have more meaning that full reflected name. (like: Naro.Infrastructure.Interface.IntegerInterpreter instead of Integer). Also for shapes is exposed its relevant information instead of exposing its attributes that describe it.

No comments: