Re: Storing Dates and Times From Different Time Zones

2018-12-20 Thread Keisuke Miyako via 4D_Tech
this works for dates...but not very practical, obviously.

C_DATE($d)
C_TIME($t)

$dbp:=Get database parameter(Dates inside objects)
SET DATABASE PARAMETER(Dates inside objects;String type with time zone)
$d:=JSON Parse("\""+$ISO+"\"";Is date)
XML DECODE($ISO;$t)
SET DATABASE PARAMETER(Dates inside objects;$dbp)





**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storing Dates and Times From Different Time Zones

2018-12-20 Thread Keisuke Miyako via 4D_Tech
oops!

this works for the time but not the date!

2018/12/21 11:02、Keisuke Miyako via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
XML DECODE($ISO;$d)



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storing Dates and Times From Different Time Zones

2018-12-20 Thread Keisuke Miyako via 4D_Tech
is this a competition?

then here's my entry:

$ISO:=String(Current date;ISO date GMT;Current time)

C_DATE($d)
C_TIME($t)

XML DECODE($ISO;$d)
XML DECODE($ISO;$t)



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WA Evaluate JavaScript in 16.4

2018-12-20 Thread Keisuke Miyako via 4D_Tech
originally designed as a "beginner language"
JS has some tolerant syntax rules,
being OK to omit the line terminator ";" is one of them.

of course, this could only work if the end-of-line can be implied without a ";" 
(for example, by \n)

I can understand the motivation to remove all \n from your script,
based on the observation that "WA Evaluate JS" can only run a single line of 
script.

a line, in this context, is not the line of code (separated by ";"), but 
rather, a line of text (separated by \n).

there was a bug (ACI0092713) in 13.5.HF1,
where the command could not execute code with multiple lines (\n).
it was fixed in  fixed in 13.6, but for WebKit back then and the system Web 
Area.

> The problem was that we assumed there would be no significant differences 
> between 16.4 and 16R6.


the embedded web area engine has changed from WebKit to CEF (Chrome Embedded 
Framework) in 16R 64-bit
http://doc.4d.com/4Dv17/4D/17/Appendix-4D-v16-Rx-Release-Notes.200-3899099.en.html

so are you saying that CEF has a similar problem with \n ?

before you remove all instances of \n (which could simply be inserted for 
legibility or even as a literal),
it would be better to make sure that the code has explicit ";" to indicate an 
end of code.

perhaps a "minification" tool would help.



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where the f*** is the knowledge base hidden???

2018-12-20 Thread Keisuke Miyako via 4D_Tech
Evidently, this is standard Mac/Safari behaviour (HSTS).

A system Daemon is telling Safari that all *.4d.com access 
should be forced https: regardless of what was entered in the address bar.
(Chrome respects the address, but it will display a warning that the site is 
insecure).

For some reason, doc, kb, forums are not https:, unlike most other 
*.4d.com sites.

In order to exclude subdomains from the general *.4d.com HSTS 
policy,
you might have to open Terminal and kill the daemon (killall nsurlstoraged)
then edit your ~/Library/Cookies/HSTS.plist file and set "Include Subdomains" 
to "NO" for 4d.com.

https://apple.stackexchange.com/questions/227662/how-do-i-fully-flush-cached-redirects-from-safari/285468

I am not sure at what point *.4d.com has manifested itself as 
HSTS.
I do hope all *.4d.com will become https: soon,
but meanwhile, if you are using Safari, you might have to use the above 
workaround.



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: WritePro expression undefined

2018-12-20 Thread David Ringsmuth via 4D_Tech
John,

We can manually limit the entry of commands and methods, since we control the 
UI that inserts expressions. It would be easier is the command SET ALLOWED 
METHODS did this for us automatically.

Thanks for your help John!

David Ringsmuth

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WritePro expression undefined

