Re: TZF - TTzVFile anomaly
Marie Vihonsky <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Hi Randy,
I made some changes to your unit. I have never had success with using
the 'post' and 'insert' and 'delete' functions. I usually revert to the
Topaz commands of 'appendrec','replacerec' and 'deleterec'. I'm using
D5, which didn't have the 'Varients' unit, so I removed it to get it to
work. I also usually add a Tznavigator component and use its commands
for inserting & posting since I also make my own buttons for those
commands. I also make one procedure to 'ToggleButtons' on the form
instead of referring to them separately:
Procedure TForm1.ToggleButtons;
begin
addbutton.enabled := not addbutton.enabled;
deletebutton.enabled := not deletebutton.enabled;
end;
I forgot to rename the actual unit, so be careful when you unzip it.
Marie
Randall H. Carpenter wrote:
> If anyone can shed some light on this anomaly, I'd appreciate it.
>
> Please check out the attached code. I have come across an anomaly with
> the TTzVFile component which is causing me heartburn. Maybe it's my
> code so I'm hoping you can give me some direction.
>
> In this example, I have a grid, a datasource, a TTzVFile, and three
> buttons on a form. Event handlers have been coded for the AfterCancel,
> AfterEdit, AfterPost, and AfterScroll events of the TTzVFile component.
>
> In the AfterScroll event, which fires when the record pointer moves, the
> Enabled property of the Delete and Mortgagee buttons are changed.
> Sometimes this isn't happening.
>
> To see what I am experiencing, try the following:
>
> Compile/Run the program
> Click Add
> Enter 1 in the Location field
> Click Post
> Click Add
> Enter 2 in the Location field
> Click Post
> Click Add
> Enter 3 in the Location field
> Click Post
> Click Delete
> Click Yes
> Click Delete
> Click Yes
> Click Delete
> Click Yes
>
> The Delete and the Mortgagee buttons are updated correctly (enabled :=
> false).
>
> Now try this:
>
> Compile/Run the program
> Click Add
> Enter 1 in the Location field
> Click Post
> Click Add
> Enter 2 in the Location field
> Click Post
> Click Add
> Enter 3 in the Location field
> Click Post
> Select the first record in the grid by either scrolling to it or
> clicking on it.
> Click Delete
> Click Yes
> Click Delete
> Click Yes
> Click Delete
> Click Yes
>
> The Delete and the Mortgagee buttons did not get updated. They should
> be disabled.
>
> Any suggestions?
>
> Your help will be appreciated.
>
> Randall H. Carpenter
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================
MyTestu2.zip
(application/x-zip-compressed, 1.1 KB) - not displayed