Alaska Software Inc. - XbpBrowse:ItemMarked not working vertical navigation.
Username: Password:
AuthorTopic: XbpBrowse:ItemMarked not working vertical navigation.
Itai Ben-ArtziXbpBrowse:ItemMarked not working vertical navigation.
on Sat, 11 May 2019 19:28:02 -0700
The code block set in oBrowse: ItemMarked only works when there is a
vertical movement.
Thus, ItemMarked is not working with a single row browse and is not
working on the same row without vertical navigation.  
Is it possible to have ItemMarked executed without any navigation?

Many thanks,
-Itai
Jose Antonio Diego KerejeRe: XbpBrowse:ItemMarked not working vertical navigation.
on Tue, 14 May 2019 23:29:19 +0200
I do not know if I understood correctly

***************************
CLASS BroTest FROM XbpBrowse
***************************
   INLINE METHOD navigate( nNavigate, mp2 )
   ****************************************
      LOCAL _rowPos:= ::rowPos
      LOCAL _colPos:= ::colPos

      super:navigate( nNavigate, mp2 )

      IF ::itemMarked # nil .AND. _rowPos = ::rowPos .AND. _colPos # 
::colPos
         PostAppEvent( xbeBRW_ItemMarked, { ::rowPos, ::colPos }, nil, 
self )
      ENDIF
   RETURN self
ENDCLASS

Regards. Diego
Itai Ben-ArtziRe: XbpBrowse:ItemMarked not working vertical navigation.
on Wed, 22 May 2019 01:45:41 -0700
Thank you, Diego!
Yes, we can post ItemMarked programmatically, but not with the mouse.
For clarity, if the focus is already on a row, clicking that row does
nothing.  ItemMarked is generated only when the focus moves from one
row to another.  It would be nice to have ItemLbDown (similar to
ItemRbDown) so we can click a row that already has focus.
Jose Antonio Diego KerejeRe: XbpBrowse:ItemMarked not working vertical navigation.
on Wed, 22 May 2019 14:38:31 +0200
You mean this?

*******************************
CLASS XbpBroTest FROM XbpBrowse
*******************************
EXPORTED:
   INLINE METHOD ItemLbDown( nRow, oCol )
   **************************************
      LOCAL rowPos:= ::rowPos
      LOCAL colPos:= ::colPos

      super:itemLbDown( nRow, oCol )
      IF ::itemMarked # nil .AND. rowPos = ::rowPos  .AND. colPos # 
::colPos
         EVAL( ::itemMarked, { ::rowPos, AScan( ::aColumns, oCol ) }, nil, 
self )
       ENDIF
   RETURN self
ENDCLASS

Regards. Diego
Itai Ben-ArtziRe: XbpBrowse:ItemMarked not working vertical navigation.
on Sun, 26 May 2019 21:38:52 -0700
No.  I mean ::itemLbDown := bBlock
For example:
oBrowse:itemLbDown := {| aMousePos, aRowCol, self | DoSomething() }

ItemMark only activated when row id changed, while ItemLbDown should
be activated when the left-button is clicked.  They are not the same.
Itai Ben-ArtziRe: XbpBrowse:ItemMarked not working vertical navigation.
on Mon, 27 May 2019 00:00:20 -0700
Thank you, Diego.
I've found a work around this via the CellGroup:lbDown:

//Set the call-back:
oBrowse:GetColumn(7):dataArea:lbDown := {|aPos, uNIL, self |
DoSomething(@oBrowse, @aBrowse, Self) } 


Static Procedure DoSomething(@oBrowse, @aBrowse, oCellGroup)
 move the cursor to the clicked line
PostAppEvent( xbeBRW_ItemMarked, { oCellGroup:cellFromPos(aPosition),
7 }, nil, @oBrowse )
 must stabilize the browser
oBrowse:forceStable()
 Retrieve the data selected
aLine := aBrowse[oBrowse:Cargo]