What's the trick to CellDoubleClick() in bBrowser?

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
Anonymous

What's the trick to CellDoubleClick() in bBrowser?

Post by Anonymous »

Hi all.

I have this code working brilliantly in a "standard VO" Browse View:
METHOD CellDoubleClick() CLASS DataBrowser
LOCAL MyEditWindow as JobNoRep
Local nRecNo
nRecNo := RECNO()
self:oDataServer:GoTo(nRecNo)
self:oDataServer:FIELDGET(#JobDate)
MyEditWindow := JobNoRep{,,self:oDataServer,nRecNo}
MyEditWindow:SERVER:GoTo(nRecNo)
MyEditWindow:Show(SHOWCENTERED)
self:owner:owner:Endwindow()

RETURN nil

How do I achieve the exact same result (same screen called etc) in bBrowser please? All I mostly get is the attached message, which really tells me bugger all. I read in the "old" vo forum a few things about a known issue but haven't found any solution as yet. Hitting "Debug" locks VO up completely...

Thanks again.

Jeff
Attachments
Capture.JPG
Capture.JPG (21.52 KiB) Viewed 461 times
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

What's the trick to CellDoubleClick() in bBrowser?

Post by wriedmann »

Hi Jeff,

you have to use the Recno() method of the bBrowsers server, open up a new server instance and move on this record.
Probably closing the bBrowser window closes also the related server.
And please don't forget that the bBrowser server can be also the server of the window itself, but in many cases it will not be.
I'm using similar code:

Code: Select all

method CellDoubleClick( oEvent ) class MAuftragSubEdit7
     local oEdit			as MAufKostDialog

 	if oDCMAufKostGrid:Server != null_object .and. oDCMAufKostGrid:Server:EOF == false  
 		oEdit				:= MAufKostDialog{ self:Owner:Owner, oDCMAufKostGrid:Server }
 		oEdit:Show( SHOWCENTERED )
 	endif

	return nil
But this code is not closing the browser window (and I do this never, but let it open or hide it temporarily).

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
MathiasHakansson
Posts: 50
Joined: Fri Feb 16, 2018 7:52 am

What's the trick to CellDoubleClick() in bBrowser?

Post by MathiasHakansson »

Hi Jeff,

If you are doing it like this (bBrowser as a replacement browser in datawindow BrowseView)

https://groups.google.com/forum/?hl=sv& ... 6PaB_ZqiMJ

you can use the CellDoubleClick Event in the datawindow like Wolfgang showed you. If you have an inherited bBrowser class you can do something like;

method MouseButtonDoubleClick(oMouseEvent) class bInheritedBrowser
local oP as Point
local oC as bCell
local oCol as bDataColumn

if self:lInProcess
return ISEXECUTED
endif

if oMouseEvent:IsLeftButton
oP := Point{LoWord(oMouseEvent:LParam),HiWord(oMouseEvent:LParam)}
oC := self:GetCellToPoint(oP)
oCol := self:GetOpenColumn(oC:column)

if !Empty(oCol) .and. InList(oCol:fieldsym,#IDEL,#PDEL,#BDEL)
self:owner:DoSomething() // On the datawindow owner

self:EventReturnValue := ISEXECUTED

return self:EventReturnValue
endif
endif

return super:MouseButtonDoubleClick(oMouseEvent)

//Mathias
BiggyRat

What's the trick to CellDoubleClick() in bBrowser?

Post by BiggyRat »

Brilliant! Thanks very much Mathias and Wolfgang! Very much appreciated..... again!
Post Reply