2018-12-20 Thread John DeSoi via 4D_Tech
There is no such command SET ALLOWED COMMANDS, only SET ALLOWED METHODS which 
only works on methods. If you allow users to enter "QUERY" then they can also 
enter DELETE SELECTION. The documentation says:

> If you would like the user to be able to call 4D commands that are 
> unauthorized by default or plug-in commands, you must use specific methods 
> that handle these commands. 
> Note: The mechanism for filtering access to commands and methods in the 
> Formula editor can be disabled for all users or for the Designer and 
> Administrator via an option on the "Security" page of the Database Settings. 
> If the "Disabled for all" option is checked, the SET ALLOWED METHODS command 
> will have no effect.


John DeSoi, Ph.D.


> On Dec 20, 2018, at 2:15 PM, David Ringsmuth  wrote:
> 
> SET ALLOWED COMMANDS should also work for 4D commands, since if a user is 
> allowed to enter expressions, than those expressions should be restrictable.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: WritePro expression undefined

2018-12-20 Thread David Ringsmuth via 4D_Tech
John,

We opened a case with 4D.

WritePro optionally displays expressions, or their calculated values.

We may have to parse the converted WritePro objects to replace queryies with a 
call formatted like:

Query_ (->[Student];->[Student]AccountNo;"=";->[Account]AccountNo)
…which does…
QUERY($Table_p->;$Field_p->;$Operator_t;$Value_p->)

It’s a bug. WritePro should not show “Undefined” as the result of a embedded 
query expression.

SET ALLOWED COMMANDS should also work for 4D commands, since if a user is 
allowed to enter expressions, than those expressions should be restrictable.

David Ringsmuth

From: John DeSoi via 4D_Tech
Sent: Thursday, December 20, 2018 11:43 AM
To: 4D iNug Technical
Cc: John DeSoi
Subject: Re: WritePro expression undefined

I see two options:

1. Submit a bug/feature request to 4D and hope they change it to return nothing 
instead of "Undefined".

2. Replace all of your QUERY commands with a method that returns an empty 
string.

I don't use 4D Write Pro, but I think automating the replacement in 4D Write 
before conversion should not be too difficult. I also think it would be a win 
over the way you are doing it because having the project method shows the 
queries, tables, and fields in the design environment referencing. You lose 
that visibility by embedding queries directly in 4D Write documents.

Maybe that does not work if you have end users writing their own queries for 4D 
Write. That seems dangerous to me.

John DeSoi, Ph.D.


> On Dec 20, 2018, at 11:01 AM, David Ringsmuth  wrote:
> 
> We have hundreds of converted documents with queries in them that worked 
> correctly in 4D Write. There they executed and did not display “Undefined” in 
> the 4D Write document. These should not have to be wrapped commands to work 
> without an “Undefined” appearing in the WritePro document.
>  
> This in new and apparently wrong behavior in WritePro.
>  
> If this is not an error in WritePro, and if it is the intended operation of 
> WritePro, then it is a warning to everyone converting from 4D Write documents.
> 

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WA Evaluate JavaScript in 16.4

2018-12-20 Thread Tom DeMeo via 4D_Tech
Hi,


I would suggest constructing an HTML page and loading any javascript libraries 
you need into it. Then load that page into a web area on a form. That will 
allow you to use WA EXECUTE JAVASCRIPT FUNCTION instead to call the functions 
you need from your loaded page. If this has to occur on the server and you 
cannot run a utility client, the NTK plugin 
https://www.pluggers.nl/product/ntk-plugin/ has a javascript interpreter that 
may work for you.

 

Tom DeMeo

