Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread TEvent.data
Tue, Dec 3 2013 7:38 AMPermanent Link

Leslie

I need  TEvent  to publish the underlying DOM events  "data"  attribute. But the type of "data" cany vary. As far as I know EWB does not support variants. Is there a solution for this?

My none EWB only approach  would to be create separate  JS functions with the event as a parameter for all the possible return types. But how do I get pass the underlying  DOM event from EWB code?

Cheers,
Leslie
Tue, Dec 3 2013 7:44 AMPermanent Link

Leslie

= But how do I pass  the underlying  DOM event from EWB code?


procedure SomeEventhandler(event: Tevent);
...
 aBlob:= ExternalFunctionReturningEventDataAsBlob( ???DOMEvent_From_Tevent???);
...  
Sat, Dec 7 2013 5:18 AMPermanent Link

Leslie

To answer my question (If I understand right): since TEvent is just an interface to the underlying DOM event, there is no need for conversion:

procedure SomeEventhandler(event: Tevent);
...
 aBlob:= ExternalFunctionReturningEventDataAsBlob(event);
...  

Cheers,
Leslie
Mon, Dec 9 2013 6:20 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Leslie,

<< To answer my question (If I understand right): since TEvent is just an
interface to the underlying DOM event, there is no need for conversion: >>

Correct.   TEvent is the catch-all for most JS events.  For example, all of
the HTML5 audio/video events are just TEvents because they're all similar to
the Delphi TNotifyEvent - they are just letting you know something happened.
Smile

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com


Mon, Dec 9 2013 6:38 PMPermanent Link

Leslie

Tim,

How to deal with  TEvent.Data ?


Cheers,
Leslie
Mon, Dec 9 2013 6:39 PMPermanent Link

Leslie

More precisely:

How to deal with  TEvent.Data  in EWB?
Sat, Dec 14 2013 6:55 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Leslie,

<< How to deal with  TEvent.Data ? >>

Where are you getting the Data property from ?  AFAIK, it's only defined in
later DOM specs, and only as a string.

Tim Young
Elevate Software
www.elevatesoft.com
Image