Board index » delphi » Delphi 2.0 listbox question & breakpoint problem

Delphi 2.0 listbox question & breakpoint problem

I have two questions :

1.  I have a program which will load a textfile into an listbox.
     Then I search for a specific word in this document and get the
linenumber of which the word is on.
     But when I try to display the line it will always (well almost) end
up on the bottom of the listbox.
     Is there a way to make the highlighted line appear on the top of
the listbox ?

2. In the same program, wherever I set the breakpoint I get a message
that the breakpoint is set on a line which
    either contains no debug information or is optimized by the
compiler. I know that the lines in question generate code
    which is executed, but it will not stop at the breapoints. I tried
to remove the check on optimization but that didn't help.
    Is my programming really that bad ?  Anybody got a clue ?

--
--------------------
   Lars Lindgaard
 lindg...@online.no
====================

 

Re:Delphi 2.0 listbox question & breakpoint problem


On Sat, 25 Oct 1997 12:21:42 +0200, Lars Lindgaard

Quote
<lindg...@online.no> wrote:
>I have two questions :

>1.  I have a program which will load a textfile into an listbox.
>     Then I search for a specific word in this document and get the
>linenumber of which the word is on.
>     But when I try to display the line it will always (well almost) end
>up on the bottom of the listbox.
>     Is there a way to make the highlighted line appear on the top of
>the listbox ?

Yes. Send the list box the LB_SETTOPINDEX message with appropriate
parameters. See WinAPI Help for details.

Quote
>2. In the same program, wherever I set the breakpoint I get a message
>that the breakpoint is set on a line which
>    either contains no debug information or is optimized by the
>compiler. I know that the lines in question generate code
>    which is executed, but it will not stop at the breapoints. I tried
>to remove the check on optimization but that didn't help.
>    Is my programming really that bad ?  Anybody got a clue ?

Do you have debugging information turned on? Is yes, do a comlete
rebuild to the project. If that doesn't help either, you might want to
try to delete the desktop file (.dsk) created by Delphi. It resides on
the same directory as your project (.dpr) file. Sometimes when moving
projects between different computers the IDE can get confused about
which lines contain debug info and which don't.

Regards,

Jani J?rvinen
Helsinki Finland

Tools, information, tips, reviews & bug lists
for professional Delphi, Win32 and WinHelp developers.

mailto:ja...@dystopia.fi
http://www.dystopia.fi/~janij/

Other Threads