Closed rumblesan closed 7 years ago
@davidedc I'm currently making the assumption here that an "empty" sketch is one that's comprised only of comments and white space. You mentioned in #142 about the edge case of supporting non-rendering sketches, but I'm not sure that's something worth supporting currently.
yeah if detecting non-rendering code doesn't fit the solution easily, let's not do it
it's not necessarily that it's difficult to do, more that I don't think it's worth supporting. I think that the best example of non-rendering code is for straight audio sketches, but even then LCL is "doing something" so having some form of stats up still seems reasonable.
yes you are right, we'd also have to check if a "play" command is issued, not just graphical commands.
But let's keep it simple, let's do as you say, it's not worth the additional complication even if it's just one flag.
fair enough. One thing is that currently the livelangv1 compiler only checks if a sketch is totally comprised of white space, it doesn't handle comments, so a sketch of just comments still displays the stats.
Shouldn't be too tricky to update the regexp checker though I think
right, got it, and with a test as well :)
This PR cleans up a few things around the stats widget.
fixes #142 fixes #146