> Message: 4
> Date: Thu, 20 Dec 2018 10:21:00 -0800
> From: Noah 
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Subject: Re: WA Evaluate JavaScript in 16.4
> Message-ID:
>   
> Content-Type: text/plain; charset="UTF-8"
> 
> Thanks for the quick reply!
> 
> We had constructed a minimal test: an external js file that contains
> *alert('hello')* on a single line and nothing else.
> 
> We may have now narrowed the scope of this issue to WA Execute JavaScript's
> ability to handle the '\n' in the javascript that it reads from a file.
> 
> When the file is read into 15.4 or 16.4 the returned text is
> *alert('hello')\n*. This was not a problem in 15.4, but the \n creates a
> problem with WA Evaluate JavaScript in v16.4.
> 
> Overcoming the bug by processing the read JS (to remove the \n) does the
> trick for our very simple test case (JavaScript in external files that are
> only a single line). Web areas in v16.4 will now 'alert' as expected.
> 
>$tJS_path:=Get 4D folder(Current resources folder)+"ncs_test.js"
>DOCUMENT TO BLOB($tJS_path;$bDoc)
>$test_js:=BLOB to text($bDoc;UTF8 text without length)
>  // replace the carriage return \n with ''
>$codeBody:=Replace string($test_js;Char(10);"")
>WA Evaluate JavaScript(wa;$codeBody)
> 
> However, this is obviously not going to solve our larger problem of being
> able to load JavaScript libraries to scrape a web page.
> 
> The JavaScript code in the external files contains comments... and perhaps
> other nuances that would render the above solution insufficient.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storing Dates and Times From Different Time Zones

2018-12-20 Thread John DeSoi via 4D_Tech
I use the code below to determine the number of seconds offset from GMT for the 
current time zone. This could be added back to a GMT time stamp to get the 
local time.

John DeSoi, Ph.D.


C_LONGINT($0)

C_DATE($zDate;$gmtDate)
C_TIME($zTime;$gmtTime)
C_TEXT($str)

$zDate:=Current date

$str:=String($zDate;ISO date GMT;$zTime)  //2010-09-13T16:11:53Z
$str:=Substring($str;1;Length($str)-1)  //Remove the Z or it gives us back 
local time.
$gmtDate:=Date($str)
$gmtTime:=Time($str)

Case of 
  : ($zDate=$gmtDate)
$0:=$zTime-$gmtTime
  : ($zDate>$gmtDate)
$0:=(?24:00:00?-$gmtTime)+$zTime
  : ($gmtDate>$zDate)
$0:=0-((?24:00:00?-$zTime)+$gmtTime)
End case 


> On Dec 20, 2018, at 11:54 AM, Nate Rheaume via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> We have clients that are accessing the same server database from different 
> time zones. We would like to store date/time using GMT and then display it in 
> the users local time zone.
> 
> Using the String command it's easy to convert to GMT but I'm not sure what 
> the best way is the convert GMT back to the local time zone.
> 
> Has anyone else dealt with this issue? Any feedback is appreciated.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Coding/Development Style Guide?

2018-12-20 Thread Comcast POP via 4D_Tech
Hi Garri,

Thank’s for responding.  

I’m reasonably solid with variable/field naming, I think (at least once I get 
updated to include blobs and object types). As far as forms and method names go 
though, my approach developed organically over the years and really only 
applied to a single app so isn’t ideal. I’m looking for some suggestions that 
can be applied more generally. Sounds like that’s what you’ve done. 

I would like to see what you’ve done.

Thanks,

Tom

> On Dec 18, 2018, at 14:08, Garri Ogata via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Tom,
> 
> I use a naming convention and a set of methods that gets created for every 
> module and form. I have used it with multiple programmers some where working 
> on a server and some remotely. I would be glad to share with you if you like. 
> Most of it is documented. It is based on using a four letter acronym for each 
> module.
> 
> Feel free to contact me via email if you are interested.
> 
> Garri
> 
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> on behalf of Jody Bevan via 
> 4D_Tech <4d_tech@lists.4d.com>
> Sent: Tuesday, December 18, 2018 7:43 PM
> To: 4D iNug Technical
> Cc: Jody Bevan
> Subject: Re: Coding/Development Style Guide?
> 
> Tom:
> 
> We rewrote our shell for v16 from scratch. I also wanted to write complete 
> documentation on using the shell too. That of course included naming 
> convention for everything (even table names), includes lots of code that is 
> very easy to add to code you are writing, and explanation of a lot of the 
> code, and how to do things. The manual is just under 300 pages currently.
> 
> The naming convention (and the shell) is the result of many years of 
> development with multiple developers and thousands of end users. It has been 
> put through the wringer a few times over.
> 
> Sadly, I have not felt the need to complete the manual (I figure it is about 
> 50% done).
> 
> Jody
> 
> Argus Productions Inc.
> 
> 
> 
>> On Dec 14, 2018, at 9:28 AM, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Anybody out there have a style guide for development that they’ve written? I 
>> know a lot of people use shells that either they or others have written and 
>> that goes a long way toward supporting ease of maintenance of an app. Have 
>> you formalized guidelines on coding style, UI standards, naming conventions 
>> etc? I’m especially looking for examples that have worked well in team 
>> development.
>> 
>> Thanks for any input.
>> 
>> Tom Benedict
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WA Evaluate JavaScript in 16.4

2018-12-20 Thread Noah via 4D_Tech
Thanks for the quick reply!

We had constructed a minimal test: an external js file that contains
*alert('hello')* on a single line and nothing else.

We may have now narrowed the scope of this issue to WA Execute JavaScript's
ability to handle the '\n' in the javascript that it reads from a file.

When the file is read into 15.4 or 16.4 the returned text is
*alert('hello')\n*. This was not a problem in 15.4, but the \n creates a
problem with WA Evaluate JavaScript in v16.4.

Overcoming the bug by processing the read JS (to remove the \n) does the
trick for our very simple test case (JavaScript in external files that are
only a single line). Web areas in v16.4 will now 'alert' as expected.

$tJS_path:=Get 4D folder(Current resources folder)+"ncs_test.js"
DOCUMENT TO BLOB($tJS_path;$bDoc)
$test_js:=BLOB to text($bDoc;UTF8 text without length)
  // replace the carriage return \n with ''
$codeBody:=Replace string($test_js;Char(10);"")
WA Evaluate JavaScript(wa;$codeBody)

However, this is obviously not going to solve our larger problem of being
able to load JavaScript libraries to scrape a web page.

The JavaScript code in the external files contains comments... and perhaps
other nuances that would render the above solution insufficient.




