Re: 4Dv17 as a Windows Service

2019-10-21 Thread Tarawerkz via 4D_Tech
Hi Pat,

I have managed to find a solution to the 4D Service.

Recap of the problem :  When the data files are sitting on a repository 
different from the 4D Server and structure files, running the database 
application as a Windows service will fail.  The Windows log event will 
indicate an error with Event ID 9 - Can’t open database.  I surmised that the 
issue resulted from the Windows service not being able to locate the data file 
when started.

How it was solved …
Map the network drive that contains the 4D data files (so that it’s always 
available when the 4D Server is rebooted.
Define the 4D service and specify the log-on user using the same administrator 
account as per the log-in administrator account for the 4D Server.
Start up 4D Server as a direct app and point the to the data file on the 
network drive.  
Register the 4D Service.
Most critically, the path on the 4D Service has to be modified.  On definition, 
the path only points to the 4D Server app on C drive and the the 4D structure 
files, not the data files.  So I ran RegEdit to edit the registry and change 
the path to the Windows Service to the 4D Link link created in step 3.  The 
path on the Windows Service would be as follows :
C:\Program Files\4D\4D v17.2\4D Server\4D Server.exe -s 
"C:\Users\UserName\AppData\Roaming\4D Server\Favorites 
v17\Local\ApplicationDbv17.4Dlink”
With this, the service ran happily (ever after?)

Regards,
Ronnie



> On 16 Oct 2019, at 5:00 PM, Pat Bensky  wrote:
> 
> I wonder if, when it's running as a service, the network drive doesn't get 
> mounted fast enough when the 4D server is rebooted, so it can't find the data 
> file?
> 
> Can the network drive be permanently mounted?
> 
> PB
> 
> On Wed, 16 Oct 2019 at 09:50, Tarawerkz  > wrote:
> Hi Pat,
> 
> On the 1st initial login, we have to select it to tell 4D Server where the 
> data file is.
> The data file sits in a repository which has been mapped as a network drive 
> to automatically mount when the 4D Server is rebooted.
> 
> On subsequent login attempts, 4D Server opens the data file automatically.
> 
> Regards,
> Ronnie
> Tarawerkz
> 
> 
> 
> 
>> On 16 Oct 2019, at 4:33 PM, Pat Bensky > > wrote:
>> 
>> If you start the 4D server manually, does it automatically find the correct 
>> data file (on another repository) or do you have to select it?
>> 
>> On Wed, 16 Oct 2019 at 09:25, Tarawerkz > > wrote:
>> Hi Pat,
>> 
>> I’m already using the Log On as account feature (under the Log In tab).
>> 
>> Actually, I’ve tested the service with the structure and data files residing 
>> in the same directory (as per usual default implementation) and that WORKS !
>> 
>> It’s only when I pull the data files out to another repository that the 
>> service fails.
>> Somehow the Windows service path only traps the path to the 4D Server 
>> application and the structure files, NOT the data file (which it assumes to 
>> be beside it in the same directory?).
>> 
>> Regards,
>> Ronnie
>> Tarawerkz
>> 
>> 
>> 
>> 
>>> On 16 Oct 2019, at 4:07 PM, 4d_tech-requ...@lists.4d.com 
>>>  wrote:
>>> 
>>> Subject: Re: 4Dv17 as a Windows Service
>>> Message-ID:
>>> >> >
>>> Content-Type: text/plain; charset="UTF-8"
>>> 
>>> Ronnie,
>>> Please see the message "SOLVED: Can't run as a service on Windows 2016 (or
>>> later)" - the info might be helpful to you. I realise you're on 2012, not
>>> 2016, but I suspect the same issue may apply.
>>> HTH
>>> 
>>> Pat
>> 
>> 
>> 
>> -- 
>> *
>> CatBase - Top Dog in Data Publishing
>> tel: +44 (0) 207 118 7889
>> w: http://www.catbase.com 
>> skype: pat.bensky
>> *
> 
> 
> 
> -- 
> *
> 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: SSL Certificate parsing in 4D

2019-10-21 Thread Eric Naujock via 4D_Tech
I use openssl on all the other items. But I have not found a way to do openssl 
from within 4D. You don’t want to go down the execute your code in zsh on the 
machine and hope you users approve the read access to the file when they need 
to decode the .crt file.

