v17 obsolete commands SET DOCUMENT CREATOR / SET DOCUMENT TYPE

2019-08-07 Thread Jörg Knebel via 4D_Tech
G’day All,

Does someone has already developed a replacement (LEP or other) for both 
platforms?

Thanks

Cheers
Jörg
**
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: Prevent Client from Sleeping

2019-08-07 Thread Chuck Miller via 4D_Tech
The question is to why. I would think you just want to stop the drive from 
spinning down. Most companies hate when you do that as they want computer to 
lock after as short period of inactivity

On Mac there is a setting to stop drive from spinning down. I bet there is on 
windows as well

Regards

Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Aug 7, 2019, at 1:59 PM, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am trying to prevent clients from Sleeping when connected to a 4D server.

**
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: Prevent Client from Sleeping

2019-08-07 Thread John DeSoi via 4D_Tech
On the Mac you can use "caffeinate" via LEP.


NAME
 caffeinate -- prevent the system from sleeping on behalf of a utility

SYNOPSIS
 caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...]

DESCRIPTION
 caffeinate creates assertions to alter system sleep behavior.  If no 
assertion flags are specified, caffeinate creates an assertion to prevent idle 
sleep.
 If a utility is specified, caffeinate creates the assertions on the 
utility's behalf, and those assertions will persist for the duration of the 
utility's
 execution. Otherwise, caffeinate creates the assertions directly, and 
those assertions will persist until caffeinate exits.

 Available options:

 -d  Create an assertion to prevent the display from sleeping.

 -i  Create an assertion to prevent the system from idle sleeping.

 -m  Create an assertion to prevent the disk from idle sleeping.

 -s  Create an assertion to prevent the system from sleeping. This 
assertion is valid only when system is running on AC power.

 -u  Create an assertion to declare that user is active. If the display 
is off, this option turns the display on and prevents the display from going 
into
 idle sleep. If a timeout is not specified with '-t' option, then 
this assertion is taken with a default of 5 second timeout.

 -t  Specifies the timeout value in seconds for which this assertion 
has to be valid. The assertion is dropped after the specified timeout. Timeout 
value
 is not used when an utility is invoked with this command.

 -w  Waits for the process with the specified pid to exit. Once the the 
process exits, the assertion is also released.  This option is ignored when used
 with utility option.



John DeSoi, Ph.D.


> On Aug 7, 2019, at 12:59 PM, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Looking for ideas or thoughts on generating an event that will prevent the 
> client machine from sleeping?

**
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: Prevent Client from Sleeping

2019-08-07 Thread Timothy Penner via 4D_Tech
Hi Jim,

I am not sure that you will be able to effectively prevent the computer from 
sleeping.

Here are some examples that you will be unable to intercept:

- the user closes their laptop lid (the machine will most likely go to sleep - 
this is adjusted in power settings on Windows)

- the user selects SLEEP or STANDBY from the power/shutdown options (the 
machine will certainly go to sleep)

- the user uses the Windows Key + L key combination to lock the computer 
(moving the mouse or pasting keys will be ineffective if the machine is locked)

There may be others too.

-Tim



**
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: Pasting problem

2019-08-07 Thread William Swann via 4D_Tech
Nope, had those thoughts as well. I have carefully looked at all events 
for all of the objects to make certain nothing would be firing. These 
are straight text fields, context menu on or off. Further, I have tried 
using a popup dialog that fires a "text" dialog window to paste into as 
well. This uses a text variable and makes an assignment to the field 
after the user pastes. For the record, it happens even in that dialog 
window.


I actually played with styled text as well, but found it created a 
different set of problems


Bill

On 8/7/19 11:47 AM, Tom Benedict wrote:

Are you sure there’s no form event being triggered somehow? Is the text area 
styled text? Is this universal in all objects on all forms or just in a few 
places?

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
**

Re: Pasting problem

2019-08-07 Thread William Swann via 4D_Tech

What a great idea! Sometimes, you forget the simple.

Thank you Chip.

