On Jun 3, 2007, at 7:03 AM, Tal Einat wrote:
> First off, I'd like to say that I really like what I've been seeing
> so far! Keep up the good work! Dabo seems like a project I will be
> glad to use, and contribute to, in the future.
Glad to have you on board!
> One of the things I like about Dabo is the naming conventions. You
> chose some good names for properties and use them all across the
> framework - which really does mean less need to consult manuals and
> references all of the time.
>
> However, one design decision (which is also a naming convention)
> troubles me - the FontSize, FontFace, FontBold, etc. properties.
> Why not have a Font object, which has Weight, Face, Size, etc.
> properties?
We do - the base class is dFont, and every control that has a
displayed font uses this. The separate Font* properties are
convenience properties; many times you just want to bump up the font
size to 16 points, but leave the rest. Which code is simpler:
fnt = obj.Font
fnt.Size = 16
obj.Font = fnt
-or-
obj.FontSize = 16
Normally in Dabo most people would use the second example, but when
they do, "behind the scenes" in the framework the first is actually
what is done.
> That would seem more intuitive to me - changing the properties of
> the font, rather than each object having a separate property for
> each font characteristic. Such a design would also allow simple
> copying of fonts from one object to another, which can be useful.
>
> I imagine you made this design decision after some thought, so I'd
> be interested to hear the rational behind it.
Simple things should be simple, but complex things should not be too
difficult, either.
Let's say you had a label and a text box, and wanted them to have
the same font qualities. So you create a dFont instance, set it the
way you want, and then write:
lbl.Font = txt.Font = myFontInstance
Then later in the code you write:
lbl.FontSize = 20
Since both objects use the same font object, the textbox will *also*
change to 20 points. Cool, huh?
> P.S. If there's a mailing list / newsgroup where posting this would
> be more appropriate, point me there...
The dabo-users list is the best place for discussions like this on
using the framework. I've taken the liberty of forwarding your
original message there and then replying to it there, so that others
can also learn something about the inner workings of Dabo.
You can sign up for the list at: http://leafe.com/mailman/listinfo/
dabo-users
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]