> On Oct 21, 2019, at 5:16 PM, Spencer Hinsdale  wrote:
> 
> openssl?
> 
> On 10/21/19, 2:04 PM, "4D_Tech on behalf of Eric Naujock via 4D_Tech" 
> <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote:
> 
>Is there a plugin or tool out there that can parse and breakdown a X509 
> style certificate into its components to be able to display the fields 
> within. I did the typical Google Foo, and the 4D Docs. Along with Miyako. I 
> just am not using any such code. 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: SSL Certificate parsing in 4D

2019-10-21 Thread Spencer Hinsdale via 4D_Tech
openssl?

On 10/21/19, 2:04 PM, "4D_Tech on behalf of Eric Naujock via 4D_Tech" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote:

Is there a plugin or tool out there that can parse and breakdown a X509 
style certificate into its components to be able to display the fields within. 
I did the typical Google Foo, and the 4D Docs. Along with Miyako. I just am not 
using any such code. 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: SSL Certificate parsing in 4D

2019-10-21 Thread Spencer Hinsdale via 4D_Tech
openssl?

On 10/21/19, 2:04 PM, "4D_Tech on behalf of Eric Naujock via 4D_Tech" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote:

Is there a plugin or tool out there that can parse and breakdown a X509 
style certificate into its components to be able to display the fields within. 
I did the typical Google Foo, and the 4D Docs. Along with Miyako. I just am not 
using any such code. 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
**

SSL Certificate parsing in 4D

2019-10-21 Thread Eric Naujock via 4D_Tech
Is there a plugin or tool out there that can parse and breakdown a X509 style 
certificate into its components to be able to display the fields within. I did 
the typical Google Foo, and the 4D Docs. Along with Miyako. I just am not using 
any such code. 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: Determining object content types

2019-10-21 Thread Chip Scheide via 4D_Tech
This is how I am handling it 
Whatever_it_is:=OB GET(object;property;Whatever_Type_I_Need)


as for find in object array, basic processing:

  if requested property exists
check value
  else
see if element contains 
  an object - check it for property & value
  an object array [OB GET ARRAY( into object array)]
 call this method again with this found object array

Chip

On Mon, 21 Oct 2019 11:21:02 -0700, Kirk Brooks via 4D_Tech wrote:
> 
> You know I've seen a lot of JS code on other platforms where they tend to
> treat anything in a JSON as a text value and type it when it's accessed.
> It's not a bad approach.
We have done so much, with so little, for so long;
We are now qualified to anything with nothing 
  - unknown
**
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: Determining object content types

2019-10-21 Thread Kirk Brooks via 4D_Tech
Chip,
If you are using v15 OB SET ARRAY can set the native 4D arrays except for
pointers, I think. So if you set a text array you can get a text array
back. But the object property type is not concerned with the array type. As
far as OB GET TYPE is concerned any array is an object array.

In v17 it's treated like a collection. I really never used v16 a lot so I'm
not as familiar with what happens there.

In v17 you should really use collections. The OB SET ARRAY and OB GET ARRAY
methods are really for compatibility at this point. Collections offer so
much more flexibility since each element of a collection can be any type of
data. v15 will handle that but only very deep inside itself. By that I mean
you can import a JSON with a collection of mixed data types and 4D will
handle it but at the program level you can't manipulate or change anything.
In v17 you can.

Having worked with a lot of object arrays in v15 I agree with John that if
you need to search in the array and deal with different data types you will
want to build an object for each element. Something like: { name: "xyz",
value: } is good. This way you can have mixed data
types in the same object array.

Then you can us OB GET TYPE on the object:  OB GET TYPE($obj;"value") ->
whatever the type is.
The only way to search the array is by looping through it.

It's clunky compared to what you can do in v17 but the best approach I
found for v15.

You know I've seen a lot of JS code on other platforms where they tend to
treat anything in a JSON as a text value and type it when it's accessed.
It's not a bad approach.

