RE: Fixing the VCL (LONG) (was Re: [DUG]: Dumb question of the day)
He, he :-) I thought I'd add a couple of my thoughts on the grid. Max wrote a view-only grid from scratch (ie no VCL Grid code) and then I inherited from that to make a grid into which you can drop any control. Yes, any control can be dropped into a cell. (The control must inherit from TWinControl, although I could even have handled TControl with a bit more time). Because of our clean design for keyboard handling (through CM_CHILDKEY) we can use keys to move around the grid _without_ having to patch the control. No special messages are needed (unlike the ControlGrid in the VCL), all that is required is for the control to properly implement CM_CHILDKEY. If the control in a cell has DataSource and DataField properties then the grid sets them up for you. At design time the first row of the grid shows the cell editors which you can click on and set properties as per normal Delphi Form designer. So whats my point? Just that Delphi could stand some improvement and this improvement is achievable! If we could do it at Profax then Inprise can certainly do it. Maybe they should have hired us (hey thats not a silly idea :-) BTW: I did not read earlier messages in this thread :) Over the last three months I have talked to quite a few development companies around Auckland and I have seen two attitudes: if they are still using Delphi then they will stick with it come hell or high water, if they are not using Delphi then it is because Delphi does not a offer enough of an advantage over the Microsoft tools to go "outside" the norm. Often they have dabbled with Delphi but judged it only slightly better than VB. Hey, can you blame them when all the VCL controls (edit, listbox, combo) are just the standard Windows controls and the RAD database stuff (data-aware controls) is a copy of VB/Access (bound controls)! I find it amusing that Access/VB programmers often don't use the bound controls for real work, just like Delphi programmers dump data-aware when using SQL. PS: I no longer work at Profax, the cost of developing all those nifty new controls and other VCL replacements was too high. I am now doing C++ contracting :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Max Nilson Sent: Thursday, 11 March 1999 17:24 To: Multiple recipients of list delphi Subject: Fixing the VCL (LONG) (was Re: [DUG]: Dumb question of the day) --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: Re: [DUG]: Dumb question of the day
On 11 Mar 99 at 16:09, Max Renshaw-Fox wrote: No offence intended. None was taken. :-) Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: Re: [DUG]: Dumb question of the day
On 10 Mar 99 at 10:23, Max Renshaw-Fox wrote: I guess I should take up the challenge... (OK I'm feeling combative today) Oops, did I hit a raw nerve. :-) Well, I certainly dont feel combatitive. As you know, I made no comment on the developers using Delphi, just its VCL. First, the kind of applications we write places different demands on the language and OS. Ever since Turbo Pascal 3, I have used the language to its utmost and BP7 has still not run out of steam. Even D4 has not got there yet. Your view (or indeed anyones) of their code and facilites is coloured by your own experience. My (and people such as Paul Lowman, Max Neilsen and Paul Heinz) maybe far greater in that respect. For instance we have in the past written our own multi-tasking kernel for CPM, MSDOS, TurboPascal, Microsoft Basic etc. When I look at various bits of this professional VCL, parts of it are a joke (for eg the multi-threading, we had better facilities 15 years ago). OTOH, certainly there are portions that are great. My users demand more from my windows system than they had in my dos system. I cant give it to them using standard components. Heck, I cant even do it with all the libs out there. And others (including the few named above) have gone to great pain in duplicating and fixing most of VCL). They didnt do it for fun. Regards Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: Re: [DUG]: Dumb question of the day
Hi Rohit, Apologies if I sounded abrupt: I was trying to not be personal - but to point out that adequacy for any individual's needs is not a test of the VCL's competence. The point I was making, yes I'm feeling more tolerant today, is that "childish" is not a good description for the VCL. Inadequate for your purpose, frustrating etc - I can't disagree with that, nor argue with your, or anyone else's, competence. The point I was making was that the VCL does what it was intended to do, which is clearly less than some people want (which is why Max et al have had to "fix" it) - but still what was intended and, arguably, what the majority of Delphi users need. That may make it a commercial solution, rather than a technically pure one - but not a childish one. Nor was I questioning your competence - the fact that you, and your clients, set a high standard is not in question. But neither does that mean that the VCL is childish, and hence inadequate for the vast majority of us mere mortals. I understood that what you were saying was something like "I get frustrated when the VCL doesn't do what I want" - but I reacted to the emotionally charged connotation behind "childish". No offence intended. Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rohit Gupta Sent: Friday, 12 March 1999 02:48 To: Multiple recipients of list delphi Subject: RE: Re: [DUG]: Dumb question of the day On 10 Mar 99 at 10:23, Max Renshaw-Fox wrote: I guess I should take up the challenge... (OK I'm feeling combative today) Oops, did I hit a raw nerve. :-) Well, I certainly dont feel combatitive. As you know, I made no comment on the developers using Delphi, just its VCL. First, the kind of applications we write places different demands on the language and OS. Ever since Turbo Pascal 3, I have used the language to its utmost and BP7 has still not run out of steam. Even D4 has not got there yet. Your view (or indeed anyones) of their code and facilites is coloured by your own experience. My (and people such as Paul Lowman, Max Neilsen and Paul Heinz) maybe far greater in that respect. For instance we have in the past written our own multi-tasking kernel for CPM, MSDOS, TurboPascal, Microsoft Basic etc. When I look at various bits of this professional VCL, parts of it are a joke (for eg the multi-threading, we had better facilities 15 years ago). OTOH, certainly there are portions that are great. My users demand more from my windows system than they had in my dos system. I cant give it to them using standard components. Heck, I cant even do it with all the libs out there. And others (including the few named above) have gone to great pain in duplicating and fixing most of VCL). They didnt do it for fun. Regards Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Fixing the VCL (LONG) (was Re: [DUG]: Dumb question of the day)
Rohit Gupta said: Your view (or indeed anyones) of their code and facilites is coloured by your own experience. My (and people such as Paul Lowman, Max Neilsen and Paul Heinz) maybe far greater in that respect. ^ FYI: its Nilson, and I thought that being invoked I should reply. My users demand more from my windows system than they had in my dos system. I cant give it to them using standard components. Heck, I cant even do it with all the libs out there. And others (including the few named above) have gone to great pain in duplicating and fixing most of VCL). They didnt do it for fun. and Max Renshaw-Fox replied: The point I was making was that the VCL does what it was intended to do, which is clearly less than some people want (which is why Max et al have had to "fix" it) - but still what was intended and, arguably, what the majority of Delphi users need. That may make it a commercial solution, rather than a technically pure one - but not a childish one. We (That is Paul, Ian and myself) have replaced large chunks of the VCL, and the reasons behind doing this fall into two four categories. As far as I'm aware anyone who starts trying to build complex business solution in Delphi is going to strike problems in these areas, so I'll talk a little about each in turn: Problem 1: Microsoft common controls. - All of the basic editing controls (TEdit, TComboBox, TCheckBox etc) are all just object wrapper about the original (and we're talking Windows 3 or earlier here!) Microsoft windows. Once you start working these hard and asking them to perform stuff that they were never designed to do, then you hit problems. Big problems are in the ares of subclassing, adding extra UI components and embedability into grids. The VCL wrappers do a good job, but if you want more from your controls then you need top replace these completely. And by this I don't mean using InfoPower, because all of their controls are just more wrappers over the VCL wrapper over the MS windows controls. If you read their code and then start trying to extend the controls even further things break in really exiting areas 8-( So the Profax team wrote an entire set of replacements for all of the common editing controls, and they use no Microsoft control at all. Now the controls do what we want and can be extended rapidly and easily in any direction that is needed. Problem 2: Data-awareness issues. - After three years of working with data-aware controls I have still not really decided if the design is correct or not. Danny Thorpe (Senior Engineer, Delphi RD) in the borland.public.delphi.vcl.components.writing wrote yesterday: One thing I've been wanting to tackle since the day the interface syntax was sussed out (pre-D3) is reworking the nature of "data awareness". If a TEdit implements an IDataAware interface, then it can be bound to database fields. The interface could even be implemented by satelite helper classes that "attach" themselves to the TEdit instance, so that TEdit itself has no knowledge of the database stuff. So I'm not alone in wanting a better way of building data-awareness into controls. So unless your prepared to go completely non data-aware, something that would quickly drive me insane, or force me to essentially duplicate the entire data-aware mechanism, you must use the TDataLink and TFieldDataLink interfaces provided. The main problem with the existing interfaces are those of navigation between controls and cleanly handling invalid data entry situations. If you have ever tried to build a idiot proof interface using the existing data-aware controls you quickly start to hit nasty problems in these transition areas. The biggest transition problem is that all of the data-aware stuff fires in the DoExit code, which itself is inside the WM_SETFOCUS processing, where you have some severe restrictions on what you can and cannot do. So the Profax teams controls have to jump through some burning hoops to make sure that weird errors don't occur and confuse the users. Problem 3 Keyboard handling. The standard Windows keyboard handling is broken in one major way. That is that the WM_KEYDOWN event is first prepatched furiously because of the stupid Windows design, and then sent to the active window which must handle anything thrown at it. I see this a lot on the Delphi news groups, people furiously using TForm.KeyPreview in an attempt to handle keypress before controls eat them, and to do the VK_RETURN is a VK_TAB thing. Ian Farquharson realised that the CM_CHILDKEY behaviour that the VCL adds to the entire grubby keyboard handling process was exactly what we should be utilising instead. From Delphi 3 onwards Delphi sends a CM_CHILDKEY to the focused windows, and that window can either process the key or pass it up to its parent. That control can then process the key or pass to its parent and so on.
RE: Re: [DUG]: Dumb question of the day
-BEGIN PGP SIGNED MESSAGE- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, 9 March 1999 14:49 To: Multiple recipients of list delphi Subject: RE: Re: [DUG]: Dumb question of the day I think the answer to my original question is 'No', it can't be done. What's the point of having edit masks if they can't cope with a simple currency value? IMO the edit mask component is a crock, roll your own. Patrick Dunford, Christchurch, NZ http://patrick.dunford.com/ -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.0.2i iQEVAwUBNuQ25oQbtaGa2X4LAQFYcgf/cn25nGbuSuGHauUMnzWocx2c0ybwz6JW 8sCedT5OVYlvV/XqcCsPuFXClGdxWDYJeRwm2Wlmdr8EFTGi9D+H+Zv+wuitQUiO k8NhmLSaCqANDzSBzsHL994unF4EeluMu7FcL5M+zhsB263HxOQ00SZtVs7cXoff 916V0rf8q2M4LEKB85wVSZHeQ6hpInmi0AEhzD8FWd/fLsDRM1QU77Ak1+SZxrQG jky0pUkj8dZ8/IrfY6sA3rKJvP5IvxmQB6atfuIN63i8fwBVy+VENFsiOiWqzz5c PCJZH0iQp534X/sAIMLhfqesrXh74BlTD7xlwG+2fgf0kvJU7dxeJw== =CHQG -END PGP SIGNATURE- --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: Re: [DUG]: Dumb question of the day
I guess I should take up the challenge... (OK I'm feeling combative today) Does that imply that those of us who can produce complex applications, that involve significant data validation and implement complex business rules, using "original Borland components" are "childishly deficient" as well? I've found that, in the very rare cases where data-aware components can't be used and the likes of the string grid's "OnSetEditText" can't be used, straight-forward extensions to the original components are entirely satisfactory. After-all, in the best-of-all-possible-worlds data-types will do all data validation. OK sometimes you have to use creative SQL statements (I've currently got a bunch of UNION'd SELECT statements to get the data in the form I want for a TDBChart - yes performance is OK) but that's part of the creativity required for any good problem-solving. I'm not saying you should develop the way I do; just that it _IS_ possible to get sophisticated data-validation with the included stuff. If you don't like them because of style - that's OK too but be aware that that's your style of development and nothing to do with the VCL or it's capabilities. Or to put it another way: the engineers who created Delphi and the VCL have a great deal more technical depth that most of us. Attending Icon (was BorCon) and listening to their answers to some of the more searching questions is evidence enough of that. So I think you'll find that the VCL has been crafted the way it is on purpose, not by accidental omission. The more I understand the VCL, and therefore the more I feel competent to pass judgement, the less likely I am to characterise it as "Childish". Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rohit Gupta Sent: Wednesday, 10 March 1999 03:10 To: Multiple recipients of list delphi Subject: Re: Re: [DUG]: Dumb question of the day Aaron, I use almost no original Borland components as they all appear to be childishly deficient. But most grids have a on the fly created editbox called InPlaceEditor. I tried it with stringgrid but it doesnt work. It works in other grids though. You might have to examine the VCL source. On 9 Mar 99 at 12:25, Aaron Scott-Boddendijk wrote: You can do a character by character analysis by trapping keypress/keydown. I do case conversion, capitalising start of words and filtering out undesired characters that way. How do you get the position in the char buffer that the key is being inserted into... IE if a client cursors (or clicks) in the middle of a string and inserts a lower case letter... you can't process the whole string to recapitalise because it resets the cursor pos... comments? Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: Dumb question of the day
You can do a character by character analysis by trapping keypress/keydown. I do case conversion, capitalising start of words and filtering out undesired characters that way. On 5 Mar 99 at 16:52, [EMAIL PROTECTED] wrote: It's a string grid so that's no good. Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: Re: [DUG]: Dumb question of the day
You can do a character by character analysis by trapping keypress/keydown. I do case conversion, capitalising start of words and filtering out undesired characters that way. How do you get the position in the char buffer that the key is being inserted into... IE if a client cursors (or clicks) in the middle of a string and inserts a lower case letter... you can't process the whole string to recapitalise because it resets the cursor pos... comments? -- Aaron Scott-Boddendijk Jump Productions (07) 838-3371 Voice (07) 838-3372 Fax --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: Dumb question of the day
Well, first, for precisely that reason, I use Orpheus for some user input. Its a pity that Borland did not retain the excelelnt masking ability in turbo vision. Anyway, one way to fix it if it is a tfloatfield is to check the currency property. in the object inspector. On 3 Mar 99 at 16:26, [EMAIL PROTECTED] wrote: The standard edit mask should do this but I've never figured it out. How do I specify an edit mask for a $ value? If I use '###0.00' then the user can enter '12 .45' (with space) Please dont tell me to use a 3rd party control cause I cant. Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: Dumb question of the day
It's a string grid so that's no good. [EMAIL PROTECTED] (Rohit Gupta) on 05/03/99 23:01:13 Please respond to [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] cc:(bcc: Peter Jones/LogisticsInformation Technology/Christchurch/Foodstuffs) Subject: Re: [DUG]: Dumb question of the day Well, first, for precisely that reason, I use Orpheus for some user input. Its a pity that Borland did not retain the excelelnt masking ability in turbo vision. Anyway, one way to fix it if it is a tfloatfield is to check the currency property. in the object inspector. On 3 Mar 99 at 16:26, [EMAIL PROTECTED] wrote: The standard edit mask should do this but I've never figured it out. How do I specify an edit mask for a $ value? If I use '###0.00' then the user can enter '12 .45' (with space) Please dont tell me to use a 3rd party control cause I cant. Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz