How many Hierarchical Lists?

2017-08-14 Thread Wayne Stewart via 4D_Tech
Hi,

Is there a way you can find out how many lists there are?

I'm looking at a system where they use HLists as sort of objects. Storing
things in the "object" as list item parameters.

I'd like to check that they are being cleared correctly.

Regards,

Wayne


[image: --]
Wayne Stewart
[image: http://]about.me/waynestewart

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

Re: Listbox Printing

2017-08-14 Thread Keisuke Miyako via 4D_Tech
FORM LOAD simply loads the form definition.
the data source (variables and arrays) are not bound automatically in print.
you need to populate the objects by their names:

SET PRINT PREVIEW(True)

If (OK=1)

OPEN PRINTING JOB

FORM LOAD("Form1")

$aA:=OBJECT Get pointer(Object named;"Column1")
$aB:=OBJECT Get pointer(Object named;"Column2")

ARRAY LONGINT($aA->;0)
ARRAY TEXT($aB->;0)

For ($i;1;10)
APPEND TO ARRAY($aA->;$i)
APPEND TO ARRAY($aB->;"Text"+String($i))
End for

$printed:=Print object(*;"ListBox")

$v1:=OBJECT Get pointer(Object named;"v1")
$v1->:="Test String"

$printed:=Print object(*;"v1")

CLOSE PRINTING JOB

End if

> 2017/08/15 3:14、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> I did not mean to miss your point, but the following does not work when 
> called from within the component either.  The code I uploaded has it outside 
> the print job.  All variations have worked when used in the matrix structure.




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

Re: How to show / hide all on Property List in v16?

2017-08-14 Thread Lee Hinde via 4D_Tech
I never collapse/expand the sections…

> On Aug 14, 2017, at 2:04 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Um - does this mean no one else is seeing this behavior?

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

Re: How to show / hide all on Property List in v16?

2017-08-14 Thread Kirk Brooks via 4D_Tech
Well that explains why no one else seems to miss it...

I find it really handy to tighten the list when working with objects and
such.

On Mon, Aug 14, 2017 at 2:08 PM, Jody Bevan via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I didn’t know about this shortcut either. Never tried it before - or now.
>
> > On Aug 14, 2017, at 3:06 PM, Jeffrey Kain via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Never knew about this shortcut...
> >
> > --
> > Jeffrey Kain
> > jeffrey.k...@gmail.com
> >
> > On Aug 14, 2017, at 5:04 PM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >>
> >>> In prior versions when working with a form and the Property List is
> >>> displayed I could show/hide all panes on the list by holding the
> Control
> >>> (not the Command) key and clicking on one of the pane triangles. This
> >>> doesn't work for me in v16.
> >
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Re: How to show / hide all on Property List in v16?

2017-08-14 Thread Jody Bevan via 4D_Tech
I didn’t know about this shortcut either. Never tried it before - or now.

> On Aug 14, 2017, at 3:06 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Never knew about this shortcut...
> 
> --
> Jeffrey Kain
> jeffrey.k...@gmail.com
> 
> On Aug 14, 2017, at 5:04 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
>> 
>>> In prior versions when working with a form and the Property List is
>>> displayed I could show/hide all panes on the list by holding the Control
>>> (not the Command) key and clicking on one of the pane triangles. This
>>> doesn't work for me in v16.
> 

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

Re: How to show / hide all on Property List in v16?

2017-08-14 Thread Jeffrey Kain via 4D_Tech
Never knew about this shortcut...

--
Jeffrey Kain
jeffrey.k...@gmail.com

On Aug 14, 2017, at 5:04 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
>> In prior versions when working with a form and the Property List is
>> displayed I could show/hide all panes on the list by holding the Control
>> (not the Command) key and clicking on one of the pane triangles. This
>> doesn't work for me in v16.

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

Re: How to show / hide all on Property List in v16?

2017-08-14 Thread Kirk Brooks via 4D_Tech
Um - does this mean no one else is seeing this behavior?

Any thoughts about why it is happening on my machines?

On Thu, Aug 10, 2017 at 3:34 PM, Kirk Brooks  wrote:

> In prior versions when working with a form and the Property List is
> displayed I could show/hide all panes on the list by holding the Control
> (not the Command) key and clicking on one of the pane triangles. This
> doesn't work for me in v16.
>
> I've tried on two different Macs, one running Sierra and the other
> Yosemite. And I've tried every combination of modifiers I can think of.
>
> I believe I asked about this before. Is there some option I may have
> either set or unset to cause this? Really annoying.
>
> Thanks
>
> --
> Kirk Brooks
> San Francisco, CA
> ===
>
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
>
> *- Edmund Burke*
>
>


-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Re: Listbox Printing

2017-08-14 Thread Keith Culotta via 4D_Tech
I did not mean to miss your point, but the following does not work when called 
from within the component either.  The code I uploaded has it outside the print 
job.  All variations have worked when used in the matrix structure.

OPEN PRINTING JOB   
FORM LOAD("Form1")

ARRAY LONGINT(aA;0)
ARRAY TEXT(aB;0)
For ($i;1;10)
APPEND TO ARRAY(aA;$i)
APPEND TO ARRAY(aB;"Text"+String($i))
End for 

v1:="Test String"
$all:=Print object(*;"ListBox") 
$all:=Print object(*;"v1")

CLOSE PRINTING JOB

Keith - CDI

> On Aug 14, 2017, at 11:43 AM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I am not sure I understand your code;
> 
> are you not supposed to populate the arrays AFTER you call FORM LOAD (unless 
> the listbox already exists in the current form) ?
> 
>> 2017/08/14 23:29、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> I tried with the name as well. It works that way too, but not when run as a 
>> component.
>> 
>> SET PRINT PREVIEW(True)
>> If (OK=1)
>> 
>> ARRAY LONGINT(aA;0)
>> ARRAY TEXT(aB;0)
>> For ($i;1;10)
>> APPEND TO ARRAY(aA;$i)
>> APPEND TO ARRAY(aB;"Text"+String($i))
>> End for
>> 
>> OPEN PRINTING JOB
>> FORM LOAD("Form1")
>> $all:=Print object(*;"ListBox")
>> CLOSE PRINTING JOB
>> 
>> End if
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Listbox Printing

2017-08-14 Thread Keith Culotta via 4D_Tech
One correction - the Listbox appears when I use the Name.  (The component built 
in an unused location when I tested your suggestion)

The listbox already appears in the current form, and does print as expected.  
However when the app is compiled as a component, and its method called from the 
Host, the values do not appear in the printout.

It can be called from both apps by the shared "printLB" method.  
http://cdinc.co/Sample/LBPrint.zip   It 
just acts differently when "printLB" is called from a host.

v16.1

Keith - CDI

> On Aug 14, 2017, at 11:43 AM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I am not sure I understand your code;
> 
> are you not supposed to populate the arrays AFTER you call FORM LOAD (unless 
> the listbox already exists in the current form) ?
> 
>> 2017/08/14 23:29、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> I tried with the name as well. It works that way too, but not when run as a 
>> component.
>> 
>> SET PRINT PREVIEW(True)
>> If (OK=1)
>> 
>> ARRAY LONGINT(aA;0)
>> ARRAY TEXT(aB;0)
>> For ($i;1;10)
>> APPEND TO ARRAY(aA;$i)
>> APPEND TO ARRAY(aB;"Text"+String($i))
>> End for
>> 
>> OPEN PRINTING JOB
>> FORM LOAD("Form1")
>> $all:=Print object(*;"ListBox")
>> CLOSE PRINTING JOB
>> 
>> End if
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Listbox Printing

2017-08-14 Thread Keisuke Miyako via 4D_Tech
I am not sure I understand your code;

are you not supposed to populate the arrays AFTER you call FORM LOAD (unless 
the listbox already exists in the current form) ?

> 2017/08/14 23:29、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> I tried with the name as well. It works that way too, but not when run as a 
> component.
>
> SET PRINT PREVIEW(True)
> If (OK=1)
>
> ARRAY LONGINT(aA;0)
> ARRAY TEXT(aB;0)
> For ($i;1;10)
> APPEND TO ARRAY(aA;$i)
> APPEND TO ARRAY(aB;"Text"+String($i))
> End for
>
> OPEN PRINTING JOB
> FORM LOAD("Form1")
> $all:=Print object(*;"ListBox")
> CLOSE PRINTING JOB
>
> End if




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

RE: Get Info from a 4D Client - aka Interclient communication

2017-08-14 Thread Randy Engle via 4D_Tech
Hi Kirk,

Cool.  Thanks.

This gave me some good ideas!

Randy Engle
XC2 Software LLC – XC2LIVE!

-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Kirk Brooks 
via 4D_Tech
Sent: Monday, August 14, 2017 8:24 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Kirk Brooks 
Subject: Re: Get Info from a 4D Client - aka Interclient communication

Randy,
You could have a background process on 4D server that periodically pings the 
web server. Or makes an http call to it. I use a service to monitor server 
status that relies on this approach. This will also raise a flag if the server 
is un-available for some reason even if it is running.

​But if 4D server is walled off from the internet I'd use Execute on client and 
Web is server running 
.
But that requires you to know which client is running it. Maybe there are more 
than one? Using a table, like you're doing already, isn't such a terrible idea. 
But you could also do the same thing with variables and avoid the SET VARIABLE 
issues by using execute on server.

Let's say this loop is running in a background process on a client:

$webInfo:=JSON Parse("{}")
OB SET($webInfo;"machine";Current machine)

While(not($done))

OB SET($webInfo;"timestamp";Timestamp)
OB SET($webInfo;"running";WEB Is server running)

 If(WEB Is server running)// optional info

... // IP, # processes, ...

 End if


WEB_update_monitor($webInfo)

DELAY PROCESS(Current process;300)

End while


WEB_update_monitor executes on server :

// WEB_update_monitor
<>webInfo_obj:=$1


And on the server you have some monitor process running that looks at 
<>webInfo_obj and acts accordingly.

If more than one client might be involved I'd use an object array but the 
mechanics are the same.


On Sun, Aug 13, 2017 at 6:18 PM, Randy Engle via 4D_Tech < 
4d_tech@lists.4d.com> wrote:

> In this particular case, I've got the web server running on the 
> client, and I want to know if the web server is in fact running.
>
> --
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

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

Re: Get Info from a 4D Client - aka Interclient communication

2017-08-14 Thread Kirk Brooks via 4D_Tech
Randy,
You could have a background process on 4D server that periodically pings
the web server. Or makes an http call to it. I use a service to monitor
server status that relies on this approach. This will also raise a flag if
the server is un-available for some reason even if it is running.

​But if 4D server is walled off from the internet I'd use Execute on client
and Web is server running
.
But that requires you to know which client is running it. Maybe there are
more than one? Using a table, like you're doing already, isn't such a
terrible idea. But you could also do the same thing with variables and
avoid the SET VARIABLE issues by using execute on server.

Let's say this loop is running in a background process on a client:

$webInfo:=JSON Parse("{}")
OB SET($webInfo;"machine";Current machine)

While(not($done))

OB SET($webInfo;"timestamp";Timestamp)
OB SET($webInfo;"running";WEB Is server running)

 If(WEB Is server running)// optional info

... // IP, # processes, ...

 End if


WEB_update_monitor($webInfo)

DELAY PROCESS(Current process;300)

End while


WEB_update_monitor executes on server :

// WEB_update_monitor
<>webInfo_obj:=$1


And on the server you have some monitor process running that looks at
<>webInfo_obj and acts accordingly.

If more than one client might be involved I'd use an object array but the
mechanics are the same.


On Sun, Aug 13, 2017 at 6:18 PM, Randy Engle via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> In this particular case, I've got the web server running on the client,
> and I want to know if the web server is in fact running.
>
> --
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

[MEETING] Montreal 4D Club Meeting

2017-08-14 Thread Thierry Daigneault via 4D_Tech
The next meeting of the Montreal 4D Club will be held Wednesday August 16th at 
7 PM.

The schedule for the next meeting is as follows:
News
Questions
Presentations
- Open meeting. Bring your questions and presentations.
End of the meeting

We usually end up at some sort of restaurant after each meeting. Come and join 
us!



Address
---
254 Queen St, in Old Montreal, Quebec


Anyone can attend. Please note that the meetings are usually held in French.

If you need more information, you can check out our web page at:
http://www.macapa.com/4dmtl 

You can also write to our communications officer:
Thierry Daigneault: tdaignea...@macapa.com 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Keep Alive Connections Number of requests by connection

2017-08-14 Thread David Ringsmuth via 4D_Tech
When running 4D Server behind a proxy server (nginx), does 4D Server consider 
all of the requests from the proxy server to be from the same connection? The 
proxy server shows only 1 process ID.

With between 500 and 2000 requests per second from the proxy server, what is 
the recommend setting for “Number of requests by connection”?

In this case both nginx and 4D Server are running on the same machine (windows).

Thanks!

David Ringsmuth

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

Re: Listbox Printing

2017-08-14 Thread Keith Culotta via 4D_Tech
I tried with the name as well. It works that way too, but not when run as a 
component.


SET PRINT PREVIEW(True)
If (OK=1)

ARRAY LONGINT(aA;0)
ARRAY TEXT(aB;0)
For ($i;1;10)
APPEND TO ARRAY(aA;$i)
APPEND TO ARRAY(aB;"Text"+String($i))
End for  

OPEN PRINTING JOB
FORM LOAD("Form1")
$all:=Print object(*;"ListBox")
CLOSE PRINTING JOB

End if 

Keith
 http://www.compdim.com/ | https://www.apple.com/support/macbasics/

> On Aug 13, 2017, at 5:18 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> have you tried using the object name instead ?
> 
>> 2017/08/13 5:46、Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> $obj:=(->Box_Sum)
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Backup failure

2017-08-14 Thread stardata.info via 4D_Tech

I all,

 I'm looking for a way to get a notification when a backup error is
triggered. Is there a way that i can follow to make a custom code
that advertise me when this event comes up?

Thanks
Ferdinando

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

Re: 4D_Tech Digest, Vol 123, Issue 23

2017-08-14 Thread Ingo Wolf via 4D_Tech
>Like to hear what other alternatives any of you have implemented to make sure 
>4DRemote as Web server is always operational.

I had once a 24/7 online payment system running for a customer. We had three 4D 
Server (all windows), each one (potentially) serving directly the web, with 
attached 4D Clients (all windows) for sending emails, generating PDFs, doing 
payment transactions etc. They were all behind the firewall. In the DMZ there 
was a load balancer together with some apache server (with automatic failover), 
which served static content. All three 4D Server replicated all changes via 
custom programming in near real time. Two of the 4D Server ran without journal 
file and without backup, the last one with journal file and backup. Dynamic 
content was requested from one of the three 4D Servers via reverse proxy. No 
load balancing here, exactly one of the three was the 'active' Server. Which 
one of them was configured in the config files of the apache servers. With this 
setup we could always take one 4D Server down for update or maintenance and 
have the other one active with the third as fail over. The attached clients 
were monitored (and automatically restarted if necessary) by 'robot watchdog' 
from Jens Blomster.

HTH
Ingo Wolf


-- 
ViELMAC Ingo Wolf
Rheinhessenring 53A
D 55597 Wöllstein
Tel. +49 (0)6703 3070320
Fax  +49 (0)6703 3070321
e-mail i...@vielmac.de
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Client/Remote as Web Server

2017-08-14 Thread Koen Van Hooreweghe via 4D_Tech
Hi Arnaud,

I’m doing a similar thing, but a little more sophisticated...

From my 4D ‘to be watched’ processes, I write the last date and time of 
execution. Then I have a watchdog AppleScript which checks the datetime and 
sends an email if something is wrong.

Finally a crontab entry launches the AppleScript every … minutes.

AppleScript: =

-- read deamon file content subroutine
on readDaemonFile(thePath)
tell application "Finder"
try
if exists file thePath then
set fileExists to true
else
set fileExists to false
end if
end try
end tell

if fileExists then
set theFile to (open for access file thePath)
set theText to (read theFile for (get eof theFile))
close access theFile
else
set theText to ""
end if

return theText
end readDaemonFile

on alertDaemon(theDaemonName, theDBName, theText)
set maxTime to 1 * 60 * 60 --max 1 hour

if theText is not equal to "" then
set dimonaTime to date (theText)
if (((current date) - dimonaTime) > maxTime) then
sendMail(theDBName & " " & theDaemonName & " *** daemon 
probleem.", “Last run: " & theText)
else
--all is fine
end if
else
sendMail(theDBName & " " & theDaemonName & " *** daemon 
probleem.", "Daemon not active.")
end if
end alertDaemon


-- check dimona daemon
set pathDaemonaFile to "Macintosh HD:Batch:dimona_deamon.txt"

alertDaemon(“MyProject", "DIMONA", readDaemonFile(pathDaemonaFile))

AppleScript: =


Kind regards,
Koen


> Op 13 aug. 2017, om 16:49 heeft Arnaud de Montard via 4D_Tech 
> <4d_tech@lists.4d.com> het volgende geschreven:
> 
>> I have 4D Client running as a web server on windows.  I have the client 
>> write a text file every 45 seconds or so to disk.  I then have a batch 
>> script that runs every minute and looks for that file and deletes it.  If 
>> the file is not found it kills the 4D task and restarts 4D Client. 
> 
> Something similar on macOS, someone?




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

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

Re: 4D Client/Remote as Web Server

2017-08-14 Thread Paul Dennis via 4D_Tech
I run client webserver on windows and use nssm to  run client as a service.
Works great. Dont run any methods to keep activity up stays connected all
weekend. 
Paul 



--
View this message in context: 
http://4d.1045681.n5.nabble.com/4D-Client-Remote-as-Web-Server-tp5753659p5753671.html
Sent from the 4D Tech mailing list archive at Nabble.com.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**