On Mon, Oct 21, 2019 at 11:00 AM Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> John,
> thanks
>
> I was typing a reply, and realized I had not tested something.
> OB GET ARRAY(Object;Property;Object_Array) when the 'object array' is
> not an object array.
>
> if the array in the object is NOT an actual object array, then
> Object_Array is set to the size of the array inside the object, BUT all
> elements are 'undefined'.
>
> so..
> if I find an array, I can extract it into an object array, and if
> element 1 is undefined it is NOT an actual object array, and if element
> 1 is defined then it is an abject array and I can recursively call my
> new find in object array method!
>
> Chip
> On Mon, 21 Oct 2019 12:14:21 -0500, John DeSoi via 4D_Tech wrote:
> > You can't determine the type of the array. I think you can load any
> > type into a text array, but then you would have to convert it. The
> > best option for internal use is to include a property that indicates
> > the type, i.e. use "type" and "value" pairs.
> >
> > John DeSoi, Ph.D.
> >
> >
> >
> >> On Oct 21, 2019, at 11:27 AM, Chip Scheide via 4D_Tech
> >> <4d_tech@lists.4d.com> wrote:
> >>
> >> However, a longint array is NOT an object array, and vise verse.
> >> So how do you determine the type of an array inside an object?
> >
> > **
> > 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
> > **
> We have done so much, with so little, for so long;
> We are now qualified to anything with nothing 
>   - unknown
> **
> 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
> **



-- 
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: Determining object content types

2019-10-21 Thread Chip Scheide via 4D_Tech
John,
thanks

I was typing a reply, and realized I had not tested something.
OB GET ARRAY(Object;Property;Object_Array) when the 'object array' is 
not an object array.

if the array in the object is NOT an actual object array, then 
Object_Array is set to the size of the array inside the object, BUT all 
elements are 'undefined'.

so..
if I find an array, I can extract it into an object array, and if 
element 1 is undefined it is NOT an actual object array, and if element 
1 is defined then it is an abject array and I can recursively call my 
new find in object array method!

Chip
On Mon, 21 Oct 2019 12:14:21 -0500, John DeSoi via 4D_Tech wrote:
> You can't determine the type of the array. I think you can load any 
> type into a text array, but then you would have to convert it. The 
> best option for internal use is to include a property that indicates 
> the type, i.e. use "type" and "value" pairs.
> 
> John DeSoi, Ph.D.
> 
> 
> 
>> On Oct 21, 2019, at 11:27 AM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> However, a longint array is NOT an object array, and vise verse.
>> So how do you determine the type of an array inside an object?
> 
> **
> 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
> **
We have done so much, with so little, for so long;
We are now qualified to anything with nothing 
  - unknown
**
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: Determining object content types

2019-10-21 Thread John DeSoi via 4D_Tech
You can't determine the type of the array. I think you can load any type into a 
text array, but then you would have to convert it. The best option for internal 
use is to include a property that indicates the type, i.e. use "type" and 
"value" pairs.

John DeSoi, Ph.D.



> On Oct 21, 2019, at 11:27 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> However, a longint array is NOT an object array, and vise verse.
> So how do you determine the type of an array inside an object?

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

Determining object content types

2019-10-21 Thread Chip Scheide via 4D_Tech
given an object and its contents.

how do you determine the type of the contents? specifically arrays.
an object can hold an army of any defined type, long, real, text, or 
object

If I execute the command OB GET PROPERTY NAMES, or OB GET Type, if the 
contents of the object is an array the value returned is : 39 = Object 
array.

However, a longint array is NOT an object array, and vise verse.
So how do you determine the type of an array inside an object?

Thanks
Chip
We have done so much, with so little, for so long;
We are now qualified to anything with nothing 
  - unknown
**
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: How one does RELATE MANY with ORDA

2019-10-21 Thread Kirk Brooks via 4D_Tech
Hi Peter,

On Mon, Oct 21, 2019 at 12:32 AM Peter Bozek via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I am plying with ORDA and LB displaying related records and run into one
> problem: When I delete related record with drop(), entity selection
> accessed through link does not change (probably because documentation says
> that entity stays in memory and is just deleted from disk.)
> I would need to reinitialise linked records by something like RELATED MANY
> commands, but do not see such command in ORDA.
>
and
On Mon, Oct 21, 2019 at 2:55 AM Peter Bozek via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> On Mon, Oct 21, 2019 at 9:39 AM Christian Sakowski <
> christian.sakow...@heubach-media.de> wrote:
>
> > Normally, just call entity.reload() to refresh an entity and its
> related selections.
> That would work, but  wanted to avoid that as I would loose changes done to
> the edited record, or loose the record when it is new.


A couple of thoughts. It sounds like you have a situation where you have
something like an old-school input form: form is displaying a single record
with a listbox showing some child records. When the user deletes a child
record you want the listbox to refresh to show the updated selection. And
the reason you don't want to use entity.reload() is because this would
compel saving changes to the parent/new record. Have I got that right?

My first thought is why would you allow the user to delete a child record
and NOT save the parent? Just wondering what makes that a problem. (And -
yes I did just ask the equivalent of "why would you want to do that?")

