On Sun, Mar 6, 2011 at 3:20 PM, leledumbo <leledumbo_c...@yahoo.co.id> wrote: > Maybe for the programmer of the unit, but for the users, it's almost always a > disadvantage. They will get unexpected behavior instead (especially if you > put it along with other things in the unit where one might need some of > them).
This "hack" is used in a company when I worked before. So, all programmer did know about it. Nobody got unexpected behavior. > Open LCL sources and see how its components are named. There are no pattern in LCL sources. Some components have a prefix, some not... > For your "advantage" case, I would give something like TColorEdit. Your > proposal has > an advantage of changing a component behavior just by changing the uses > clause, that's also possible with the current situation. Example: > > uses > StdCtrls,ColorEdit; > > type > TEditCtrl = TEdit; > > ... // use TEditCtrl everywhere > > when you want to change to TColorEdit, just change TEditCtrl definition to > TColorEdit. Same type-savings as your proposal. You din't understand at all. The TEdit class is already used in all sources. This hack provides a big change with a few lines code. This hack is used in programs that already exists. To new programs we use a new widget, of course (or not =). Marcos Douglas -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus