Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Small bug : Nil is preserved in Pascal->JS
Thu, Nov 12 2020 12:40 PMPermanent Link

erickengelke

I've started trying compiling library code and ran into a small bug.

var
 x : variant;
begin
 x := ....

 if x = Nil then exit;

generates
 if (x == Nil) return

I believe it should test  x == Null

A quick look through the compiled JS shows that several library statements in Webcomps.Tlocation....
also evaluate to testing against the undefined  Nil

Otherwise, I see that enforcement of casting during assignment is done, which is a good thing.  
I like the typing completion features.  Lots to like!

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Thu, Nov 12 2020 6:07 PMPermanent Link

erickengelke

erickengelke wrote:

> I've started trying compiling library code and ran into a small bug.
>  if x = Nil then exit;
> generates
>  if (x == Nil) return

if  Assigned( x ) works correctly and can be used in its place.

Also, assigning Nil to a variable is impossible and generates a runtime error, but you can assign NULL_VALUE which works as a workaround.

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Thu, Nov 12 2020 6:25 PMPermanent Link

erickengelke

Also, dataset's GetColumns functions generates an error for me on a well defined TDataSet.  In 2.x it created a nice string.

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Thu, Nov 12 2020 6:32 PMPermanent Link

erickengelke

Finally for today, THTMLLabel's no longer have a dblclick handler, that was a handy thing to have.  Not sure why its omitted.

Thanks

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
EWB Programming Books and Component Library
http://www.erickengelke.com
Tue, Nov 17 2020 12:22 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Erick,

<< Also, dataset's GetColumns functions generates an error for me on a well defined TDataSet.  In 2.x it created a nice string. >>

What error message are you seeing ?

Also, please post separate issues as separate topics, so I can keep them straight.

Thanks !

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Nov 17 2020 12:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Erick,

<< Finally for today, THTMLLabel's no longer have a dblclick handler, that was a handy thing to have.  Not sure why its omitted. >>

This was probably just inadvertent - I added it back in for build 20.

Thanks !

Tim Young
Elevate Software
www.elevatesoft.com
Image