Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Windows / mac treat text based timestamps differently


Maarten Witberg
 Share

Recommended Posts

I am curious if anyone can confirm or deny this as new behaviour after a system update of windows 7. My client has been running this software on windows since december without problems.

 

See two screen views of the dataviewer. I am afraid img upload to this site is off at the moment so sorry for the inconvenience.

 

One taken in Win7, one in OSX Lion. Same file, same data, same procedure: grabbin a bunch of text lines from a web page. the text lines are timestamp indexed. The index is stored in a $variable. Based on the timestamp taken from a field in a table, the line is skipped or included. The skippables and includeables are stored in $$variables.

 

Please note that $$include is a list of values (currently one value) stored from a timestamp field. $current is the current line from the text field and $identifier is the first value of that line. In this case, a text-based timestamp.

 

You will notice the leading zero that's not there in the $$include when running this in WIN7. In MAC, everything's hunky-dory. But in Windows, it throws of the following if[]:

 

IF [PatternCount ( $$skip ; $identifier ) ]

 

So instead of

 

Set Variable [ $identifier ; GetValue ( $current ; 1 ) ]

 

this fixes the issue

 

Set Variable [ $identifier ; GetAsTimestamp ( GetValue ( $current ; 1 ) ) ]

 

 

 

 

dataview_win7

 

MAC_lion dataviewer

Link to comment
Share on other sites

In the screen shots you posted, neither OS is throwing up on any value you are passing it. You're saying, though, that if you did not use GetAsTimeStamp () around GetValue ($current; 1), Windows would give you a text result instead of a timestamp result in $identifier?

 

 

By the way, I've always found it safest to set $variables to explicit data types (or to assess the $variable as a specific GetAs data type) any time the intended data type is NOT just text. It may not always be necessary but it never hurts.

 

If [$Iteration > ValueCount ($Something) ]

If [ GetAsNumber ($Iteration) > ValueCount ($Something) ]

 

 

Be that as it may, it's discomfiting when there are x-plat inconsistencies. It's not the kind of scripting where you expect to have to check for opposite-platform compatibility.

 

 

(Another one I noticed at some point was that Windows does not consistently like paths set as Get (DesktopPath) or documentspath or temporarypath & OptionalFolder/FileName.ext; seems to work OK for some processes but for others only works with the "filewin:" prefix. MacOS doesn't seem to ever require "filemac:")

Link to comment
Share on other sites

By the way, I've always found it safest to set $variables to explicit data types (or to assess the $variable as a specific GetAs data type) any time the intended data type is NOT just text. It may not always be necessary but it never hurts.

Absolutely, that's what I learned the hard way today....

 

Be that as it may, it's discomfiting when there are x-plat inconsistencies. It's not the kind of scripting where you expect to have to check for opposite-platform compatibility.

Took me two hours to spot this. I suspected it was an xplat thing because it never failed on my mac and always on client's and my own WIN7 machine. Finding where it went wrong and looking in the data viewer instead of the script debugger... and then seeing that missing 0....

 

But I still would like to know if anyone else noticed this behaviour, seeing as my client has been using this for some months now. There have been two and a half months (jan-march and three times nine days (01-09) where this could have gone wrong. Never a peep until today.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

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.

 Share



×
×
  • Create New...

Important Information

Terms of Use