Anyone have an idea about trapping for the menu event w/o using On Event 
Call?


Bill

On 8/7/19 11:39 AM, Chip Scheide wrote:

to catch the keystroke without On Event Call:
you could put an invisible button on the form(s)
with cntrl-v as the activator, then use  Get Text From Pasteboard, and
insert it at the current cursor position

Im not sure if you can catch the contextual menu, but maybe:
with some imaginative use On Mouse Down, selected menu item you cold
catch the paste action that way too, then use Get Text from Pasteboard

Chip

On Wed, 7 Aug 2019 10:51:45 -0700, William Swann via 4D_Tech wrote:


**
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: Pasting problem

2019-08-07 Thread Tom Benedict via 4D_Tech
Are you sure there’s no form event being triggered somehow? Is the text area 
styled text? Is this universal in all objects on all forms or just in a few 
places?

Tom Benedict

> On Aug 7, 2019, at 10:51, William Swann via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> I am having a problem with pasting into text fields or variables on input 
> forms under Windows. The user clicks into or highlights a text area that is 
> already populated. They press either ctrl-v or select paste from the area's 
> contextual menu. The entire existing text block is replaced with only the new 
> text new from the paste event, even though they clicked into a specific point 
> to paste into. 
> We are using v14.6 for server and client.

**
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: Pasting problem

2019-08-07 Thread Chip Scheide via 4D_Tech
to catch the keystroke without On Event Call:
you could put an invisible button on the form(s)
with cntrl-v as the activator, then use  Get Text From Pasteboard, and 
insert it at the current cursor position

Im not sure if you can catch the contextual menu, but maybe:
with some imaginative use On Mouse Down, selected menu item you cold 
catch the paste action that way too, then use Get Text from Pasteboard

Chip

On Wed, 7 Aug 2019 10:51:45 -0700, William Swann via 4D_Tech wrote:
> Hi All,
> 
> I am having a problem with pasting into text fields or variables on 
> input forms under Windows. The user clicks into or highlights a text 
> area that is already populated. They press either ctrl-v or select 
> paste from the area's contextual menu. The entire existing text block 
> is replaced with only the new text new from the paste event, even 
> though they clicked into a specific point to paste into. This only 
> happens under Windows 7 or 10. Mac clients have never reported this 
> error/problem at all. I have seen it happen while watching users do 
> their work and there it is not a PEBCAK issue (_p_roblem _e_xists 
> _b_etween _c_hair _a_nd _k_eyboard).
> 
> I have toyed a bit with On Event Call and trapping for ctrl-v events 
> and creating a text pasting strategy, but this seems dangerous, 
> especially on a "system" related event that is better handled by 4D 
> and the host OS. The other trepidation is that the  On Event Call is 
> run in a completely different process, adding to the complexity of a 
> solution to trap the event and get the selection from the process 
> containing the text field. Further, I cannot figure out how to trap 
> for the context menu paste event.
> 
> We are using v14.6 for server and client.
> 
> We are moving the system to a more modern version of 4D in a couple 
> of months, but I need to find a fix or workaround until we can get 
> there... Has anyone seen this? It truly is frustrating.
> 
> HELP and thanks!
> 
> Bill Swann
> 
> **
> 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
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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: Prevent Client from Sleeping

2019-08-07 Thread Chip Scheide via 4D_Tech
Some ideas - none of these tested or tried :)

LEP - and use commands to bring the desktop to the fore and then 4D?
Move mouse to the menu bar, and post a click?

On launch of 4D use LEP to reset screen saver timeout, reset on quit
On launch of 4D use LEP to reset power timeout, reset on quit

LEP to open and then close a desktop window
open an off screen window (in 4D, with a web area), launch a connection 
to a safe url (apple or microsoft).

maybe even just touch the disk... pick a folder (desktop, or your 
database) and Get Document list
write an empty file to some safe location, and delete it.

Chip