Next, you could wrap the editing process in a transaction. I haven't tried
to see if .reload() respects the state of the transaction but I expect it
to. This isn't my preferred way of handling this sort of thing but it's an
option.

Another thought is to manage the selection of child records manually. It's
trivial to set up and would accommodate the situation of saving/deleting
child records independently of what happens on the parent. There's no rule
that says you _have_ to use the relation in the entity and no penalty for
not using it. You could move the related selection to a collection for
editing/display too.

Yet another thought is to abstract the editing to the equivalent of a
variable and edit the variable. You can use the .toObject() method to
change the contents of a record to an object. This gives you total
flexibility without the overhead of a transaction. Your edit form could
have Form.displayRecord which is this object. For a new record you can use
entity.FromObject(Form.displayRecord). If you use UUIDs for the primary key
you can assign it to the object and then use it as the actual PK. To update
an existing object you will need to loop through the properties. It's an
extra step but gives you very fine control over what gets saved when.

Just some thoughts. ORDA makes it incredibly easy to put data on the screen
in any number of ways.

-- 
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: How one does RELATE MANY with ORDA

2019-10-21 Thread Christian Sakowski via 4D_Tech
Please support my request (which is a quite needful request):

https://forums.4d.com/Post/DE/31495091/1/31495092

Also you can explain your user case in this request. Hopefully it will be in 
v18.
--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
Tel: +49/(0)40/41 455 455





> Am 21.10.2019 um 11:55 schrieb Peter Bozek :
> 
> 
> 
> On Mon, Oct 21, 2019 at 9:39 AM Christian Sakowski 
>  wrote:
> Normally, just call entity.reload() to refresh an entity and its related 
> selections.
> --
> 
> 
> That would work, but  wanted to avoid that as I would loose changes done to 
> the edited record, or loose the record when it is new. It seems I will have 
> to do 
> .save()
> .reload()
> 
> which complicates stuff quite a bit.
>  
> --
> 
> Peter Bozek


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.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: How one does RELATE MANY with ORDA

2019-10-21 Thread Peter Bozek via 4D_Tech
On Mon, Oct 21, 2019 at 9:39 AM Christian Sakowski <
christian.sakow...@heubach-media.de> wrote:

> Normally, just call entity.reload() to refresh an entity and its related
> selections.
> --
>
>
That would work, but  wanted to avoid that as I would loose changes done to
the edited record, or loose the record when it is new. It seems I will have
to do
.save()
.reload()

which complicates stuff quite a bit.

--

Peter Bozek
**
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: How one does RELATE MANY with ORDA

2019-10-21 Thread Christian Sakowski via 4D_Tech
Normally, just call entity.reload() to refresh an entity and its related 
selections.
--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
Tel: +49/(0)40/41 455 455





> Am 21.10.2019 um 09:31 schrieb Peter Bozek via 4D_Tech <4d_tech@lists.4d.com>:
> 
> I am plying with ORDA and LB displaying related records and run into one
> problem: When I delete related record with drop(), entity selection
> accessed through link does not change (probably because documentation says
> that entity stays in memory and is just deleted from disk.)
> I would need to reinitialise linked records by something like RELATED MANY
> commands, but do not see such command in ORDA.
> 
> --
> 
> Peter Bozek
> **
> 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
> **


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.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: 4D Websites (Are they down?)

2019-10-21 Thread Tom Benedict via 4D_Tech
Indeed!

Thanks for working your magic Kirk!

Tom Benedict

> On Oct 20, 2019, at 21:15, roofto...@mac.com wrote:
> 
> The 4D site is working for me as of 9:00 Pacific Time
> 
>> On Oct 20, 2019, at 8:28 PM, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I haven’t had any luck connecting to 4D.com all weekend.
>> 
>> Tom Benedict
>> 
>>> On Oct 20, 2019, at 10:41, Jeremy French via 4D_Tech <4d_tech@lists.4d.com> 
>>> wrote:
>>> 
>>> 
>>> Time: Sunday, October 20th, 2019 around :1:40 pm EST
>>> 
>>> 
>>> Is anyone finding the 4D websites unresponsive today?
>>> 
>>> Each of the following is unresponsive:
>>> 
>>> 4d.com
>>> doc.4d.com
>>> forums.4d.com
>>> livedoc.4d.com
>>> us.4d.com
>>> 
>>> Is there an email address to alert 4D?
> 

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