DVL Software Limited
[ About | Services | Products | Search | Feedback | Support ]

PowerBuilder Tips

PFC row manager 'bugs'

Back to the Tips

I thought I should pass this information along.  It applies to the original version of PFC.  In pfc_n_cst_dwsrv_rowmanager::of_DeleteRow, there is the following code snippet:

li_rc = idw_requestor.DeleteRow (al_row)
  if li_rc > 0 then
      al_row --
      if al_row <= 0 then
          al_row = 1
      end if
      if idw_requestor.RowCount() > 0 then
          idw_requestor.SetRow (al_row)
          idw_requestor.ScrollToRow (al_row)
      end if
  end if

I think that the al_Row -- is silly.  I think it should be replaced with:

      if al_Row > idw_requestor.RowCount() then
          al_Row = idw_requestor.RowCount()
      end if

This code will also remove the need to check that al_Row < 0.

I guess it's a mater of taste, but I prefer rows to move up and the focus to remain in the same place when data is deleted.  With the existing code, the row focus goes up.

OH! And I think the SetRow is redundant.  The ScrollToRow will suffice as it does an implied SetRow.  This last point also applies to of_InsertRow.

I welcome comments on the above.  Thanks!

Back to the Tips

[ About | Services | Products | Search | Feedback | Support ]

This page last updated: Wednesday, 23 February 2000
Copyright 1997, 1998, 1999, 2000 DVL Software Limited.  All rights reserved.