Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Access to HTML Element
Mon, Aug 20 2012 5:18 PMPermanent Link

Mark Brooks

Slikware

Avatar

Question for Tim:

Many of the controls use an internal fElement field. It would be really useful for this to be exposed so that we could access some of the attributes not surfaced directly by the framework. I'm guessing that you haven't done this since it could be considered dangerous? I'd be interested in your thoughts when you have two minutes to breath!

Mark

PS. Development is going very well at this end. EWB is very, very good indeed. Thanks.
Tue, Aug 21 2012 7:05 AMPermanent Link

Robert Devine

Hi Mark

I use the following to get access to the TElement (in this case a TPanel
named 'TestPanel'):

var
  e: TElement;

e := window.document.getElementById('TestPanel');

Cheers, Bob


On 20/08/2012 22:18, Mark Brooks wrote:
> Question for Tim:
>
> Many of the controls use an internal fElement field. It would be really useful for this to be exposed so that we could access some of the attributes not surfaced directly by the framework. I'm guessing that you haven't done this since it could be considered dangerous? I'd be interested in your thoughts when you have two minutes to breath!
>
> Mark
>
> PS. Development is going very well at this end. EWB is very, very good indeed. Thanks.
>
Tue, Aug 21 2012 9:56 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< Many of the controls use an internal fElement field. It would be really
useful for this to be exposed so that we could access some of the attributes
not surfaced directly by the framework. I'm guessing that you haven't done
this since it could be considered dangerous? I'd be interested in your
thoughts when you have two minutes to breath! >>

The problem with modifying the elements directly is that some modifications
are harmless, while others will seriously throw the visual controls out of
whack.  For performance reasons, certain attributes of controls are cached
as control-specific variables in order to avoid performance problems with
reflow or layout events in the browser.  If such attributes are modified
directly, then the controls themselves have no knowledge of this and will
happily overwrite such changes or simply not work properly because they
assume that such changes aren't present.

So, I guess my answer is:  be careful, and use descendant classes if you
want to get at the internals. Smile

One of my primary goals for EWB going into the end of the year is to get
custom component development/installation available in the IDE, and that
should make this type of problem a lot easier to deal with.

<< PS. Development is going very well at this end. EWB is very, very good
indeed. Thanks. >>

Fantastic. Smile BTW, the StrToInt issue was fixed for the final release.

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

Tim Young
Elevate Software
www.elevatesoft.com
Image