Board index » delphi » Re: Help system and code completion still leave much to be desired

Re: Help system and code completion still leave much to be desired


2007-12-04 01:59:52 AM
delphi124
Rudy Velthuis [TeamB] writes:
Quote
Now you could argue it should also return objects which have properties
that return a TTreeNode, or return objects which have properties which
return a TTreeNode, etc. But how deep should the compiler check this,
and what kinds of delays would you accept?
Indeed. It should not try to double guess a human programmer...
function tform1.foo: boolean;
begin
result := Treeview1.items.
If the OP would have his way, at this point CI would only offer boolean
parameters, and it would actively hinder me from typing (for example)
the following -- perfectly valid -- code:
result := Treeview1.items.count = 42;
AndrewFG
 
 

Re: Help system and code completion still leave much to be desired

OBones writes:
Quote
Well, I don't think it should not. it is a class, and it does not know
yet if the class has a property of the appropriate type or not. So it
MUST show it. If find it very annoying when it decides not to show a
property because it thinks I can not do anything with it...
Agreed 100%. it is the case of the tool trying to be smarter than the
developer. No thanks, at that point it just gets in my way rather than
helping me.
--
Brian Moelk
Brain Endeavor LLC
XXXX@XXXXX.COM
 

Re: Help system and code completion still leave much to be desired

Q Correll writes:
Quote
My "solution" is to type the "stub(s)" on a new line so I can "see"
everything. Then move or retype the completed item to where it
belongs. <g>
Mine too, and it is a waste of time because the tool is trying to be too
helpful. KISS applies here.
--
Brian Moelk
Brain Endeavor LLC
XXXX@XXXXX.COM
 

Re: Help system and code completion still leave much to be desired

Brian,
| KISS applies here.
{*word*268}ly agreed!
--
Q
12/03/2007 12:01:08
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Help system and code completion still leave much to be desired

Andrew Fiddian-Green writes:
Quote
it would actively hinder me from typing (for example)
the following -- perfectly valid -- code:

result := Treeview1.items.count = 42;
One major difference is that you already know what property you
want to get and what you want to do with it. In that case, the code
completion is just a feature that helps you with correct capitalization
and maybe shortens typing time a bit.
My problem was that I wanted to add nodes to a treeview and that
neither the help file nor the code completion feature would give
me any sensible help on how to do it and my intuition let me
down as well; Given the fact that I wanted to add a tTreeNode to
a tTreeView, I'd have expected something like :
Treeview1.Nodes.Add()...
Treeview1.Add()...
Treeview1.AddNode()...
Treeview1.InsertNode()...
Treeview1.AppendNode()...
but unfortunately nothing of the kind applied because the property is
called "items" which took some time to figure out.
I think the best compromise would be if the code completion would
show all members of "ttreeview.items" and *highlight* the ones that
are assignment compatible instead of just spitting out a lengthy list.
--
Arthur Hoornweg
(In order to reply per e-mail, please just remove the ".net"
from my e-mail address. Leave the rest of the address intact
including the "antispam" part. I had to take this measure to
counteract unsollicited mail.)