Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Right-click capture
Mon, Mar 12 2018 10:50 AMPermanent Link

Matthew Jones

I'm sure I've asked before, but what is stopping the capture of right clicking in WebBuilder applications?
I'd really like to be able to pop up a menu on a right click to give context actions.

--

Matthew Jones
Mon, Mar 12 2018 2:56 PMPermanent Link

erickengelke

Avatar

"Matthew Jones" wrote:

>I'm sure I've asked before, but what is stopping the capture of right clicking in WebBuilder applications?
I>'d really like to be able to pop up a menu on a right click to give context actions.

Different browsers act differently.  I don't know how Google does it across browsers.

I use onmousedown and it usually works, but some browsers also show their own dialog.

Erick
http://www.erickengelke.com
Mon, Mar 12 2018 8:11 PMPermanent Link

Rick

On 13/03/18 01:50, Matthew Jones wrote:
> I'm sure I've asked before, but what is stopping the capture of right clicking in WebBuilder applications?
> I'd really like to be able to pop up a menu on a right click to give context actions.
>

This discussion talks about it:

https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&msg=3150&page=62

Note that TEventManager appears to have moved from WebCtrls into WebUI.

Could probably manually add the "oncontextmenu" event into this process
to manage the right-click menu (needs to return false to prevent the
browser from displaying its own menu).

Don't know why Tim hasn't already included it as a standard event (IE
considerations?) but it would be very useful.

--
Rick
Tue, Mar 13 2018 4:20 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rick,

<< Note that TEventManager appears to have moved from WebCtrls into WebUI. >>

Correction: the TEventManager class has always been in the WebUI unit.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Mar 13 2018 5:30 PMPermanent Link

Rick

On 14/03/18 07:20, Tim Young [Elevate Software] wrote:
>
> Correction: the TEventManager class has always been in the WebUI unit.
>

Fair enough. In the linked thread it says "procedure
TEventManager.SetEventhandlers; in the WebCtrls unit." I guess I must
have misunderstood this.

By the way, Matthew's comment in that same thread, "you can't have the
whole kitchen sink in the framework" is an interesting one. I sort of
like the idea of having everything available via Object Pascal,
particularly the events, because that is sort of the point.

I know that it is fairly easy to access external Javascript from EWB but
adding events looks to be a bit more complex. It'd be great if there was
a procedure/function that could be called to associate a particular
event with a control. Useful for events that aren't available in EWB
(such as oncontextmenu).

--
Rick
Wed, Mar 14 2018 9:15 AMPermanent Link

erickengelke

Avatar

Rick wrote:


> By the way, Matthew's comment in that same thread, "you can't have the
> whole kitchen sink in the framework" is an interesting one. I sort of
> ike the idea of having everything available via Object Pascal,
> particularly the events, because that is sort of the point.

Although my EWB book shows a lot of integration with JavaScript, I also prefer doing things entirely in EWB when I can.  And increasingly, I can do it all in EWB.

I recently completed a mammoth project in EWB (10,000 lines of pascal) that I whipped up in three months, and the clients are so happy.  Without EWB or something like Scala, it would have had to have been a desktop app - it sure feels like one.    10,000 sounds enormous, but considering the complexity of the project it was small and almost bug free - a benefit of working in Pascal with strong type checking.  I have another almost done coming to 8,000 lines that we are just testing now.  

But these were also possible because I used my debugging unit to figure out where bugs are.  And I have a profiler to find the slow code - I haven't released that part yet because I'm still fine tuning it.  

Erick

http://www.erickengelke.com
Thu, Mar 15 2018 3:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rick,

<< Fair enough. In the linked thread it says "procedure TEventManager.SetEventhandlers; in the WebCtrls unit." I guess I must have misunderstood this. >>

That was prior to EWB 2.x., which wasn't released until 2015.  All of the base UI functionality went into WebUI unit in 2.x so that it could be abstracted out for dual design-time/run-time usage.

Tim Young
Elevate Software
www.elevatesoft.com
Image