Overloading property vs. non-property
dsimcha
dsimcha at yahoo.com
Thu Jul 15 08:42:28 PDT 2010
== Quote from torhu (no at spam.invalid)'s article
> In case the answer is no, that example of yours is the perfect
> opportunity to dust off the almost-forgotten with statement :)
> with (Histogram(someData, 10)) {
> barColor = getColor(255, 0, 0);
> histType = HistType.Probability;
> toFigure.title = "A Histogram";
> xLabel = "Stuff";
> showAsMain();
> }
> A bit more typing, but I'd say that it's easier to read.
But toFigure returns a Figure, not this. The idea is that you'd set all the
properties for the Plot, then put toFigure somewhere in your chain, then set all
the properties for the Figure.
More information about the Digitalmars-d
mailing list