Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Reflection
Fri, Oct 26 2012 9:10 AMPermanent Link

Robert Devine

Hi Tim

Is there any way to get access to, e.g., getOwnPropertyNames and
hasOwnProperty for an object? I need to get an object's property name as
a string. Maybe there's another way to do this?

Thanks, Bob
Mon, Oct 29 2012 1:39 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bob,

<< Is there any way to get access to, e.g., getOwnPropertyNames and
hasOwnProperty for an object? I need to get an object's property name as a
string. Maybe there's another way to do this? >>

There's really no RTTI in EWB, at least not yet.  There is JavaScript
support for doing this type of thing, but it would be pretty useless to the
Object Pascal code because of what the EWB compiler does to identifiers,
especially with compression. Wink

Per Mark's post - I'll see about adding this to the compiler as part of the
1.03 round of improvements, which will deal primarily with improving the
compiler.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Nov 15 2012 11:35 AMPermanent Link

Robert Devine

Hi Tim

I was able to identify the required field names in the compressed code
and get my test working. Does the compressor always use the same
generator to create property names? IOW, will "categoryField" always be
converted to "ad_fW" - if so then I can get by until some rtti becomes
available.

Cheers, Bob


On 29/10/2012 17:39, Tim Young [Elevate Software] wrote:
> Bob,
>
> << Is there any way to get access to, e.g., getOwnPropertyNames and
> hasOwnProperty for an object? I need to get an object's property name as
> a string. Maybe there's another way to do this? >>
>
> There's really no RTTI in EWB, at least not yet.  There is JavaScript
> support for doing this type of thing, but it would be pretty useless to
> the Object Pascal code because of what the EWB compiler does to
> identifiers, especially with compression. Wink
>
> Per Mark's post - I'll see about adding this to the compiler as part of
> the 1.03 round of improvements, which will deal primarily with improving
> the compiler.
>
> Tim Young
> Elevate Software
> www.elevatesoft.com
Image