Jump to content

What happened to VarIsValidRef?


Recommended Posts

In the REST code example I have, it looks like the demo has not been updated to work with version 3.0.2.20.
 

  var dt := TDateAndTime(JSON.Parse(http.ResponseText));

  // dt.date will be 'undefined' if a bad response is returned
  // this may cause problems in a more complex code but works fine here
  Log('Date: ' + dt.date);

  // better way is to test explicitely
  Log('Time: ' + if VarIsValidRef(dt.time) then dt.time else 'unknown');

Has this function been removed? If so, what is a method to replace this. I saw some commented examples in SmartCL.Graphics.pas, but I was not sure how to handle this.

Thanks for any feedback.

Link to post
Share on other sites
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...