Hi all,
I wanted to briefly highlight an area that could use some pervasive, casual, whenever-you're-in-there-anyway improvement: toString methods. These are used in a lot of automatic debugging, so when they're bad they're frustrating and when they're good they can be life savers.
A lot of classes have no toString and use the default "ClassName:sc####", and could be more descriptive. SC.LabelView for example could append the first short snippet of its displayTitle. Controllers could append the toString of their content.
Some classes have eye-bleeding ones like SC.Record's, which stringifies the entire attribute hash and spits it out (a potentially gigantic string). Instead maybe it would be useful to have the SC ID, the store ID and the store key.
Tweaking or adding toString methods is super easy: it's simple code, there's no performance consideration, and nothing depends on them (or at least nothing should). It's not a critical change so it can happen whenever you're in a file for another reason, or whenever you feel like it. Thoughts? Any general reason that this is a bad idea?
Happy Friday,
Dave