On Wed, 7 Aug 2019 17:59:46 +, Jim Medlen via 4D_Tech wrote:
> 
> 
> To: 4d_tech@lists.4d.com
> From:   Jim Medlen
> Company:Functional Devices, Inc.
> Subject:Prevent Client from Sleeping
> Date:   Wednesday, August 7, 2019
> 
> 
>  Looking for ideas or thoughts on generating an event that will 
> prevent the client machine from sleeping?
> 
> I am trying to prevent clients from Sleeping when connected to a 4D server.
> 
> The POST KEY and POST EVENT both say "Its effect is as if the user 
> actually entered a character on the keyboard.”
> 
> but these events do not prevent the screen saver from activating.
> 
> It appears that the OS does not see this as a user event.
> 
> 
> Thanks,
> 
> Jim Medlen
> 
> Computer & Information Systems
> Functional Devices, Inc.
> j.med...@functionaldevices.com
> 
> Main:   (765) 883-5538 x 5735
> Direct: (765) 416-6835
> FAX:(765) 883-7505
> 
> http://www.functionaldevices.com
> 
> This email was transmitted on 100 percent recycled electrons
> 
> **
> 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
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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
**

Prevent Client from Sleeping

2019-08-07 Thread Jim Medlen via 4D_Tech


To: 4d_tech@lists.4d.com
From:   Jim Medlen
Company:Functional Devices, Inc.
Subject:Prevent Client from Sleeping
Date:   Wednesday, August 7, 2019


 Looking for ideas or thoughts on generating an event that will prevent the 
client machine from sleeping?

I am trying to prevent clients from Sleeping when connected to a 4D server.

The POST KEY and POST EVENT both say "Its effect is as if the user actually 
entered a character on the keyboard.”

but these events do not prevent the screen saver from activating.

It appears that the OS does not see this as a user event.


Thanks,

Jim Medlen

Computer & Information Systems
Functional Devices, Inc.
j.med...@functionaldevices.com

Main:   (765) 883-5538 x 5735
Direct: (765) 416-6835
FAX:(765) 883-7505

http://www.functionaldevices.com

This email was transmitted on 100 percent recycled electrons

**
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: pointer issue

2019-08-07 Thread Chip Scheide via 4D_Tech
can you rewrite the outer loop (the one that implied in the code you 
supplied) so that you pass a pointer to the array from calling method, 
rather then trying to create the pointer.

Array Real($MetalAmount_1;10)
Array Real($MetalAmount_2;10)
Array Real($MetalAmount_3;10)

for($i;1;3)
  case of
  :($i=1)
$Array_ptr:= -> $MetalAmount_1
  :($i=2)
$Array_ptr:= -> $MetalAmount_2
  etc
  end case
  process_metal_amount($Array_ptr)
end for


On Wed, 7 Aug 2019 13:06:49 -0400, Chuck Miller via 4D_Tech wrote:
> Hi All,
> The following fails 
> $MetalAmount_ptr:=Get pointer("$MetalAmount_"+String($MetalPos_L)+"_aR")
> $MetalAmount_ptr->{$Loop_L}:=$metalFactors_aR{$InnerLoop_L}
> 
> When I changed arrays to process
> $MetalAmount_ptr:=Get pointer("MetalAmount_"+String($MetalPos_L)+"_aR")
> $MetalAmount_ptr->{$Loop_L}:=$metalFactors_aR{$InnerLoop_L}
> 
> 
> It seems even in the same method you can not have a pointer to a 
> local array. I am not sure as to why. Any insight would be 
> appreciated, as I know you can pass a pointer to local (i.e. $) array 
> form method 1 to method 2 and that works. I would guess I could write 
> a method but that seems kind of a worth around
> 
> Thanks and regards
> 
> 
> Chuck
> 

>  Chuck Miller Voice: (617) 739-0306
>  Informed Solutions, Inc. Fax: (617) 232-1064   
>  mailto:cjmillerinformed-solutions.com 
>  Brookline, MA 02446 USA Registered 4D Developer
>Providers of 4D and Sybase connectivity
>   http://www.informed-solutions.com  
> 