On Thu, Dec 20, 2018 at 9:58 AM John DeSoi via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Try turning 'Use embedded rendering engine' off for the web area. And
> verify your JavaScript code works outside of 4D in Safari when using Mojave.
>
> John DeSoi, Ph.D.
>
>
> > On Dec 20, 2018, at 11:10 AM, Noah via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > The parent form:
> > Case of
> >: (Form event=On Load)
> >WA OPEN URL(wa;"https://google.com/;)
> >WA SET PREFERENCE(wa;WA enable JavaScript;True)
> >WA SET PREFERENCE(wa;WA enable Web inspector;True)
> > End case
> >
> > 'Use embedded rendering engine' is checked.
> >
> > Has anyone else experienced this? Any suggestions?
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Storing Dates and Times From Different Time Zones

2018-12-20 Thread Timothy Penner via 4D_Tech
Tech Tip: Convert ISO GMT date string to local time, date and ISO date string
http://kb.4d.com/assetid=77110

-Tim




-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Nate Rheaume via 
4D_Tech
Sent: Thursday, December 20, 2018 9:55 AM
To: 4d_tech@lists.4d.com
Cc: Nate Rheaume 
Subject: Storing Dates and Times From Different Time Zones

We have clients that are accessing the same server database from different time 
zones. We would like to store date/time using GMT and then display it in the 
users local time zone.

Using the String command it's easy to convert to GMT but I'm not sure what the 
best way is the convert GMT back to the local time zone.

Has anyone else dealt with this issue? Any feedback is appreciated.



Nate Rheaume
Software Developer
n...@dwdev.com
(425) 673-1974
www.freezerworks.com
Dataworks Development, Inc.
Providing secure and configurable data management solutions for research and 
clinical labs since 1987.


**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WA Evaluate JavaScript in 16.4

2018-12-20 Thread John DeSoi via 4D_Tech
Try turning 'Use embedded rendering engine' off for the web area. And verify 
your JavaScript code works outside of 4D in Safari when using Mojave.

John DeSoi, Ph.D.


> On Dec 20, 2018, at 11:10 AM, Noah via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> The parent form:
> Case of
>: (Form event=On Load)
>WA OPEN URL(wa;"https://google.com/;)
>WA SET PREFERENCE(wa;WA enable JavaScript;True)
>WA SET PREFERENCE(wa;WA enable Web inspector;True)
> End case
> 
> 'Use embedded rendering engine' is checked.
> 
> Has anyone else experienced this? Any suggestions?

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Storing Dates and Times From Different Time Zones

2018-12-20 Thread Nate Rheaume via 4D_Tech
We have clients that are accessing the same server database from different time 
zones. We would like to store date/time using GMT and then display it in the 
users local time zone.

Using the String command it's easy to convert to GMT but I'm not sure what the 
best way is the convert GMT back to the local time zone.

Has anyone else dealt with this issue? Any feedback is appreciated.



Nate Rheaume
Software Developer
n...@dwdev.com
(425) 673-1974
www.freezerworks.com
Dataworks Development, Inc.
Providing secure and configurable data management solutions for research and 
clinical labs since 1987.


**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WritePro expression undefined

2018-12-20 Thread John DeSoi via 4D_Tech
I see two options:

1. Submit a bug/feature request to 4D and hope they change it to return nothing 
instead of "Undefined".

2. Replace all of your QUERY commands with a method that returns an empty 
string.

I don't use 4D Write Pro, but I think automating the replacement in 4D Write 
before conversion should not be too difficult. I also think it would be a win 
over the way you are doing it because having the project method shows the 
queries, tables, and fields in the design environment referencing. You lose 
that visibility by embedding queries directly in 4D Write documents.

Maybe that does not work if you have end users writing their own queries for 4D 
Write. That seems dangerous to me.

John DeSoi, Ph.D.


> On Dec 20, 2018, at 11:01 AM, David Ringsmuth  wrote:
> 
> We have hundreds of converted documents with queries in them that worked 
> correctly in 4D Write. There they executed and did not display “Undefined” in 
> the 4D Write document. These should not have to be wrapped commands to work 
> without an “Undefined” appearing in the WritePro document.
>  
> This in new and apparently wrong behavior in WritePro.
>  
> If this is not an error in WritePro, and if it is the intended operation of 
> WritePro, then it is a warning to everyone converting from 4D Write documents.
> 

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

WA Evaluate JavaScript in 16.4

2018-12-20 Thread Noah via 4D_Tech
Good morning!

SUMMARY:
In 16.4 (interpreted mode) we have a web area which displays a web page
that is not under our control. We had devised a way to scrape the webpage
with a custom library of JavaScript files that we kept in the resources
folder. We find that in 16.4 the WA Evaluate JavaScript does not evaluate
the JavaScript from external files.

HISTORY:
We recently moved from 15.4 to 16R6 (which was a mistake, since it is not
Mojave compatible). When we did, we had to update various aspects of our
app to work with the new version. The web area was one area that required
our attention. In the end, it appeared that we just needed to check the
'use embedded webkit'. When a development machine was upgraded to Mojave we
were locked out of developing in 16R6, so (at the advice of 4D support) we
quickly changed to 16.4 (which is actively supported).
The problem was that we assumed there would be no significant differences
between 16.4 and 16R6. There were several changes (method name conversions)
that happened automatically, but (more importantly) the WA Evaluate
JavaScript stopped working with our JS code loaded from external files.

Here is the relevant testing code from the web area:
Case of
: (Form event=On End URL Loading)

  // test the 'fetching' of javascript
$tJS_path:=Get 4D folder(Current resources
folder)+"SciQuest"+<>ktDir_Separator+"ncs_test.js"
DOCUMENT TO BLOB($tJS_path;$bDoc)
$test_js:=BLOB to text($bDoc;UTF8 text without length)
WA Evaluate JavaScript(wa;$test_js)
  // end test
End case

The parent form:
Case of
: (Form event=On Load)
WA OPEN URL(wa;"https://google.com/;)
WA SET PREFERENCE(wa;WA enable JavaScript;True)
WA SET PREFERENCE(wa;WA enable Web inspector;True)
End case

'Use embedded rendering engine' is checked.

Has anyone else experienced this? Any suggestions?
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: WritePro expression undefined

2018-12-20 Thread David Ringsmuth via 4D_Tech
John,

WritePro documents may contain references to [Table]Field, which requires that 
the record be present during printing, which may require QUERY commands.

The embedded QUERY commands work, execute properly in WritePro.

But in place of the embedded expression is the value “Undefined”.

We have hundreds of converted documents with queries in them that worked 
correctly in 4D Write. There they executed and did not display “Undefined” in 
the 4D Write document. These should not have to be wrapped commands to work 
without an “Undefined” appearing in the WritePro document.

This in new and apparently wrong behavior in WritePro.

If this is not an error in WritePro, and if it is the intended operation of 
WritePro, then it is a warning to everyone converting from 4D Write documents.

David Ringsmuth

From: John DeSoi via 4D_Tech
Sent: Thursday, December 20, 2018 10:38 AM
To: 4D iNug Technical
Cc: John DeSoi
Subject: Re: WritePro expression undefined

SET ALLOWED METHODS specifies project methods allowed, not 4D commands. So 
unless you named a project method the same as the 4D command QUERY, you are 
using it wrong. And the 4D command QUERY does not return a result, so I'm not 
sure how you would use that in an expression. Of course, you can write a 4D 
project method that uses QUERY and returns a result in $0 as the result of the 
4D Write expression.

John DeSoi, Ph.D.


> On Dec 20, 2018, at 9:30 AM, David Ringsmuth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> WP PRINT(Rpt_ob;wk 4D Write Pro layout)
> SET ALLOWED METHODS included “QUERY”
> 
> 4D Query command expressions appear as “Undefined” in the printed document. 
> The command appears successful.
> 
> Please help!

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: WritePro expression undefined

2018-12-20 Thread John DeSoi via 4D_Tech
SET ALLOWED METHODS specifies project methods allowed, not 4D commands. So 
unless you named a project method the same as the 4D command QUERY, you are 
using it wrong. And the 4D command QUERY does not return a result, so I'm not 
sure how you would use that in an expression. Of course, you can write a 4D 
project method that uses QUERY and returns a result in $0 as the result of the 
4D Write expression.

John DeSoi, Ph.D.


> On Dec 20, 2018, at 9:30 AM, David Ringsmuth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> WP PRINT(Rpt_ob;wk 4D Write Pro layout)
> SET ALLOWED METHODS included “QUERY”
> 
> 4D Query command expressions appear as “Undefined” in the printed document. 
> The command appears successful.
> 
> Please help!

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

WritePro expression undefined

2018-12-20 Thread David Ringsmuth via 4D_Tech
4D v17.2.0.0 227919 R2 32bit or 64bit
Windows 10 Home 1803

WP PRINT(Rpt_ob;wk 4D Write Pro layout)
SET ALLOWED METHODS included “QUERY”

4D Query command expressions appear as “Undefined” in the printed document. The 
command appears successful.

Please help!

Thanks!

David Ringsmuth

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**