Alaska Software Inc. - Re: XbpBrowse() - wrong behaviour
Username: Password:
AuthorTopic: Re: XbpBrowse() - wrong behaviour
Andreas Gehrs-Pahl

View the complete thread for this message in:

Re: XbpBrowse() - wrong behaviour
on Tue, 31 Mar 2015 15:43:51 -0400
Thomas,

After I read your (more comprehensive) error description I took a look at 
the XbpBrowse() code, and I found a logical error in its implementation. If 
the (default) ::NavigationMode of XBPBRW_NAVIGATION_SYSTEM is used, then the 
browse will cache the current Row (or Cell) when the Browse is stabilized, 
and that cached value is used in the ::EditBuffer() -- and therefore also 
the ::GetData() -- method. This is required as the cursor might not be on 
the actual "current" (highlighted) record in that Navigation Mode.

The problem with the current implementation is that if the ::CursorMode is 
XBPBRW_CURSOR_CELL (rather than the default of XBPBRW_CURSOR_ROW) only the 
"current" cell is saved in the new ::aCachedRow iVar. Therefore, until you 
navigate to a different Row, the ::aCachedRow iVar will always contain the 
value of the Cell that was active when you selected the Row -- initially the 
first Column of the first Row) -- no matter which Cell (or Column) of the 
first Row is actually highlighted by moving the cursor within the same Row.

To fix this, ::aCachedRow should always cache the contents of the entire Row 
rather than just a single Cell -- no matter which ::CursorMode is selected 
actually -- and the ::EditBuffer() method should return the appropriate 
value, based on the ::CursorMode. That way, no matter in which Column/Cell 
the cursor is at any time, the correct data contents would be returned.

This should be a simple fix for Alaska, and you could even implement this 
yourself, if you want to use ::NavigationMode of XBPBRW_NAVIGATION_SYSTEM 
with a ::CursorMode of XBPBRW_CURSOR_CELL, before Alaska fixes this.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net