> This message and any attached documents contain information which may 
> be confidential, subject to privilege or exempt from disclosure under 
> applicable law.  These materials are intended only for the use of the 
> intended recipient. If you are not the intended recipient of this 
> transmission, you are hereby notified that any distribution, 
> disclosure, printing, copying, storage, modification or the taking of 
> any action in reliance upon this transmission is strictly 
> prohibited.  Delivery of this message to any person other than the 
> intended recipient shall not compromise or waive such 
> confidentiality, privilege or exemption from disclosure as to this 
> communication. 
> 
> **
> 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
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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
**

Pasting problem

2019-08-07 Thread William Swann via 4D_Tech

Hi All,

I am having a problem with pasting into text fields or variables on 
input forms under Windows. The user clicks into or highlights a text 
area that is already populated. They press either ctrl-v or select paste 
from the area's contextual menu. The entire existing text block is 
replaced with only the new text new from the paste event, even though 
they clicked into a specific point to paste into. This only happens 
under Windows 7 or 10. Mac clients have never reported this 
error/problem at all. I have seen it happen while watching users do 
their work and there it is not a PEBCAK issue (_p_roblem _e_xists 
_b_etween _c_hair _a_nd _k_eyboard).


I have toyed a bit with On Event Call and trapping for ctrl-v events and 
creating a text pasting strategy, but this seems dangerous, especially 
on a "system" related event that is better handled by 4D and the host 
OS. The other trepidation is that the  On Event Call is run in a 
completely different process, adding to the complexity of a solution to 
trap the event and get the selection from the process containing the 
text field. Further, I cannot figure out how to trap for the context 
menu paste event.


We are using v14.6 for server and client.

We are moving the system to a more modern version of 4D in a couple of 
months, but I need to find a fix or workaround until we can get there... 
Has anyone seen this? It truly is frustrating.


HELP and thanks!

Bill Swann

**
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: pointer issue

2019-08-07 Thread Narinder Chandi via 4D_Tech
Chuck,

From the docs on Get Pointer:

"The Get pointer command returns a pointer to the process or interprocess 
variable whose name you pass in varName."

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> on behalf of 4D Tech Mailing List 
<4d_tech@lists.4d.com>
Reply-To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Date: Wednesday, 7 August 2019 at 18:06
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chuck Miller 
Subject: pointer issue

Hi All,
The following fails 
$MetalAmount_ptr:=Get pointer("$MetalAmount_"+String($MetalPos_L)+"_aR")
$MetalAmount_ptr->{$Loop_L}:=$metalFactors_aR{$InnerLoop_L}

When I changed arrays to process
$MetalAmount_ptr:=Get pointer("MetalAmount_"+String($MetalPos_L)+"_aR")
$MetalAmount_ptr->{$Loop_L}:=$metalFactors_aR{$InnerLoop_L}


It seems even in the same method you can not have a pointer to a local 
array. I am not sure as to why. Any insight would be appreciated, as I know you 
can pass a pointer to local (i.e. $) array form method 1 to method 2 and that 
works. I would guess I could write a method but that seems kind of a worth 
around

Thanks and regards


Chuck


 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  


This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

**
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
**

pointer issue

2019-08-07 Thread Chuck Miller via 4D_Tech
Hi All,
The following fails 
$MetalAmount_ptr:=Get pointer("$MetalAmount_"+String($MetalPos_L)+"_aR")
$MetalAmount_ptr->{$Loop_L}:=$metalFactors_aR{$InnerLoop_L}

When I changed arrays to process
$MetalAmount_ptr:=Get pointer("MetalAmount_"+String($MetalPos_L)+"_aR")
$MetalAmount_ptr->{$Loop_L}:=$metalFactors_aR{$InnerLoop_L}


It seems even in the same method you can not have a pointer to a local array. I 
am not sure as to why. Any insight would be appreciated, as I know you can pass 
a pointer to local (i.e. $) array form method 1 to method 2 and that works. I 
would guess I could write a method but that seems kind of a worth around

Thanks and regards


Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

**
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
**