LEP that will quit Chrome?

2019-02-28 Thread Keith Goebel via 4D_Tech
Hi all.
I am trying to formulate a LEP command from 4D v17.0HF3 Win on Win7 (although 
it will be deployed on Win Server 2016).

The idea is to quit Chrome from within 4D.
After lots of Google searches I have tried (in my development version)

$Command_t:="TASKKILL /IM /t chrome.exe"
SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true") 
SET ENVIRONMENT VARIABLE("_4D_OPTION_BLOCKING_EXTERNAL_PROCESS";"false")
LAUNCH EXTERNAL PROCESS($Command_t)

and
$Command_t:="cmd.exe /TASKKILL /IM /t chrome.exe"
SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE”;"false") 
SET ENVIRONMENT VARIABLE("_4D_OPTION_BLOCKING_EXTERNAL_PROCESS";"false")
LAUNCH EXTERNAL PROCESS($Command_t)

Neither has any effect - Chrome stays running.
If I show the console with
SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"false”) 
it flashes open and then is gone before anything can be seen.

Can anyone advise me what I’m doing wrong?
TIA, Keith
**
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: Can'r run as a service on Windows 2016

2019-02-28 Thread Stephen J. Orth via 4D_Tech
I agree with Chuck here...

We never install our OEM system on the C drive, let along in the Program Files 
directory.  We always insist the server hardware be configured as C-Drive for 
Windows, D-Drive for data.

All our systems run as a service, with no special configuration required

Best,


Steve

*
  Stephen J. Orth
  The Aquila Group, Inc.  Office:  (608) 834-9213
  P.O. Box 690   Mobile:  (608) 347-6447
  Sun Prairie, WI 53590

  E-Mail:  s.o...@the-aquila-group.com
*

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of cjmiller--- via 
4D_Tech
Sent: Thursday, February 28, 2019 1:41 PM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: cjmil...@informed-solutions.com
Subject: Re: Can'r run as a service on Windows 2016

I have found it is always better to Install program and data on a second drive. 
I do not run as a service but had many update problems and running problems 
when on c drive

Regards

Chuck 

**
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: Can'r run as a service on Windows 2016

2019-02-28 Thread cjmiller--- via 4D_Tech
I have found it is always better to Install program and data on a second drive. 
I do not run as a service but had many update problems and running problems 
when on c drive

Regards

Chuck 

Sent from my iPhone

> On Feb 28, 2019, at 2:24 PM, Ken Kuehn via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Paul, 
> 
> I use Inno Setup to create Windows installers for our 4D client and 4D server 
> applications, the default install path for the server application is 
> C:\Program Files. I normally set the data folder at the root of the C drive. 
> However, the application that I support is installed at approximately 500 
> customer sites with various Windows and Mac operating system configurations, 
> so I don’t always have access to or control over the environment where our 4D 
> application is installed. For Windows Servers we still occasionally see 
> 2008r2, but mainly 2012 or 2016 Standard, and I am now getting customers 
> asking about support of 2019 Server. 
> 
> In a handful of situations with previous 4D versions I’ve seen instances 
> where I needed to specify a logon account (either domain or local admin) to 
> get 4D Server to stay running as a Windows service, but since the release of 
> 4D v16 (we’re currently using 16.4) I have had to setup the service  with s 
> logon account so that the service starts and stays running.  If I just select 
> the radio button for local system account and start the service, the status 
> will change to running, but as soon as I refresh the services window it shows 
> the service is not running. Also, checking the box for allow service to 
> interact with desktop does not work.  It will show the service is running, 
> but it’s not accessible from any 4D Client, local on the same machine or from 
> any other workstation on the same local area network. 
> 
> In the past week I have run into 2 instances where I have upgraded from a 
> previous version of our 4D application running on v13.6 or 15.4 to the 16.4 
> version of our application.  The service ran without issue using the local 
> system account option for both of those previous 4D versions, but now under 
> 4D v16 the application will not run as a service. I’ve tried the local system 
> account option, I've tried specifying a local admin account and also a domain 
> admin account.  In all instances the server will show it’s running, but as 
> soon as I refresh the services window it shows the service is not running. 
> For the time being I have both 4D server instances running as an application 
> under a local admin account until I can figure something out.
> 
> I’m open to any suggestions. 
> 
> Thanks,
> 
> Ken Kuehn
> IT Support Manager
> Label Traxx 
> 
> Phone: 414-774-9997
> Fax: 414-774-9986
> 
> Need a quick answer?  Email: techsupp...@labeltraxx.com 
> 
> 
> 
> 
>> On Feb 28, 2019, at 3:03 AM, Paul Dennis via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> What is the file path to the location where you have the exe and data
>> installed. You can only use c:\\program files for the exe not the data. For
>> that use c:\\program data or as mentioned install under a user account. In
>> which case it runs from c:\users\username etc.
>> Paul 
>> 
>> 
>> 
>> --
>> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
>> **
>> 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: Can'r run as a service on Windows 2016

2019-02-28 Thread Ken Kuehn via 4D_Tech
Hi Paul, 

I use Inno Setup to create Windows installers for our 4D client and 4D server 
applications, the default install path for the server application is C:\Program 
Files. I normally set the data folder at the root of the C drive. However, the 
application that I support is installed at approximately 500 customer sites 
with various Windows and Mac operating system configurations, so I don’t always 
have access to or control over the environment where our 4D application is 
installed. For Windows Servers we still occasionally see 2008r2, but mainly 
2012 or 2016 Standard, and I am now getting customers asking about support of 
2019 Server. 

In a handful of situations with previous 4D versions I’ve seen instances where 
I needed to specify a logon account (either domain or local admin) to get 4D 
Server to stay running as a Windows service, but since the release of 4D v16 
(we’re currently using 16.4) I have had to setup the service  with s logon 
account so that the service starts and stays running.  If I just select the 
radio button for local system account and start the service, the status will 
change to running, but as soon as I refresh the services window it shows the 
service is not running. Also, checking the box for allow service to interact 
with desktop does not work.  It will show the service is running, but it’s not 
accessible from any 4D Client, local on the same machine or from any other 
workstation on the same local area network. 

In the past week I have run into 2 instances where I have upgraded from a 
previous version of our 4D application running on v13.6 or 15.4 to the 16.4 
version of our application.  The service ran without issue using the local 
system account option for both of those previous 4D versions, but now under 4D 
v16 the application will not run as a service. I’ve tried the local system 
account option, I've tried specifying a local admin account and also a domain 
admin account.  In all instances the server will show it’s running, but as soon 
as I refresh the services window it shows the service is not running. For the 
time being I have both 4D server instances running as an application under a 
local admin account until I can figure something out.

I’m open to any suggestions. 

Thanks,

Ken Kuehn
IT Support Manager
Label Traxx 

Phone: 414-774-9997
Fax: 414-774-9986

Need a quick answer?  Email: techsupp...@labeltraxx.com 




> On Feb 28, 2019, at 3:03 AM, Paul Dennis via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What is the file path to the location where you have the exe and data
> installed. You can only use c:\\program files for the exe not the data. For
> that use c:\\program data or as mentioned install under a user account. In
> which case it runs from c:\users\username etc.
> Paul 
> 
> 
> 
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **
> 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: Crash on startup, v17.1 merged app

2019-02-28 Thread Randy Jaynes via 4D_Tech
Yeah…that’ll show you.

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com  • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 
Please send all email contacts to supp...@printpoint.com 






> On Feb 28, 2019, at 1:17 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com 
> > wrote:
> 
> Thanks Randy ... you are absolutely correct :) I had simply Zipped the
> files up. I created a signed installer with DropDMG and now it's OK.
> 
> That'll teach me to be lazy :)
> Pat
> 
> On Thu, 28 Feb 2019 at 16:00, Randy Jaynes via 4D_Tech <4d_tech@lists.4d.com 
> >
> wrote:
> 
>> 1) Permissions issue on the folder on the Mac.
>> 
>> 2) Did you install it using a signed installer or DMG so that OS X
>> Gatekeeper recognizes it as a registered program.
>> 
>> This sounds more like #2 to me, but in the past I’ve solved #1 by creating
>> an Applications folder inside the user’s home folder, and putting the
>> application there.
>> 
>> Starting with High Sierra, I’ve been having to use a signed PKG installer
>> I made with Packages.app
>> 
>> HTH,
>> Randy
>> 
>> --
>> Randy Jaynes
>> Senior Programmer and Customer Support
>> 
>> http://printpoint.com  > > • 845.687.3741 •
>> PrintPoint, Inc • 57 Ludlow Lane • Palisades, NY 10964
>> Please send all email contacts to supp...@printpoint.com 
>>  > supp...@printpoint.com >
>> 
>> 
>> 
>> 
>> 
>>> On Feb 28, 2019, at 10:41 AM, Pat Bensky via 4D_Tech <
>> 4d_tech@lists.4d.com  
>> >> wrote:
>>> 
>>> Running a compiled & merged single-user app v17.1 on a customer's Mac (OS
>>> v. 10.12.6), the app crashes soon after startup - before it has asked
>> for a
>>> data file.
>>> Of course, it runs OK on any other Mac we try it on :)
>>> If I hold down the Alt key as it's starting up, it never gets to the open
>>> options dialog.
>>> It just bounces in the cost a few times, then quits.
>>> Here is the relevant bit from the crash log:
>>> 
>>> 
>>> Thread 0 Crashed::  (id = 775)  Dispatch queue: com.apple.main-thread
>>> 0   4d.com.CattoGallery v9.1.app   0x0001034fc161
>>> MacStringToVString(unsigned char const*, int, xbox::VString&,
>>> VUniToMacConverter*) + 274
>>> 1   4d.com.CattoGallery v9.1.app   0x0001036e262e
>>> V4DLocalizationManager::_LocalizeStrSharpCode(int, int, xbox::VString&) +
>>> 174
>>> 2   4d.com.CattoGallery v9.1.app   0x00010388e82c
>>> V4DCoreApplication::RetainFolder(unsigned int) const + 94
>>> 3   4d.com.CattoGallery v9.1.app   0x00010388cf8b
>>> V4DCoreApplication::_Init_ResourceChain() + 99
>>> 4   4d.com.CattoGallery v9.1.app   0x00010388c909
>>> V4DCoreApplication::Init(unsigned int) + 445
>>> 5   4d.com.CattoGallery v9.1.app   0x0001035857bb
>>> V4DApplication::Init(unsigned int) + 95
>>> 6   4d.com.CattoGallery v9.1.app   0x0001036c7487 _main() + 40
>>> 7   libdyld.dylib 0x7fff9fa84235 start + 1
>>> 
>>> Can anybody shed any light on what this means?
>>> 
>>> Thanks!
>>> 
>>> Pat
>>> 
>>> --
>>> *
>>> CatBase - Top Dog in Data Publishing
>>> tel: +44 (0) 207 118 7889
>>> w: http://www.catbase.com  
>>> >
>>> skype: pat.bensky
>>> *
>>> **
>>> 4D Internet Users Group (4D iNUG)
>>> Archive:  http://lists.4d.com/archives.html 
>>>  <
>> http://lists.4d.com/archives.html >
>>> Options: https://lists.4d.com/mailman/options/4d_tech 
>>>  <
>> https://lists.4d.com/mailman/options/4d_tech 
>> >
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
>>>  > 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:  

Re: Crash on startup, v17.1 merged app

2019-02-28 Thread Pat Bensky via 4D_Tech
Thanks Randy ... you are absolutely correct :) I had simply Zipped the
files up. I created a signed installer with DropDMG and now it's OK.

That'll teach me to be lazy :)
Pat

On Thu, 28 Feb 2019 at 16:00, Randy Jaynes via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> 1) Permissions issue on the folder on the Mac.
>
> 2) Did you install it using a signed installer or DMG so that OS X
> Gatekeeper recognizes it as a registered program.
>
> This sounds more like #2 to me, but in the past I’ve solved #1 by creating
> an Applications folder inside the user’s home folder, and putting the
> application there.
>
> Starting with High Sierra, I’ve been having to use a signed PKG installer
> I made with Packages.app
>
> HTH,
> Randy
>
> --
> Randy Jaynes
> Senior Programmer and Customer Support
>
> http://printpoint.com  • 845.687.3741 •
> PrintPoint, Inc • 57 Ludlow Lane • Palisades, NY 10964
> Please send all email contacts to supp...@printpoint.com  supp...@printpoint.com>
>
>
>
>
>
> > On Feb 28, 2019, at 10:41 AM, Pat Bensky via 4D_Tech <
> 4d_tech@lists.4d.com > wrote:
> >
> > Running a compiled & merged single-user app v17.1 on a customer's Mac (OS
> > v. 10.12.6), the app crashes soon after startup - before it has asked
> for a
> > data file.
> > Of course, it runs OK on any other Mac we try it on :)
> > If I hold down the Alt key as it's starting up, it never gets to the open
> > options dialog.
> > It just bounces in the cost a few times, then quits.
> > Here is the relevant bit from the crash log:
> >
> > 
> > Thread 0 Crashed::  (id = 775)  Dispatch queue: com.apple.main-thread
> > 0   4d.com.CattoGallery v9.1.app   0x0001034fc161
> > MacStringToVString(unsigned char const*, int, xbox::VString&,
> > VUniToMacConverter*) + 274
> > 1   4d.com.CattoGallery v9.1.app   0x0001036e262e
> > V4DLocalizationManager::_LocalizeStrSharpCode(int, int, xbox::VString&) +
> > 174
> > 2   4d.com.CattoGallery v9.1.app   0x00010388e82c
> > V4DCoreApplication::RetainFolder(unsigned int) const + 94
> > 3   4d.com.CattoGallery v9.1.app   0x00010388cf8b
> > V4DCoreApplication::_Init_ResourceChain() + 99
> > 4   4d.com.CattoGallery v9.1.app   0x00010388c909
> > V4DCoreApplication::Init(unsigned int) + 445
> > 5   4d.com.CattoGallery v9.1.app   0x0001035857bb
> > V4DApplication::Init(unsigned int) + 95
> > 6   4d.com.CattoGallery v9.1.app   0x0001036c7487 _main() + 40
> > 7   libdyld.dylib 0x7fff9fa84235 start + 1
> > 
> > Can anybody shed any light on what this means?
> >
> > Thanks!
> >
> > Pat
> >
> > --
> > *
> > CatBase - Top Dog in Data Publishing
> > tel: +44 (0) 207 118 7889
> > w: http://www.catbase.com 
> > skype: pat.bensky
> > *
> > **
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html <
> http://lists.4d.com/archives.html>
> > Options: https://lists.4d.com/mailman/options/4d_tech <
> https://lists.4d.com/mailman/options/4d_tech>
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com  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
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
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: 4D Web Log Out

2019-02-28 Thread Dani Beaubien via 4D_Tech
Have you looked at the "WEB CLOSE SESSION” command?

That is probably what you are looking for assuming you are using the built in 
4D sessions.

Dani Beaubien
Open Road Development

> On Feb 28, 2019, at 9:38 AM, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hello folks,
> 
> Forgive me if this question has been asked many times before  but I am a bit 
> stumped.
> 
> Logging on to 4D via a web page is relatively simple wither using the nasty 
> dialog or rolling your own page to submit the httpauth details.
> 
> Logging off however is proving to be more difficult.
> 
> I can give the impression of logging off but the username and password seems 
> to persist on the client browser so re-entering a previously visited page 
> that pulls data just continues to work.  If I manually clear the browser 
> cookies then the access gets denied but the 4DSID cookie cannot be cleared by 
> javascript...
> 
> What are the correct steps to achieve this.  I need help...
> 
> Regards,  Dougie
> 
> 
> telekinetix Limited- J. Douglas Cryer
> Phone : 01234 761759  Mobile : 07973 675 218
> 2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
> Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.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: "Attempting to retype using a pointer"

2019-02-28 Thread John DeSoi via 4D_Tech
Hi Chip,

> 
> On Feb 28, 2019, at 9:12 AM, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> I see the issue -- The time array is NOT an array of Time
> using v13 (no Time array)
> so I had to use a longint array, or a time variable which points out 
> the problem.

Version 13 is long dead and this has nothing to do with any version before 
ARRAY TIME was added. The problem is simple enough to work around, but the 
point of my post and (and Jeremy's) is that type handling and pointer 
dereferencing should be consistent and handled correctly by 4D. And the results 
between interpreted and compiled should be consistent unless it is documented 
not to be.


> I believe it is:
> Even though there is a TIME ARRAY() command, the underlying array is 
> not actually time but longint.

But the code works as expected in interpreted mode. So 4D knows it is a time 
array in interpreted mode, but not compiled mode?

John DeSoi, Ph.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: "Attempting to retype using a pointer"

2019-02-28 Thread Kirk Brooks via 4D_Tech
I just noticed something when I stepped through one of my examples - in
this case:
$to:=New object
$from:=New object
$i:=100
$from.ptr:=->$i
$to.ptr:=->$k
$to.ptr->:=$from.ptr-> // $k = 100 at this line
The value of $k changed as soon as this line runs.

I also wondered what would happen if I initialized $to.ptr to a nil
pointer. The answer is

C_POINTER($nil)

$to.ptr:=$nil  // $to.ptr = null

Nil is regarded as null in v17.


On Thu, Feb 28, 2019 at 8:22 AM Kirk Brooks  wrote:

> Jeremy,
>
>
> On Wed, Feb 27, 2019 at 11:53 PM Jeremy Roussak via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
>> Objects pre-date ORDA, as you know.
>
> True. In this case what we are really talking about is 4D's object
> notation. I tend to use 'ORDA' for all the new capabilities and should be
> more specific.
>
>
>> I was simply using an object as a way of permitting a method to return
>> several values at the same time. Those values happened to be pointers to
>> variables (created by OBJECT DUPLICATE and so necessarily referenced using
>> pointers). I wanted then to copy the value in the variable pointed to by
>> one pointer into the variable pointed to by another pointer. The two
>> variables were of identical type, one having been created by duplicating
>> the other.
>>
> I find this an excellent application of using objects as containers for
> passing parameters to and retrieving values from a method.
>
> Since you mention OBJECT DUPLICATE you must be working with variables on a
> form. In that context using Form removes the need to work with pointers
> altogether.
>
>> There was therefore no reason why
>>
>> $to.ptr-> := $from.ptr->
>>
>> should have created any error at all; yet it did, and it was an error for
>> which I can find no logical explanation, particularly given that the
>> assignment did actually take place. Further, if I complicate the code by
>> writing
>>
> Perhaps you didn't create $to and $from with New object before using them?
> Try running this:
>
> C_OBJECT($to;$from;$obj)
> C_LONGINT($i;$j;$k)
>
> $to:=New object
> $from:=New object
>
> $i:=100
>
> $from.ptr:=->$i
> $to.ptr:=$from.ptr
>
> $k:=$to.ptr->  // $k = 100
>
>
> To use the code as you wrote it you must also initialize the property you
> are writing to:
>
> $from.ptr:=->$i
> $to.ptr:=->$k
>
> $to.ptr->:=$from.ptr->  // $k = 100
>
>
> But if this happens
>
> $i:=100
> $from.ptr:=->$i
> $to.ptr:=->$k
> $to.ptr->:=$from.ptr->
>
> $i:=200
>
> $k:=$from.ptr->  // $k = 200
>
>
> This was a useful exercise for me. I didn't realize you could use pointers
> this way in objects. I don't think it's a particularly good way to work
> with them but it looks like there is some fairly rigorous type checking
> going on under the hood. For example, I expected this to work:
>
> $i:=100
> $from.ptr:=->$i
> $k:=$from.ptr
>
> but it doesn't because $k isn't a pointer. However:
>
> $i:=100
> $from.ptr:=->$i
> $to:=OB Copy($from;True)
>
> $i:=200
>
> $k:=$to.ptr  //  $k = 100
>
> does work because I use the True flag to resolve the pointers to their
> values. This also points out (discovered pun) the fact that within an
> object properties are dynamically typed ($to.ptr is currently a number). OB
> Copy was a great tool in pre-ORDA days as a way to build a template of an
> object based on fields and then use it to create data objects.
>
> C_POINTER(p1; p2)
>> p1:=$from.ptr
>> p2:=$to.ptr
>> p2-> := p1->
>>
>> I get no errors, interpreted or complied.
>>
> Mixing 'classic' 4D code with 'ORDA' code is tricky. You can wind up
> spending so much time converting between the two there's just not much
> benefit. Where it excels is when you start with a new method and use ORDA
> to refactor some task in old code. Generally I will have 2/3 the code to
> accomplish the same results. Less code is better.
>
> And some things are still just faster in 'classic' 4D. Large queries for
> instance. "Large" meaning tables with millions of records or extensive
> relations. Or long loops where you are doing queries. OTOH I hear from guys
> with big applications ORDA is generally faster than SQL. In situations
> where I'm working with smaller sets (thousands or less of records) I love
> working with ORDA. And forms are just amazing using ORDA, Form, dynamic
> form variables and object notation.
>
> --
> Kirk Brooks
> San Francisco, CA
> ===
>
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
>
> *Wittgenstein and the Computer *
>
>

-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
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 Web Log Out

2019-02-28 Thread Douglas Cryer via 4D_Tech
Hello folks,

Forgive me if this question has been asked many times before  but I am a bit 
stumped.

Logging on to 4D via a web page is relatively simple wither using the nasty 
dialog or rolling your own page to submit the httpauth details.

Logging off however is proving to be more difficult.

I can give the impression of logging off but the username and password seems to 
persist on the client browser so re-entering a previously visited page that 
pulls data just continues to work.  If I manually clear the browser cookies 
then the access gets denied but the 4DSID cookie cannot be cleared by 
javascript...

What are the correct steps to achieve this.  I need help...

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.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: "Attempting to retype using a pointer"

2019-02-28 Thread Kirk Brooks via 4D_Tech
Jeremy,


On Wed, Feb 27, 2019 at 11:53 PM Jeremy Roussak via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Objects pre-date ORDA, as you know.

True. In this case what we are really talking about is 4D's object
notation. I tend to use 'ORDA' for all the new capabilities and should be
more specific.


> I was simply using an object as a way of permitting a method to return
> several values at the same time. Those values happened to be pointers to
> variables (created by OBJECT DUPLICATE and so necessarily referenced using
> pointers). I wanted then to copy the value in the variable pointed to by
> one pointer into the variable pointed to by another pointer. The two
> variables were of identical type, one having been created by duplicating
> the other.
>
I find this an excellent application of using objects as containers for
passing parameters to and retrieving values from a method.

Since you mention OBJECT DUPLICATE you must be working with variables on a
form. In that context using Form removes the need to work with pointers
altogether.

> There was therefore no reason why
>
> $to.ptr-> := $from.ptr->
>
> should have created any error at all; yet it did, and it was an error for
> which I can find no logical explanation, particularly given that the
> assignment did actually take place. Further, if I complicate the code by
> writing
>
Perhaps you didn't create $to and $from with New object before using them?
Try running this:

C_OBJECT($to;$from;$obj)
C_LONGINT($i;$j;$k)

$to:=New object
$from:=New object

$i:=100

$from.ptr:=->$i
$to.ptr:=$from.ptr

$k:=$to.ptr->  // $k = 100


To use the code as you wrote it you must also initialize the property you
are writing to:

$from.ptr:=->$i
$to.ptr:=->$k

$to.ptr->:=$from.ptr->  // $k = 100


But if this happens

$i:=100
$from.ptr:=->$i
$to.ptr:=->$k
$to.ptr->:=$from.ptr->

$i:=200

$k:=$from.ptr->  // $k = 200


This was a useful exercise for me. I didn't realize you could use pointers
this way in objects. I don't think it's a particularly good way to work
with them but it looks like there is some fairly rigorous type checking
going on under the hood. For example, I expected this to work:

$i:=100
$from.ptr:=->$i
$k:=$from.ptr

but it doesn't because $k isn't a pointer. However:

$i:=100
$from.ptr:=->$i
$to:=OB Copy($from;True)

$i:=200

$k:=$to.ptr  //  $k = 100

does work because I use the True flag to resolve the pointers to their
values. This also points out (discovered pun) the fact that within an
object properties are dynamically typed ($to.ptr is currently a number). OB
Copy was a great tool in pre-ORDA days as a way to build a template of an
object based on fields and then use it to create data objects.

C_POINTER(p1; p2)
> p1:=$from.ptr
> p2:=$to.ptr
> p2-> := p1->
>
> I get no errors, interpreted or complied.
>
Mixing 'classic' 4D code with 'ORDA' code is tricky. You can wind up
spending so much time converting between the two there's just not much
benefit. Where it excels is when you start with a new method and use ORDA
to refactor some task in old code. Generally I will have 2/3 the code to
accomplish the same results. Less code is better.

And some things are still just faster in 'classic' 4D. Large queries for
instance. "Large" meaning tables with millions of records or extensive
relations. Or long loops where you are doing queries. OTOH I hear from guys
with big applications ORDA is generally faster than SQL. In situations
where I'm working with smaller sets (thousands or less of records) I love
working with ORDA. And forms are just amazing using ORDA, Form, dynamic
form variables and object notation.

-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
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: Crash on startup, v17.1 merged app

2019-02-28 Thread Randy Jaynes via 4D_Tech
1) Permissions issue on the folder on the Mac.

2) Did you install it using a signed installer or DMG so that OS X Gatekeeper 
recognizes it as a registered program.

This sounds more like #2 to me, but in the past I’ve solved #1 by creating an 
Applications folder inside the user’s home folder, and putting the application 
there.

Starting with High Sierra, I’ve been having to use a signed PKG installer I 
made with Packages.app

HTH,
Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com  • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 
Please send all email contacts to supp...@printpoint.com 






> On Feb 28, 2019, at 10:41 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com 
> > wrote:
> 
> Running a compiled & merged single-user app v17.1 on a customer's Mac (OS
> v. 10.12.6), the app crashes soon after startup - before it has asked for a
> data file.
> Of course, it runs OK on any other Mac we try it on :)
> If I hold down the Alt key as it's starting up, it never gets to the open
> options dialog.
> It just bounces in the cost a few times, then quits.
> Here is the relevant bit from the crash log:
> 
> 
> Thread 0 Crashed::  (id = 775)  Dispatch queue: com.apple.main-thread
> 0   4d.com.CattoGallery v9.1.app   0x0001034fc161
> MacStringToVString(unsigned char const*, int, xbox::VString&,
> VUniToMacConverter*) + 274
> 1   4d.com.CattoGallery v9.1.app   0x0001036e262e
> V4DLocalizationManager::_LocalizeStrSharpCode(int, int, xbox::VString&) +
> 174
> 2   4d.com.CattoGallery v9.1.app   0x00010388e82c
> V4DCoreApplication::RetainFolder(unsigned int) const + 94
> 3   4d.com.CattoGallery v9.1.app   0x00010388cf8b
> V4DCoreApplication::_Init_ResourceChain() + 99
> 4   4d.com.CattoGallery v9.1.app   0x00010388c909
> V4DCoreApplication::Init(unsigned int) + 445
> 5   4d.com.CattoGallery v9.1.app   0x0001035857bb
> V4DApplication::Init(unsigned int) + 95
> 6   4d.com.CattoGallery v9.1.app   0x0001036c7487 _main() + 40
> 7   libdyld.dylib 0x7fff9fa84235 start + 1
> 
> Can anybody shed any light on what this means?
> 
> Thanks!
> 
> Pat
> 
> -- 
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com 
> skype: pat.bensky
> *
> **
> 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
**

Crash on startup, v17.1 merged app

2019-02-28 Thread Pat Bensky via 4D_Tech
Running a compiled & merged single-user app v17.1 on a customer's Mac (OS
v. 10.12.6), the app crashes soon after startup - before it has asked for a
data file.
Of course, it runs OK on any other Mac we try it on :)
If I hold down the Alt key as it's starting up, it never gets to the open
options dialog.
It just bounces in the cost a few times, then quits.
Here is the relevant bit from the crash log:


Thread 0 Crashed::  (id = 775)  Dispatch queue: com.apple.main-thread
0   4d.com.CattoGallery v9.1.app   0x0001034fc161
MacStringToVString(unsigned char const*, int, xbox::VString&,
VUniToMacConverter*) + 274
1   4d.com.CattoGallery v9.1.app   0x0001036e262e
V4DLocalizationManager::_LocalizeStrSharpCode(int, int, xbox::VString&) +
174
2   4d.com.CattoGallery v9.1.app   0x00010388e82c
V4DCoreApplication::RetainFolder(unsigned int) const + 94
3   4d.com.CattoGallery v9.1.app   0x00010388cf8b
V4DCoreApplication::_Init_ResourceChain() + 99
4   4d.com.CattoGallery v9.1.app   0x00010388c909
V4DCoreApplication::Init(unsigned int) + 445
5   4d.com.CattoGallery v9.1.app   0x0001035857bb
V4DApplication::Init(unsigned int) + 95
6   4d.com.CattoGallery v9.1.app   0x0001036c7487 _main() + 40
7   libdyld.dylib 0x7fff9fa84235 start + 1

Can anybody shed any light on what this means?

Thanks!

Pat

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
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: "Attempting to retype using a pointer"

2019-02-28 Thread Chip Scheide via 4D_Tech
John,
I see the issue -- The time array is NOT an array of Time
using v13 (no Time array)
so I had to use a longint array, or a time variable which points out 
the problem.

