Re: How to debug/track a record pointer change event? by MikeA
MikeA
Mon May 12 23:49:39 CDT 2008
Zoom - any chance you have tied your table to the grid's controlsource?
That could change the record pointer. Also, if you are not using private
data sessions, that could also change the record pointer. Feel free to post
some code here and we'll attack it.
Mike
"Dan Freeman" <spam@microsoft.com> wrote in message
news:u8JFjaEtIHA.2292@TK2MSFTNGP03.phx.gbl...
>I said set a breakpoint on recno(), not on a line of code.
>
> Dan
>
> Zoom wrote:
>> Hi Dan,
>>
>> Thanks for the reply. Howvver, even with the debugger, I just cannot
>> figure out where the record change occurs. I cannot find a single
>> line of code which moves the record pointer and yet VFP keeps moving
>> it to EOF. Is there any way to trap a record pointer move event
>> anywhere it happens so I can see where it happens rather than set a
>> breakpoint at a specific line in my code?
>>
>> Thanks
>>
>> Zoom
>>
>> "Dan Freeman" <spam@microsoft.com> wrote in message
>> news:%23hl9nNusIHA.3604@TK2MSFTNGP03.phx.gbl...
>>> In the IDE, press CTRL-B to open the breakpoints dialog.
>>>
>>> Or go to the debugger (choose Tools->debug from the menu or type
>>> DEBUG in the command window) and choose it from the menu or the
>>> toolbar. (always at least three ways to do something in VFP <g>)
>>>
>>> The debugger is INCREDIBLY useful. It's worth taking a day off to
>>> explore and find out what it can do. The help topic is actually
>>> helpful, too. ;-) Dan
>>>
>>> Zoom wrote:
>>>> Hi Dan,
>>>>
>>>> Thanks for the reply. However, I am new at this .. how and where do
>>>> I set this breakpoint?
>>>>
>>>> Zoom
>>>>
>>>>
>>>> "Dan Freeman" <spam@microsoft.com> wrote in message
>>>> news:e$vanAjsIHA.1220@TK2MSFTNGP04.phx.gbl...
>>>>> Set a breakpoint on Recno("alias"), and set it to to break when
>>>>> condition changes.
>>>>>
>>>>> The usual culprit in this sort of thing is record movement with the
>>>>> wrong alias SELECTed. Grids can also be fiddly, causing their
>>>>> datasource to become selected.
>>>>>
>>>>> Dan
>>>>>
>>>>> Zoom wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am using VFP9 and have a table called NOTES. I have 3 records
>>>>>> in the table. I position the record to record #2 (I verify this
>>>>>> by doing a WAIT ALLTRIM(:STR(RECNO()) WINDOW and then launch
>>>>>> another form (properties set to show within top-level form). I
>>>>>> also launch a ADOBE PDF document using the SHELLEXCUTE command. When
>>>>>> I bring the focus back to the top-level VFP form, the record
>>>>>> pointer for NOTES has changed to EOF(). There is nowhere in my
>>>>>> code on that form that moves the record pointer (including any
>>>>>> subroutine calls). I have tried to track this in vain but just
>>>>>> cannot figure
>>>>>> out why VFP moves the record pointer? The Data Environment
>>>>>> properties of this top level form are set to .F. for auto open and
>>>>>> auto close tables. Is there anway to debug a record pointer move
>>>>>> so I can trap the
>>>>>> event and figure out where and why VFP is randomly moving the
>>>>>> record pointer?
>>>>>> Thanks
>>>>>>
>>>>>> Zoom
>
>