I believe it is:
Even though there is a TIME ARRAY() command, the underlying array is 
not actually time but longint.

If you use code block 1 (below) you get an error that 4D was expecting 
an alpha numeric argument (HH MM SS is longint); however, if you use 
code block 2 there wis no error.


Code Block 1:
C_POINTER($1)
C_TEXT($val)

If (Count parameters>=1)
$val:=String($1->;HH MM SS)
ALERT($val)
Else 
ARRAY LONGINT(ah_Time;1)
ah_Time{1}:=Current time
_TEST (->ah_Time{1})
End if 


Code Block 2:
C_POINTER($1)
C_TEXT($val)
c_Time($Temp)

If (Count parameters>=1)
$val:=String($1->;HH MM SS)
ALERT($val)
Else 
$Temp:=Current time
_TEST (->Temp)
End if 


Chip


On Thu, 28 Feb 2019 08:38:22 -0600, John DeSoi via 4D_Tech wrote:
> 
> C_POINTER($1)
> C_TEXT($val)
> 
> If (Count parameters>=1)
>   $val:=String($1->;HH MM SS)
>   ALERT($val)
> Else 
>   ARRAY TIME(ah_Time;1)
>   ah_Time{1}:=Current time
>   _TEST (->ah_Time{1})
> End if 
> 
> 
---
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: "Attempting to retype using a pointer"

2019-02-28 Thread John DeSoi via 4D_Tech
4D has improved over the years, but there is still a number of type handling 
inconsistencies. Only option seems to be to work around them by moving data 
into different variable types.

The method below (_TEST) works interpreted but gives a runtime error in 
compiled mode. Reported as a bug in 2016 for 4D 15. Still fails in 17.1


C_POINTER($1)
C_TEXT($val)

If (Count parameters>=1)
$val:=String($1->;HH MM SS)
ALERT($val)
Else 
ARRAY TIME(ah_Time;1)
ah_Time{1}:=Current time
_TEST (->ah_Time{1})
End if 



Here is another issue in 4D 17.

C_OBJECT($object)
C_POINTER($field)

$object:=New object("tableNumber";1;"fieldNumber";1)

$field:=Field($object.tableNumber;$object.fieldNumber)

The above works but the Field command won't compile: Too many parameters have 
been passed to this method.


John DeSoi, Ph.D.


> On Feb 28, 2019, at 1:53 AM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I get no errors, interpreted or complied. 
> 
> That seems to me to be a fault somewhere in 4D’s handling of pointers.

**
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: Can'r run as a service on Windows 2016

2019-02-28 Thread Ken Kuehn via 4D_Tech


Sent from my iPhone

> On Feb 28, 2019, at 3:08 AM, Paul Dennis via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What is the file path to the location where you have the exe and data
> installed. You can only use c:\\program files for the exe not the data. For
> that use c:\\program data or as mentioned install under a user account. In
> which case it runs from c:\users\username etc.
> Paul 
> 
> 
> 
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **
> 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: Can'r run as a service on Windows 2016

2019-02-28 Thread Paul Dennis via 4D_Tech
What is the file path to the location where you have the exe and data
installed. You can only use c:\\program files for the exe not the data. For
that use c:\\program data or as mentioned install under a user account. In
which case it runs from c:\users\username etc.
Paul 



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
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: Can'r run as a service on Windows 2016

2019-02-28 Thread Epperlein, Lutz (agendo) via 4D_Tech
Pat,

Have a look at the docs:
https://doc.4d.com/4Dv17/4D/17.1/Registering-a-Database-as-a-Service.300-4203714.en.html

They recommend to run the server under an user account, if you want to use 
network shares, printers and so on. 
But we don't install the services this way, we stay at system account yet, and 
don't get any problems.
We don't have experiences with Windows Server 2016 (2012 R2 yet) and we don't 
use the feature of interacting with the desktop. And we are able to connect to 
server with a client from the same machine.

A question: how do you connect the client to the server? Which address do you 
use, localhost, an IP 127.0.0.1 or another IP, a named address? That could lead 
to problems with the firewall. In case you use localhost (or 127.0.0.1), the 
firewall shouldn't be involved AFAIK.

Regards
Lutz

--  
Lutz Epperlein  
--
Agendo Gesellschaft für politische Planung mbH
Köpenicker Str. 9
10997 Berlin
http://www.agendo.de/
--


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