Re: gitignore for projects

2020-01-03 Thread Narinder Chandi via 4D_Tech
Mike,

Hi. It would probably not be appropriate for 4D to create a .gitignore as it 
can't assume that you will use Git as a repo. For Git you would want to exclude:
/Project/DerivedData

and possibly:
/Logs

On mac you would also want to exclude (this could be put in your global 
.gitignore file as it's applicable to all Git projects):
.DS_Store

There may be other exclusions that I have missed.

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 3 January 2020 at 14:38
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Mike Kerner 
Subject: gitignore for projects

It would be nice if when 4D exported a project, it created a .gitignore
file, but since it does not, which files/folders are we excluding?

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**
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
**

Options for Connecting to MS SQL Server from OS X 10.14+

2019-12-18 Thread Narinder Chandi via 4D_Tech
Hi all. We have a requirement to connect to MS SQL Server databases hosted on 
AWS from 4D v17.3 on Mac OS 10.14+. The use case scenario is likely to be that:
* only a single user will need to connect, either via 4D Client or from 4D 
standalone - tbc
* we may need to ingest large amounts of data from SQL Server into 4D tables in 
order to analyse it - the developer wishes to do this from 4D for his 
convenience
* the requirement is most likely one-way read only from MS SQL Server and write 
to 4D - tbc

If my initial investigations are correct we need:
* an ODBC manager
* SQL Server ODBC driver

For the ODBC manager it seems there are really only 2 choices - both free:
* http://www.odbcmanager.net - ODBC Manager
* http://www.iodbc.org - iODBC

For the ODBC driver there seems to be these options - requiring licences:
* http://www.actualtech.com
* https://www.openlinksw.com

It looks like ODBC Manager is supported and maintained by Actual Technologies 
who can also provide a driver.

Does anybody have recent experience of connecting to MS SQL Server from 4D v17 
on Mac OS 10.14? If so:
* what combination of driver manager and SQL Server driver worked for you - was 
it from the ones I have listed or some other?
* could you kindly elaborate on your experience - connection, reliability, 
driver stability, performance, etc
* any other useful pointers for consideration?

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: XML Null reference with DOM Find XML element

2019-12-17 Thread Narinder Chandi via 4D_Tech
Piotr,

Hi. That seems like the expected behaviour according to the docs:

https://doc.4d.com/4Dv17/4D/17.3/Overview-of-XML-DOM-Commands.300-4620648.en.html

"Error Handling  
Many functions in this theme return an XML element reference. If an error 
occurs during function execution (for example, if the root element reference is 
not valid), the OK variable is set to 0 and an error is generated.
In addition, the reference returned in this case is a sequence of zero "0" 
characters (16 characters in 32 bits, and 32 characters in 64 bits)."

Does that help? Are you testing for OK = 0 in your code?

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Tuesday, 17 December 2019 at 09:08
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Piotr Chabot Stadhouders 
Subject: XML Null reference with DOM Find XML element

Hi,

4Dv17R6, Windows 64-bit
What is the best way to test if a XML DOM element is a Null reference?
Especially when using DOM Find XML element?

The docs say “If the command has been executed correctly, the system 
variable OK is set to 1”
Does it mean “if the command finds an element”? Finding nothing is also 
“executed correctly”

In our app we tested on “”, but now it seems (64-bit?) that 
a null reference consists of 32 zeroes instead of 16
I only see 1 mention about null reference in XML but it tals about 16 zeroes

Does anybody know more about this?

Gr,
Piotr
**
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: DOCUMENT LIST : how do I know the documents are valid

2019-11-21 Thread Narinder Chandi via 4D_Tech
Piotr,

As alternative "hacky" solution you could try is to monitor the "modified at" 
at property and keep testing it every second or so until it's value no longer 
changes? There may be other possibilities too by inside using LEP but I'm not 
sure without further investigation.

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Thursday, 21 November 2019 at 15:03
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Piotr Chabot Stadhouders 
Subject: Re: DOCUMENT LIST : how do I know the documents are valid

Dear Alexander,

Unfortunately, I believe the “locked” attribute doesn’t return true when 
copying is in progress

But thanks for your tip.

Gr,
Piotr


could this help?

GET DOCUMENT PROPERTIES ( document ; locked ; invisible ; created on ; 
created at ; modified on ; modified at )

> Am 21.11.2019 um 11:20 schrieb Piotr Chabot Stadhouders via 4D_Tech 
<4d_t...@xxx.xxx>:
>
> Hi,
>
> We use DOCUMENT LIST and COPY DOCUMENT to handle scans
> The documents are copied by a scanner to a certain folder on a Windows 
server, where we are picking them up and process them
> It seems that because of slow copying the documents are picked up too 
early by us
> How can I ensure that the documents are totally copied by the scanner? 
COPY DOCUMENT to an temporary folder doesn’t seem to solve the problem
**
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: Unable to download from kb

2019-11-09 Thread Narinder Chandi via 4D_Tech
I could download that note. When 4D does not recognise me I delete all 
cookies containing "4D", usually it stops being blind and deaf.

ROTLF :)))

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: Unable to download from kb

2019-11-09 Thread Narinder Chandi via 4D_Tech
I just downloaded it without problem - Safari 13/Mac OS Mojave. If it is 
permissible to do so I can send it to you...

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Saturday, 9 November 2019 at 14:54
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: UKVetDerm 
Subject: Unable to download from kb

Dear 4D collective

I am unable to download the technote materials 
https://kb.4d.com/assetid=78151
I have tried the usual range of browsers, have logged in and am feeling a 
bit defeated. Any tips?

Thanks
Steve Shaw

UKVD
**
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: 3D Button collection? (Or manufacturing)

2019-11-08 Thread Narinder Chandi via 4D_Tech
I remembered now, I was also thinking of The Noun Project:
https://thenounproject.com

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 8 November 2019 at 20:09
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: 3D Button collection? (Or manufacturing)

You could take a look at Google Material Design icons - seems like a pretty 
large collection in 5 styles:
https://material.io/resources/icons/

I'm sure there are some other collections like this but can't recall from 
memory - I will post if I can track them down.

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 8 November 2019 at 19:09
To: 4D Tech Mailing List <4d_tech@lists.4D.com>
Cc: Chris Belanger 
Subject: 3D Button collection? (Or manufacturing)

I was wondering if there is any ‘button collection’ one can use (with 
3D Button).

I am not an artist and that part of UI development is not my forte.

I sometimes use Unicode characters with regular buttons, but it would 
be better to use 3D buttons.

Otherwise, what do you use to make yours?

Thanks,
Chris
**
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: 3D Button collection? (Or manufacturing)

2019-11-08 Thread Narinder Chandi via 4D_Tech
You could take a look at Google Material Design icons - seems like a pretty 
large collection in 5 styles:
https://material.io/resources/icons/

I'm sure there are some other collections like this but can't recall from 
memory - I will post if I can track them down.

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 8 November 2019 at 19:09
To: 4D Tech Mailing List <4d_tech@lists.4D.com>
Cc: Chris Belanger 
Subject: 3D Button collection? (Or manufacturing)

I was wondering if there is any ‘button collection’ one can use (with 3D 
Button).

I am not an artist and that part of UI development is not my forte.

I sometimes use Unicode characters with regular buttons, but it would be 
better to use 3D buttons.

Otherwise, what do you use to make yours?

Thanks,
Chris
**
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: 4D Web Application and SAML or OpenID Connect

2019-11-05 Thread Narinder Chandi via 4D_Tech
Keith,

Hi. It looks like it would be a lot of work to do a native implementation of 
OIDC in 4D?

Why not instead look at providing support for services such as OneLogin, Auth0, 
AWS Cognito instead? Certainly the former 2 of those appear to offer REST APIs 
to. Cognito doesn't offer a REST API but there is a PHP library (I did an 
integration with that last year, non-4D solution) but for your purposes you can 
avoid PHP I think by integrating with the aws-cli and LEP?

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Monday, 4 November 2019 at 18:01
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Keith White 
Subject: 4D Web Application and SAML or OpenID Connect

Hi

Has anyone done work on implementing either SAML or OpenID Connect protocol 
in native 4D code for single sign-on in 4D Web Applications?   I know about 
4D's work on single sign on using Active Directory and/or LDAP etc, but this 
question is specifically for SAML or OpenID Connect.

Services like https://www.onelogin.com/ support these protocols and we're 
being asked more about it.

PHP is one way I suppose, but we currently don't use PHP and I'd prefer a 
native 4D solution.

Many thanks.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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: Responding to an HTTP Request

2019-10-26 Thread Narinder Chandi via 4D_Tech
So it appears that I can use HTTP Client commands for ‘outbound’ REST calls 
and use Web Server commands to respond to ‘inbound’ REST calls. Does that sound 
right?
Correct.

I recently did an e-commerce integration piece into PayPal and it was my first 
spin with the HTTP Client/Web Server commands. I've previously done lots of 
similar work with PHP before which helped with orientating oneself but working 
in the context of 4D was a good experience and the commands are easy to get to 
grips with. Good luck!

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: Responding to an HTTP Request

2019-10-26 Thread Narinder Chandi via 4D_Tech
Tom,

A simple minimal example of how to respond would be something like this:

ARRAY TEXT($aHeaderFields;3)
ARRAY TEXT($aHeaderValues;3)

$aHeaderFields{1}:="X-VERSION"
$aHeaderFields{2}:="X-STATUS"
$aHeaderFields{3}:="USER-AGENT"

$aHeaderValues{1}:="HTTP/1.0"
$aHeaderValues{2}:="200 OK"
$aHeaderValues{3}:="4D Web Server/v17"

WEB SET HTTP HEADER($aHeaderFields;$aHeaderValues)
WEB SEND TEXT("")

Check out the 4D Web Server docs for more details:
https://doc.4d.com/4Dv17/4D/17.3/Web-Server.201-4620181.en.html

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
https://toolbox.systems
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Saturday, 26 October 2019 at 04:29
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tom Benedict 
Subject: Responding to an HTTP Request

I’m just starting to do some 4D web development and have a simple question.

The 4D app I’m working on needs to respond to a REST call by acknowledging 
it and sending a status (200 would work). When the REST call comes into the 4D 
Web Server I handle it in On Web Connection. That part is working fine, but I 
need to acknowledge receipt so the calling app/service won’t keep retrying. 
This seems like it should be pretty straightforward, but I’m at a loss to know 
where to start. I know I need to build a status line and header line, but ‘how’ 
do I send it? Do I use  some form of HTTP Request? Or do I need to build 
something with 4DIC? Or something else?

If someone could point me to a resource that can enlighten me I’d 
appreciate it.

Thanks,

Tom Benedict



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


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

Re: Object Array - finding an object with attritbute value

2019-10-17 Thread Narinder Chandi via 4D_Tech
Chip,

Use the For each...End for each loop construct to iterate over the array of 
objects, something like (untested written off the bat):

For ($i;1; size of array(object_array))
  For each(property;object_array{$i})
If ([property="Object_Name")
  If (object_array{$i}.property="Fred") //or object_array{$i}[property] 
should also work I think if you prefer bracket notation
//do something here...
  End if
End if
  End for each
End for

Like I said though, I have not tested the above code!

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Thursday, 17 October 2019 at 22:06
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: Object Array - finding an object with attritbute value

Given that I have an array of objects - Array Object(object_array;5)

(hand waving) I populate the array with objects ...

how do I find which object in the array has an attribute/property with 
a specific value?
ex: property "Object_Name" : "Fred"

How do I find the array element (object) in which the property 
'Object_Name = "Fred"?

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


**
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: HTTP Request and x-www-form-urlencoded

2019-10-12 Thread Narinder Chandi via 4D_Tech
Tom,

This may have been mentioned already, but I just remembered that it is possible 
to do this encoding natively with 4D's XML and XSLT Transformation commands and 
I wrote a pair of encode/decode functions several years ago that worked no 
problem.

However, XSLT has been deprecated in v17. So, unless you are using a prior 
version of 4D (and I get the impression that you are not as you mention ORDA in 
a previous post) then  you are out of luck. However, if you want the 
encode/decoded functions let me know and I can send them to privately.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Saturday, 12 October 2019 at 23:12
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: HTTP Request and x-www-form-urlencoded

Tom,

>https://github.com/miyako/4d-tips-encode-uri
>I found that component earlier today and it does help a bit. I was 
looking for a way to fill an object with key value pairs which HTTP Request 
would then convert into the right content-type.

Unfortunately HTTP Request is sadly still lacking this capability and, to 
the best of my knowledge, it is not a part of the HTTP client command set or 
the Internet Command set which is rather a glaring oversight IMO. It is pretty 
standard stuff as far as HTTP requests go. 4D really need to address this.

You could perhaps create your own wrapper around HTTP Request and combine 
that with Miyako's code if that might solve your problem?

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: HTTP Request and x-www-form-urlencoded

2019-10-12 Thread Narinder Chandi via 4D_Tech
Tom,

>https://github.com/miyako/4d-tips-encode-uri
>I found that component earlier today and it does help a bit. I was looking 
for a way to fill an object with key value pairs which HTTP Request would then 
convert into the right content-type.

Unfortunately HTTP Request is sadly still lacking this capability and, to the 
best of my knowledge, it is not a part of the HTTP client command set or the 
Internet Command set which is rather a glaring oversight IMO. It is pretty 
standard stuff as far as HTTP requests go. 4D really need to address this.

You could perhaps create your own wrapper around HTTP Request and combine that 
with Miyako's code if that might solve your problem?

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: HTTP Request and x-www-form-urlencoded

2019-10-12 Thread Narinder Chandi via 4D_Tech
Tom,

I'm not sure but maybe this will help you?
https://github.com/miyako/4d-tips-encode-uri

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Saturday, 12 October 2019 at 20:54
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tom Benedict 
Subject: HTTP Request and x-www-form-urlencoded

I have very little experience with HTTP Request. I’m calling an external 
REST service using 4D’s HTTP Request command. The REST service requires that 
the content-type be x-www-form-urlencoded. The “contents” parameter of the HTTP 
Request command supports sending a 4D Object (JSON) but that is failing 
(unknown parameter) when I submit it to the REST service. I suspect that is the 
REST service is expecting x-www-form-urlencoded rather than JSON. 

I’ve successfully tested the REST service using Postman and I can copy the 
encoded URL from Postman and send it successfully from 4D HTTP Request instead 
or JSON. So I just need to build the encoded URL on the 4D side. It’s tedious 
to do though, and I think it’s convenient to use an object on the 4D side to 
manage the key value pairs. So I’m wondering is there an ‘easy’ way to convert 
a JSON object into an encoded URL?

Hope this makes sense,

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


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

Re: Using Github to Manage Distributed Development

2019-10-11 Thread Narinder Chandi via 4D_Tech
I hope that what we're suggesting is that the plan is to (finally) dump the
binary format entirely and move to a collection of text files, whether they
be XML, YAML, JSON, etc.

Yes, the Project mode currently in Beta seems designed to achieve exactly that. 
In fact maybe you missed JPR's reply as it was in another thread:

I said:
But, I still need to fully understand exactly why 4D is not eliminating the 
interpreted structure binary .4DB file completely at this time? Maybe 4D plan 
to do so eventually? Was this question asked at the last tour? If we are given 
the Project feature then we should be all in and have no option but to embrace 
it and source code repos such as Git, since, pretty much every other 
programming language is doing it this way.

JPR responded:
AFAIK, if you use the Project mode, you don't need any binary, for everything 
is in text files (.json, .xml, .txt, .4DProject, .css, . 4DCatalog , .4dm, 
.4DForm, etc.) The .4DB is not necessary.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: 4D Server Hosting - The Future ? & Using Github to Manage Distributed Development

2019-10-11 Thread Narinder Chandi via 4D_Tech
JPR,

Hi. Ah, that's great, thanks for confirming that. I should really find some 
time to experiment with Project mode then ;)

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 11 October 2019 at 09:33
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: JPR 
Subject: Re: 4D Server Hosting - The Future ? & Using Github to Manage 
Distributed Development

AFAIK, if you use the Project mode, you don't need any binary, for 
everything is in text files (.json, .xml, .txt, .4DProject, .css, . 4DCatalog , 
.4dm, .4DForm, etc.) The .4DB is not necessary.


**
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: Using Github to Manage Distributed Development

2019-10-10 Thread Narinder Chandi via 4D_Tech
Well, JPR's as always makes a good response! But, I still need to fully 
understand exactly why 4D is not eliminating the interpreted structure binary 
.4DB file completely at this time? Maybe 4D plan to do so eventually? Was this 
question asked at the last tour? If we are given the Project feature then we 
should be all in and have no option but to embrace it and source code repos 
such as Git, since, pretty much every other programming language is doing it 
this way.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Thursday, 10 October 2019 at 23:38
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tim Nevels 
Subject: Re: Using Github to Manage Distributed Development

On Oct 10, 2019, at 4:44 PM, Narinder Chandi wrote:

> Yes, you're correct, currently the move from binary to Project format is 
one way, whether this will become bi-directional I don't know. It is still 
possible to compile back to a single binary though so the step to go from 
Project to interpreted structure binary should surely be possible??

This was asked to JPR at the last 4D World Tour show and his response was 
“why would you want to do that?” And then he proceeded to explain that to 
implement a feature like that would require many hours of engineering time, and 
QA time and then it would have to be maintained into the future. 

So he said are no plans for a “project folder back to a single .4DB file” 
feature. Only way to have the happen is to convince 4D it is a needed and 
necessary feature. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.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: Using Github to Manage Distributed Development

2019-10-10 Thread Narinder Chandi via 4D_Tech
Tom,

Yes, you're correct, currently the move from binary to Project format is one 
way, whether this will become bi-directional I don't know. It is still possible 
to compile back to a single binary though so the step to go from Project to 
interpreted structure binary should surely be possible??

Yes, Branching is a core concept of working with Git.

I think what each of your developers need to do is to Checkout a Git repo 
Feature Branch of Master and export their changes into that. Then, they Push 
that Feature Branch up to Master and make a Pull request into Master. Once 
approved then the Feature Branch is merged into Master. Other developers would 
do the same. Then, each developer Pulls Master to update their local Checked 
out copy of Master. They can Diff that against their previous Feature Branch 
which will give them a list of all the changes that the _other_ developers have 
made and merged into Master and synch their structure up.

I think that's it above! The ultimate benefit of all that is that your devs are 
only ever moving around Diffs, not the whole structure export.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-Original Message-
From: Tom Benedict 
Date: Thursday, 10 October 2019 at 21:22
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: Using Github to Manage Distributed Development

Thanks for your response Narinder,

>ditch the 4D binary based structure file and use v17's 4D Project format

Indeed, that is an attractive option, although it requires 17R5 or higher. 
Once it’s out of beta I may consider it. I’ve heard that once a structure is 
moved to Project Mode, there’s no way to get it out of Project Mode. I don’t 
really know what that means, but that’s one of the reasons I haven’t tried it 
yet.

>Some variation of Gitflow has been used at every client I've worked for 
over the last few years (in a PHP context). I think what you describe below 
loosely maps to Gitflow so take a look at that and see if this is the case. 
Briefly, each of your developers creates their own Feature branch from the 
Master branch on Git, work on it and then merge back into Master (there's a bit 
more to the process but I'm just trying to simplify).

This is great guidance. I wasn’t sure whether each developer would be a 
separate branch or not.

Right now my biggest challenge is logistical. The structure export consists 
of over 55,000 files. Running that every few days and uploading to Git takes 
hours. There’s gotta be a more efficient way.

I’ll check out Gitflow and see whether it can help me.

Thanks again,

Tom Benedict

> On Oct 10, 2019, at 13:12, Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
> 
> Tom,
> 
> What version of 4D are you using?
> 
> It seems to me that the way forward for team development (or solo for 
that matter) will be to ditch the 4D binary based structure file and use v17's 
4D Project format stored that in a Git repo, even though it's still Beta it 
should be finalised soon enough. IMO, this is going to be a revolutionary 
change for managing 4D code and supporting assets.
> 
> The most popular Git branching model is Gitflow:
> https://nvie.com/posts/a-successful-git-branching-model/
> 
> Some variation of Gitflow has been used at every client I've worked for 
over the last few years (in a PHP context). I think what you describe below 
loosely maps to Gitflow so take a look at that and see if this is the case. 
Briefly, each of your developers creates their own Feature branch from the 
Master branch on Git, work on it and then merge back into Master (there's a bit 
more to the process but I'm just trying to simplify).
> 
> Regards,
> 
> Narinder Chandi,
> ToolBox Systems Ltd.
> 
> I am available for new consulting opportunities…
> http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
> -- 
> 
> -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: Thursday, 10 October 2019 at 18:42
> To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> Cc: Tom Benedict 
> Subject: Using Github to Manage Distributed Development
> 
>In my current environment, each developer works on a separate copy of 
a “Master" 4D structure. Periodically each developer runs the "Export structure 
file” command to export everything (methods, forms etc) to local disk. Then 
they comp

Re: Using Github to Manage Distributed Development

2019-10-10 Thread Narinder Chandi via 4D_Tech
Tom,

What version of 4D are you using?

It seems to me that the way forward for team development (or solo for that 
matter) will be to ditch the 4D binary based structure file and use v17's 4D 
Project format stored that in a Git repo, even though it's still Beta it should 
be finalised soon enough. IMO, this is going to be a revolutionary change for 
managing 4D code and supporting assets.

The most popular Git branching model is Gitflow:
https://nvie.com/posts/a-successful-git-branching-model/

Some variation of Gitflow has been used at every client I've worked for over 
the last few years (in a PHP context). I think what you describe below loosely 
maps to Gitflow so take a look at that and see if this is the case. Briefly, 
each of your developers creates their own Feature branch from the Master branch 
on Git, work on it and then merge back into Master (there's a bit more to the 
process but I'm just trying to simplify).

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Thursday, 10 October 2019 at 18:42
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tom Benedict 
Subject: Using Github to Manage Distributed Development

In my current environment, each developer works on a separate copy of a 
“Master" 4D structure. Periodically each developer runs the "Export structure 
file” command to export everything (methods, forms etc) to local disk. Then 
they compare those files using a diff tool (Examdiff in our case) against a 
folder full of files exported from the "master” copy of the 4D structure. The 
diff tool shows us what methods/forms/etc are different. The developer then 
uses that list as a guide and, with both the local 4D structure open and the 
“master” 4D structure open, copy/pastes or ‘moves’ the edits from local to 
master.

We would like to move this process to Github. I’ve tried, but have not been 
able to map the Git concepts to my existing process. Is anyone using Github 
with 4D in this way? If so, could you describe your workflow?

BTW, I’ve read the Tech Note about 4D on Github, but it looks like it is 
focused on using Project Mod. I also read Thomas Maul’s post 
 about his 
component which will commit methods to Github. I’m also aware of Lutz 
Epperlein’s use of VC Framework. None of those matches my current workflow.

Thanks for any help.

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


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

Re: Converting 4D Server v11 to v17

2019-10-10 Thread Narinder Chandi via 4D_Tech
In my experience 4D conversions have generally been fairly smooth, and that's 
going back many versions. When I did a 4D v11 to v15 conversion (Mac server and 
clients) a few years ago there were no significant issues that I recall. I've 
recently completed a conversion of that same database from v15 to v17 the task 
was bigger in that we wanted to deal with the Subtables issue which we ignored 
in the previous conversion, and also prepare for Object Notation support. In my 
case, the database had widespread usage of the dot character in variables, 
method names, table and form names. There were nearly 6000 warnings to address. 
It was a painful task but I managed it.

Other issues that most conversions will have is converting PICTs to PNG, JPG 
etc as PICT is now deprecated but it's not difficult. Also, a number of 
commands are obsoleted and they need to be addressed, either by removal or 
replacement of more modern equivalents.

The biggest issues with any conversion in my experience is the use of 4D 
Plugins, especially third party ones that may no longer supported. With 4D, 4D 
Write is now replaced with 4D Write Pro and from what I have read it requires a 
complete re-write if you use that plugin.

I'm sure there are some issues that I forget to mention, but I would say not to 
be frightened to go for it. Assess the scope of conversion work needed and plan 
from there.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 


-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: Tuesday, 8 October 2019 at 08:46
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: "Peter.Burgess" 
Subject: Converting 4D Server v11 to v17

Hi all.
There was a small thread on this topic 12 months ago, overall the reaction
seemed to be positive, but given that time has passed and other people may
have tried a large 'jump' conversion such as this, I would be very
interested in their experiences.
In short we have a fairly large database, Windows platform, re-write not
feasible, reasonable design with no sub-tables (I say reasonable because it
has really only suffered from 2 primary developers and while they may not
have been highly skilled programmers at least were not reckless), and we are
moving to a Client base running Windows 10 PCs. We really need to upgrade,
and preferably to the very latest version, otherwise the risk of some
critical failure becomes unacceptable.
I would like to gauge how feasible and/or straightforward it would be, to
convert from 4D Server v11.9 to v17. Is it mostly just a matter of clicking
a button and letting 4D do its thing, or are there some serious pitfalls I
should watch out for?
In the thread circa October 2018, the suggestion seemed to be that while v17
has a different architecture and is primarily object orientated, it will
still accept and interpret v11 style language. Is this truly the case?

Thanks for your time.

Regards,
Pete



--
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: certification matrix for v15

2019-10-07 Thread Narinder Chandi via 4D_Tech
You can download it from here and other versions from 2004 to v17 can be found 
there too:

ftp://188.165.34.189//Documents/Products_Documentation/LastVersions/Line_15/VIntl

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Monday, 7 October 2019 at 18:29
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Charles Miller 
Subject: certification matrix for v15

Hi All,This seems to be missing form 4Ds web site anyone have copy

Thanks and regards

Chuck

-- 

-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  https://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
**

Re: v15 - automatted primary key for new tables

2019-10-02 Thread Narinder Chandi via 4D_Tech
This is standard since v14. From the docs:

"Note: Starting with 4D v14, any new table created in the database contains a 
primary key field by default. For more information about this, refer to Default 
primary key field."
https://doc.4d.com/4Dv15/4D/15.6/Creating-and-modifying-tables.300-3836651.en.html

You can control the name of the Primary Key in Preferences -> Structure.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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, 2 October 2019 at 20:43
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: v15 - automatted primary key for new tables

I am going to ignore the problem I have been having and start a new 
project.

I created a new database, and added a table.
the new table automatically added a primary key field

Where is this setting/option accessed?
maybe this is the issue I am having?

Chip

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


**
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: Web aficionados - Not allow user to access file directly

2019-10-01 Thread Narinder Chandi via 4D_Tech
It's a shame that 4D's web server does not directly support something similar 
to Apache's .htaccess file in the web root. Securing direct access to html 
files/folders would then be trivial.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Tuesday, 1 October 2019 at 16:49
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: "Epperlein, Lutz (agendo)" 
Subject: AW: Web aficionados - Not allow user to access file directly

Use the so-called "Web decoy" technique. Basically you put your html files 
in another folder outside your html root. Then redirect all requests using ON 
WEB CONNECTION. For every http request 4D cannot serve directly, it uses ON WEB 
CONNECTION.

This is more elaborated e.g. here:

How to skip over HTTP and redirect to HTTPS
https://kb.4d.com/assetid=75313
How to skip over HTTP and redirect to HTTPS: Part 2 (The Web decoy folder)
https://kb.4d.com/assetid=75753

And there was a book "The Web Companion" by David Adams, it's a bit old 
now, but the technique remains the same. If you can get a copy ...

HTH

Regards
Lutz

-Ursprüngliche Nachricht-
Betreff: Web aficionados - Not allow user to access file directly

Hi Web Experts,

I don't want the web users to access html files directly, without going 
through ON WEB CONNECTION.

e.g.

http://myweb/foobar.html

If "foobar.html" exists in the web folder, Users can put in this in the 
address and it will pull up the web page, but will not process the 4D Tags, etc.
Very, very funky.

So, I'm probably being a dope, but does anyone know what I can do to 
prevent accessing html files directly?

Gracious thanks

Randy Engle


**
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: HTTP AUTHENTICATE - how to know if the authentification worked

2019-09-27 Thread Narinder Chandi via 4D_Tech
I would say that you should use the HTTP Status Code returned by HTTP Get. A 
well designed service should return 401 Unauthorised.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 27 September 2019 at 17:07
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Paul Lovejoy 
Subject: HTTP AUTHENTICATE - how to know if the authentification worked

Hi everyone,

I’m using HTTP AUTHENTICATE to authenticate connections to a web server. 
The call to authenticate is immediately followed by a HTTP get(). The HTTP get 
occasionally fails and I’ve been able to trace this to a failed HTTP 
AUTHENTICATE, which appears to be an error from the website. However, it 
appears there’s no way to know the authentification succeeded or failed. There 
is no return code and OK doesn’t get set either. So I get various errors such 
as -9935 from the subsequent call to HTTP get(), which isn’t very helpful.

Has anyone found an elegant workaround to find out if HTTP AUTHENTICATE() 
actually worked they can share?


Thanks in advance,


Paul

**
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: v17 immediately quits on launch

2019-09-27 Thread Narinder Chandi via 4D_Tech
Sorry my last post got slightly truncated in one place... here it is again but 
complete...

Pat,

Did the client send you any crash logs? I posted about a crashing issue with 
v17 just recently over on the 4D Forum. See this thread:
https://forums.4d.com/Post/EN/31710108/1/31710109#31710109

If it's related to application translocation then I posted in that thread how 
to fix it.

TL;DR Solutions are:
Option 1
In Mac OS X 10.13 (or 10.12, I'm not sure), Apple removed the ability for 
Gatekeeper to allow Apps downloaded from anywhere to be run as an option, so 
whereas the available options in "Security & Privacy" system preferences pane 
used to be:

Allow apps downloaded from:
* App Store
* App Store and identified developers
* Anywhere

the options are now restricted:
* App Store
* App Store and identified developers

Using Gatekeeper on the command line and executing:

> sudo spctl --master-disable

will add the "Anywhere" option back into the "Security & Privacy" preferences 
pane and select it as the default option.

Use at your own risk of course and beware where you download apps from!
Option 2
Use the terminal to delete the quarantine attribute:
xattr -d com.apple.quarantine path/to/4D.app

Use either option at your own risk (or the clients!) and consequently beware 
where you download apps from!

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 27 September 2019 at 14:04
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Pat Bensky 
Subject: v17 immediately quits on launch

Got a client who has just upgraded to v17.
He has installed it on a number of computers and they work OK. But on his
own, it simply quits as soon as he tries to launch it. He's on Mac OS
10.2.6 and the version is 17.3.

Any suggestions on what to look for? He's tried the obvious things (delete
prefs, restart the computer, etc.)

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

Re: v17 immediately quits on launch

2019-09-27 Thread Narinder Chandi via 4D_Tech
Pat,

Did the client send you any crash logs? I posted about a crashing issue with 
v17 just recently over on the 4D Forum. See this thread:
https://forums.4d.com/Post/EN/31710108/1/31710109#31710109

If it's related to application translocation then I posted in that thread how 
to fix it.

TL;DR Solutions are:
Option 1
In Mac OS X 10.13 (or 10.12, I'm not sure), Apple removed the ability for 
Gatekeeper to allow Apps downloaded from anywhere to be run as an option, so 
whereas the available options in "Security & Privacy" system preferences pane 
used to be:

Allow apps downloaded from:
* App Store
* App Store and identified developers
* Anywhere

the options are now restricted:
* App Store
* App Store and identified developers

Using Gatekeeper on the command line and executing:

> sudo spctl --master-disable

Option 2
Use the terminal to delete the quarantine attribute:
> xattr -d com.apple.quarantine path/to/4D.app

Use either option at your own risk (or the clients!) and consequently beware 
where you download apps from!

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 27 September 2019 at 14:04
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Pat Bensky 
Subject: v17 immediately quits on launch

Got a client who has just upgraded to v17.
He has installed it on a number of computers and they work OK. But on his
own, it simply quits as soon as he tries to launch it. He's on Mac OS
10.2.6 and the version is 17.3.

Any suggestions on what to look for? He's tried the obvious things (delete
prefs, restart the computer, etc.)

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

Re: Silent Failure when Constructing an Object

2019-09-20 Thread Narinder Chandi via 4D_Tech
Douglas,

Thanks for testing. OK, so I tested in isolation and in fact the code errors 
correctly.

So, I realised that my actual scenario was that the code is called in a method 
from On Web Connection. I can set a breakpoint at the offending line but the 
debugger aborts at the next line of code after the one that should trigger a 
syntax error and code execution ceases. In fact I tried to create a deliberate 
syntax error and still see that no syntax error is displayed and code execution 
ceases. Not sure if this is a bug or behaviour by design? Possibly the error is 
returned to the client making the request but in my case it's an external 
service making the request and I can't see the response the service receives 
other than the fact it appears to fail.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-Original Message-
From: Douglas von Roeder 
Date: Friday, 20 September 2019 at 19:20
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: Silent Failure when Constructing an Object

Narinder:
I just ran the code you posted on 17R4 (Mac and Windows) and I’m getting an 
error message - “Object or a Collection expected”
 
After the code completes execution, has 4D created .bar dynamically?

--
Douglas von Roeder
949-910-4084








On Fri, Sep 20, 2019 at 11:02 AM Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com> wrote:


So, I am writing some code and using C_OBJECT. Using the following 
contrived object as an example:

C_OBJECT($object)
$object:=New object
$object.foo:=New object
$object.foo.foo1:="foo1"
$object.foo.foo2:="foo2"
$object.bar:=New object
$object.bar.bar1:="bar1"
$object.bar.bar2:="bar2"

The code executes as expected. Sometimes I might accidentally forget to 
initialise a nested object - it happens! So, if I replace the above with:

C_OBJECT($object)
$object:=New object
$object.foo:=New object
$object.foo.foo1:="foo1"
$object.foo.foo2:="foo2"
$object.bar.bar1:="bar1"
$object.bar.bar2:="bar2"

i.e. I forget "$object.bar:=New object" then the code will silently fail. 
Can somebody tell me why the interpreter does not raise an error in this 
situation? This was tested with 17.1 and 17.2 on Mac and the behaviour was the 
same (i.e. silent code failure) in both versions.

In the docs for C_OBJECT:
https://doc.4d.com/4Dv17/4D/17.3/C-OBJECT.301-4621707.en.html
it states:
"Important: The C_OBJECT command does not create an object named variable. 
If you want to access the properties of the object itself using object 
notation, you must first initialize it using the New object command, otherwise 
a syntax error is returned (see example)."

That doesn't seem to be the case - no syntax error is raised and the code 
also compiles?! Can somebody point out what I am missing here? Thanks.

Regards,

Narinder Chandi,
ToolBox Systems Ltd.

I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: Picture Reduction / Conversion (2)

2019-09-20 Thread Narinder Chandi via 4D_Tech
David,

Hmm... tricky one to try and troubleshoot over the list. Picking up on your 
point about trying with Paint.net, did you try to re-saving the source PNG 
image using an external program, also tweaking the compression or other 
parameters of the PNG (assuming that is possible...) and then trying to CREATE 
THUMBNAIL from that? It might help you to narrow down whether the issue is 
internal compression or not?

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-Original Message-
From: David Ringsmuth 
Date: Friday, 20 September 2019 at 20:17
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: RE: Picture Reduction / Conversion (2)

Narinder,
 
Thanks for asking that question.
 
CONVERT PICTURE($Photo_g;".jpg")
 
PICTURE TO BLOB($Photo_g;$Pict_x;".jpg")
BLOB TO PICTURE($Pict_x;$Pict_JPG_g)
 
The new, converted picture size is a couple hundred octets, no longer 244 
Ko’s.
 
It appears either as an entire transparent background or a blank picture.
 
Paint.net saves a JPG in 34 KB form 244 KB.
 
I suspect the PNG is compressed somehow and not correctly convertible.
 
David Ringsmuth
     
From: Narinder Chandi via 4D_Tech <mailto:4d_tech@lists.4d.com>
Sent: Friday, September 20, 2019 12:35 PM
To: 4D Tech Mailing List <mailto:4d_tech@lists.4d.com>
Cc: Narinder Chandi <mailto:4dtechmailingl...@toolbox.uk.com>
Subject: Re: Picture Reduction / Conversion (2)

 
David,
 
When you say that the "result is an empty picture", does the resulting 
picture have any bytes and/or dimensions, i.e. did you try checking it with 
Picture size and PICTURE PROPERTIES commands?
 
I wonder if the issue is with the parameters that you are passing to the  
CREATE THUMBNAIL command? But then again, I am sure you must have double and 
triple checked that...
 
Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 
 
-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: Friday, 20 September 2019 at 18:27
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: David Ringsmuth 
Subject: Picture Reduction / Conversion (2)
 
4D v17.4 234574
Windows 10 Home

Using Paint.net to open the PNG and save it as a JPG works fine.

The resulting JGP is perfect.

David Ringsmuth

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

Silent Failure when Constructing an Object

2019-09-20 Thread Narinder Chandi via 4D_Tech
So, I am writing some code and using C_OBJECT. Using the following contrived 
object as an example:

C_OBJECT($object)
$object:=New object
$object.foo:=New object
$object.foo.foo1:="foo1"
$object.foo.foo2:="foo2"
$object.bar:=New object
$object.bar.bar1:="bar1"
$object.bar.bar2:="bar2"

The code executes as expected. Sometimes I might accidentally forget to 
initialise a nested object - it happens! So, if I replace the above with:

C_OBJECT($object)
$object:=New object
$object.foo:=New object
$object.foo.foo1:="foo1"
$object.foo.foo2:="foo2"
$object.bar.bar1:="bar1"
$object.bar.bar2:="bar2"

i.e. I forget "$object.bar:=New object" then the code will silently fail. Can 
somebody tell me why the interpreter does not raise an error in this situation? 
This was tested with 17.1 and 17.2 on Mac and the behaviour was the same (i.e. 
silent code failure) in both versions.

In the docs for C_OBJECT:
https://doc.4d.com/4Dv17/4D/17.3/C-OBJECT.301-4621707.en.html
it states:
"Important: The C_OBJECT command does not create an object named variable. If 
you want to access the properties of the object itself using object notation, 
you must first initialize it using the New object command, otherwise a syntax 
error is returned (see example)."

That doesn't seem to be the case - no syntax error is raised and the code also 
compiles?! Can somebody point out what I am missing here? Thanks.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: Picture Reduction / Conversion (2)

2019-09-20 Thread Narinder Chandi via 4D_Tech
David,

When you say that the "result is an empty picture", does the resulting picture 
have any bytes and/or dimensions, i.e. did you try checking it with Picture 
size and PICTURE PROPERTIES commands?

I wonder if the issue is with the parameters that you are passing to the  
CREATE THUMBNAIL command? But then again, I am sure you must have double and 
triple checked that...

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Friday, 20 September 2019 at 18:27
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: David Ringsmuth 
Subject: Picture Reduction / Conversion (2)

4D v17.4 234574
Windows 10 Home

Using Paint.net to open the PNG and save it as a JPG works fine.

The resulting JGP is perfect.

David Ringsmuth

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


**
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: More on 4D Objects and 'Inheritance'

2019-09-19 Thread Narinder Chandi via 4D_Tech
- Revolutionize your apps with object-oriented programming in 4D v17 — 
today!
- express4d: The better way to write web APIs in 4D

I’m wondering how many people would be interested in one or both of these 
courses.

Pricing:
1 course: $500
2 courses: $900

I would definitely be interested in both of these courses.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.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: More on 4D Objects and 'Inheritance'

2019-09-16 Thread Narinder Chandi via 4D_Tech
Indeed. This prompts to relay a quick anecdote - I worked on a 4D system 
originally developed by Aparajita more than 22 years ago for an investment 
bank. It used a plug-in that was probably little known at the time - 
ObjectTools. Aparajita's always been far, far ahead of the curve. That 4D 
codebase was, and still is, the cleanest and most maintainable 4D codebase I've 
ever had the opportunity to work on - apart from my own of course :D

Actually, Aparajita writes on his website, and I quote:
"I originally wrote ObjectTools in 1990. In 2013, 4D added C_OBJECT, which has 
most of the functionality of ObjectTools. It only took them 23 years to catch 
up, not bad! "

Hint... if Aparajita was to give some trainings at the next 4D Summit on the 
work he's done porting npm pacakges to 4D, well we could all learn a great deal 
from his experience and I would be over there like a shot! I've made a couple 
of half-hearted attempts to get to grips with JavaScript's power in the last 
few years but not seen them through. Looks like it's time to try again with a 
fresh mindset. If we didn't know it already, that JavaScript stuff is 
everywhere these days...

In the meantime, it would educate us a great deal if 4D was to provide some 
really good detailed examples of these new commands. Perhaps they exist already 
and I just didn't come across them yet...

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Monday, 16 September 2019 at 23:32
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Kirk Brooks 
Subject: Re: More on 4D Objects and 'Inheritance'

Well gee, what does Aparajita know about object oriented stuff? 樂

Nicely put.

On Mon, Sep 16, 2019 at 1:23 PM Aparajita Fishman via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> > Well my recommendation is not to use New formula ever.
>
> Translation: “I’m not sure I can use them properly, therefore no one
> should.”  
>
>
> > Even with properly
> > encapsulated code structured in a way that makes sense, it's still
> > impossible to get the context, source, or whether or not the method call
> > even exists in the object.
>
> Not my experience at all.
>
>
> > It's basically just a dangerous feature at this
> > point just waiting to explode when your ".get()" isn't the same ".get()"
> as
> > you were expecting.
>
> Not my experience at all.
>
>
> > 4D needs to add actual class structures for it to be
> > 1) Easy to document and lookup the source, or see the actual function
> > documentation like now when we mouseover a method call.
>
> True, but I have found the benefits far outweigh those minor
> inconveniences. Looking up the source is trivial if you use a good naming
> convention.
>
>
> > Right now there would be a lot of
> > overhead to design an object correctly so that New formula use doesn't
> > spiral out of control
>
> Not my experience at all. I ported https://github.com/expressjs/express <
> https://github.com/expressjs/express> to 4D.
>
>
> > , and even then, time consuming to maintain.
>
> Not my experience at all.
>
>
> > I tried applying it in another case
> > where there was no UI and a lot of processing in loops. It was slow.
>
> Not my experience at all. I see no measurable slowdown.
>
> - Aparajita
>
> **
> 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
**


**
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: Object property inheritance - why does this this not work ?

2019-09-15 Thread Narinder Chandi via 4D_Tech
I think our coding style will need to undergo an evolution rather than 
revolution. We all probably have legacy codebases to maintain where the 
existing code will mostly stay as-is, but newer code can be written using the 
new features. Over time developers will no doubt "modernise" existing code too, 
but that is usually driven by time and cost implications.

The new language features will certainly enhance our ability to write cleaner, 
leaner code and can happily co-exist with existing 4D code. I am only just 
starting to explore the new features in a couple of personal projects where I 
have the luxury of starting with clean structures. For any developer that may 
have used Object Tools or the native OB commands in 4D or other OOP-like 
languages (I have coded a lot of PHP in various frameworks) embracing the new 
features should be a breeze.

ORDA looks really interesting too but I haven't played with it yet, but I'm 
looking forward to experimenting with it soon. I also need to play with the new 
Form command. New formula (that you mentioned) has arrived with 17 R3. So, lots 
of new toys for sure!

File management with Path to object and Object to path are really great 
commands to finally have. For me it's immediately simplified the amount of code 
I often had to write to access the file system now that you can work with an 
object.

Of course, what we still need is the ability to create OOP-like Classes in 4D 
with the associated capabilities like member variables and methods, object 
instantiation (may be even class reflection), etc. Perhaps with v18 or v19. Oh 
yes, and really we do need a much improved Method Editor :P

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Sunday, 15 September 2019 at 12:08
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Peter Jakobsson 
Subject: Re: Object property inheritance - why does this this not work ?

Thanks Narinder.

Doesn’t this imply we need to change our entire style and approach to 
coding ? Language data structures, forms, the lot ?

Have you found you needed to do this ? (At least in terms of new code and 
optimal approaches).

Having attended the last couple of summits and various classes etc I’ve 
been aware of this looming in the background but the dot notation really is the 
breakthrough for me that warrants taking the leap across the “discontinuity 
gap” from old to new. It reminds me of working in Visual Basic years ago which 
used all this object oriented approach. 4D even lets you create a kind of 
“active object” now with “New Formula”.

Doesn’t this mean a complete revision of how we code form the ground up ? 
Finding new “best practice” approaches to absolutely everything ? (As we even 
have “collections” now so even the most fundamental aspect of 4D - current 
selections - is out of the window).

I might need to take a month off and read the whole manual again for the 
first time since 1988 !

Peter
    
> On 15 Sep 2019, at 12:52, Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
> 
> Yes, for legacy structures that are converted to v17 you have to 
explicitly enable Unicode support and also enable the "Use object notation..." 
setting under Compatibility
**
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: Object property inheritance - why does this this not work ?

2019-09-15 Thread Narinder Chandi via 4D_Tech
Peter,

Yes, for legacy structures that are converted to v17 you have to explicitly 
enable Unicode support and also enable the "Use object notation..." setting 
under Compatibility. This is assuming that your structure has a clean bill of 
health in the MSC in regards to not using the period ( . ) or square bracket ( 
[ ] ) characters in any 4D variables, tables names, etc.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Sunday, 15 September 2019 at 11:46
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Peter Jakobsson 
Subject: Re: Object property inheritance - why does this this not work ?

Hi Narinder

So it does. I created a brand new structure and it now works.

I did that example in a legacy upgraded structure so maybe there’s some 
compatibility setting that I needed to change to fully support the new object 
syntax.

Many thanks for taking the time to check it and respond !

Peter
    
> On 15 Sep 2019, at 12:41, Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
> 
> I just tested your code exactly as-is and all the variables have the 
expected values. I used 17.2 on Mac

**
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: Object property inheritance - why does this this not work ?

2019-09-15 Thread Narinder Chandi via 4D_Tech
Peter,

I just tested your code exactly as-is and all the variables have the expected 
values. I used 17.2 on Mac. What version/platform did you test on? I've sent 
you a screenshot directly.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Sunday, 15 September 2019 at 11:12
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Peter Jakobsson 
Subject: Object property inheritance - why does this this not work ?

Hi

Using the v17 dot notation I was unable to get one object to inherit 
another’s properties using the assignment operator. Also when I inspect $dog in 
the debugger after assigning the first property, it appears empty.

Code is:

C_OBJECT($animal;$dog;$cat)

$dog:=New object
$cat:=New object

$dog.sound:="bark"
$cat.sound:="meow"

$animal:=$dog
$getSound:=$animal.sound

Running this in the debugger, $dog and $cat return “{}”, yet hovering over 
$dog.sound with the cursor does display the property value. $animal.sound 
returns undefined.

Why does this not work ?

Regards

Peter

**
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: v15 - How to get an (form) object into a blob?

2019-09-09 Thread Narinder Chandi via 4D_Tech
Actually, you and Tom are onto something there. During my recent v15 to v17 
conversion MSC reported PICTS on some auto generated list forms which I then 
simply deleted. As Tom points out, they are easy to spot on the forms as they 
have the red X.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Tuesday, 10 September 2019 at 01:18
To: 
Cc: Chip Scheide <4d_o...@pghrepository.org>, 4D Tech Mailing List 
<4d_tech@lists.4d.com>
Subject: Re: v15 - How to get an (form) object into a blob?

I *think* that 4D's auto generated list form (and maybe entry form) may 
have PICTS as part of their creation
 for example the list form has 2 static pictures which form a backgrounders 
behind the fields and titles being displayed.

I will try the copy paste idea tomorrow - I can not get a 64 bit version of 
4D running on the OS I am on currently (at least I do not think so . v16 
doesn't run until OS X 10.11(?) (13?) either way we are not there yet

Chip


> Hi Chip,
> 
> I may not completely understand your question, but one way you can 
> tell if a static picture is still in PICT format is to open the form 
> in 64 bit. If it’s still in PICT you’ll see it substituted by a red X.
> 
> Tom Benedict
> 
>> On Sep 9, 2019, at 15:29, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I have passed an application to 4D inc to check it for 64 bot 
>> compatibility.
>> The report showed a number of PICTs, outside of the library.
>> 
>> I *think* I have found them, but.. I am not sure how I can check.
>> 
>> The objects are form objects (type 'Static Picture'), they are not 
>> variables.
>> How can I determine if a static picture is of type PICT?
>> 
>> I have code to test if a picture in a variable is of type PICT.
>> 
>> any ideas?
>> Thanks
>> Chip
>> 
> 
> 

Hell is other people 
 Jean-Paul Sartre
**
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: v15 - How to get an (form) object into a blob?

2019-09-09 Thread Narinder Chandi via 4D_Tech
Is it possible to Copy/Paste them from the form into the Picture Library? You 
could then use GET PICTURE FROM LIBRARY and GET PICTURE FORMATS commands to 
analyse the image:
https://doc.4d.com/4Dv17/4D/17.2/GET-PICTURE-FROM-LIBRARY.301-4387016.en.html
https://doc.4d.com/4Dv17/4D/17.2/GET-PICTURE-FORMATS.301-4387029.en.html

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
 
I am available for new consulting opportunities…
http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html
-- 

-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: Monday, 9 September 2019 at 23:29
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: v15 - How to get an (form) object into a blob?

I have passed an application to 4D inc to check it for 64 bot 
compatibility.
The report showed a number of PICTs, outside of the library.

I *think* I have found them, but.. I am not sure how I can check.

The objects are form objects (type 'Static Picture'), they are not 
variables.
How can I determine if a static picture is of type PICT?

I have code to test if a picture in a variable is of type PICT.

any ideas?
Thanks
Chip
---
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
**


**
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 authentication system that allow for stronger security.

2019-09-05 Thread Narinder Chandi via 4D_Tech
Eric,

Interesting question... 2FA you could roll your own on top of Twilio's APIs 
perhaps, or use an API driven service like Authy (which implements the Twilio 
piece for you) or AWS Cognito. I did a AWS Cognito integration last year 
building it as a PHP authentication microservice. Would make for a nice 
challenge as a 4D integration project...

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: Thursday, 5 September 2019 at 15:22
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Eric Naujock 
Subject: 4D authentication system that allow for stronger security.

Does anyone have a replacement login system for 4D that offers stronger 
authentication security than the current system. Since the current system does 
not enforce password changes, or password complexity it is a pretty poor system 
in the current age. While the encryption is crypt is is still brute force 
attackable as well. There are no failed login lockouts. Nor is three the 
ability to have two factor authentication? Or is this something beyond what 
anyone out there is using. 

---

MacCafe
7860 Central Ave.
Toledo, OH 43617
Phone: (419) 885-1240 X 241
Fax: (419) 517-2063
Eric Naujock  -  ACSA 10.2, 10.3, 10.4 Apple - ACTC 10.5, 10.6, 10.7, 10.8, 
10.9, 10.10, -ACSP 10.11, 10.12, 10.13
http://www.mac-cafe.com
email: e r...@mac-cafe.com 

AOL IM: erlic



**
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: 4D 2003 export structure

2019-09-04 Thread Narinder Chandi via 4D_Tech
Tony,

Are you able to open the structure with a later version of 4D? In v14 the 
EXPORT STRUCTURE command was introduced:
https://doc.4d.com/4Dv17/4D/17.2/EXPORT-STRUCTURE.301-4386049.en.html
which would get you the quickest representation of your structure, albeit in 
XML.

Otherwise it should only take a few minutes to crank out a custom method to 
produce an text output representation of your structure using the structure 
access commands:
https://doc.4d.com/4Dv17/4D/17.2/Structure-Access.201-4385958.en.html

Unfortunately I don't have such method to hand though.

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, 4 September 2019 at 13:04
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: "Wright, Tony" 
Subject: 4D 2003  export structure

Hi 

Does anyone have a method I can use to create a text file 
With information of each table and info about each attubute 

i.e.

Table name = patients 
Fields
Surname Alpha 30
Forename alpha 30
DOB = Date

Etc etc 

This DB was using 4D 2003 in its days 

Many thanks

Tony


*
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only. If you 
have received this message in error or there are any problems 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*

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

[ANN] 4D Developer Available

2019-09-04 Thread Narinder Chandi via 4D_Tech
Hi all. Having just finished a customer's v15 to v17 migration project I am now 
immediately available for other projects. I am open to opportunities regardless 
of whether your needs are short, medium or long term. If you need help with 
specific projects or want to offload one or more projects completely then I can 
help you with that too.

My 4D experience started with v3 on Mac and has encompassed all versions 
through to v11 and more recently v15 and v17. I have worked on 4D projects 
encompassing both Mac and Windows encompassing SMEs to large corporates. 
Projects have been delivered in a wide range of industries including investment 
banking, publishing, education, travel and media to name but a few.

I am comfortable working at all levels of a client's organisation - end-users, 
developers, project managers, marketing, CTOs, board level directors, etc.

I have worked with many mature codebases that have utilised a wide variety of 
programming techniques and can easily embrace any methodologies, follow 
designated coding practices and leverage application frameworks.

I also have extensive full-stack LAMP based web development experience and have 
worked with several PHP frameworks including in-house bespoke and mainstream 
ones such as Zend, Laravel and Symfony. I have also worked with several RDBMSes 
including MySQL, PostgreSQL and MS SQL Server.

I am based in the UK but in the digital age that is not a limiting factor. I 
can accommodate working across timezones where possible or provide 
cross-timezone coverage for you and/or your clients.

Please respond directly to me for a no-obligation discussion about your 
requirements. Thank you.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: Paypal IPN Integration

2019-09-03 Thread Narinder Chandi via 4D_Tech
As a starting point I would look at a setting up Docker support on your own 
server and download an official PHP container image from here:
https://hub.docker.com/_/php

Once configured (which often involves some pain unfortuantely!) then you can 
call the PHP container with your PHP file - there is an example on that web 
page above. This is a much simplified summary and there will some further 
details to work out. From my own experience I have previously architected a 
Docker microservices platform that integrated several discrete PHP containers 
each providing a discrete service (catalogue, payments, order processing, etc) 
with their own DB back-ends (MySQL or NoSQL such as MongoDB) and it worked well.

From 4D , and this is a bit theoretical on my part as I have no first hand 
implementation experience of it, but I would then call the container via 
command line as per Dani's suggestion.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Sam Burnell 
Date: Wednesday, 4 September 2019 at 01:25
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>, Dani Beaubien 

Subject: Paypal IPN Integration

Thank you for the response, Narinda.

Any suggestions on where I would find that binary, and also how I would 
then get a php file (with cURL functions) to execute from inside the listener 
(OWC) without using PHP Execute?

In other words, how to bypass using 4D’s php interpreter and use the one 
exterior to 4D?

Thanks again,

Sam



> On Sep 3, 2019, at 5:14 PM, Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
> 
> Sam,
> 
> I don't think Dani was suggesting that you build your own PHP interpreter 
(although it's not hard to compile it from source for custom needs). If I 
understood him correctly he was merely hinting at the option to download a 
prebuilt binary with cURL support baked in, for example.
> 
> 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, 4 September 2019 at 01:09
> To: Dani Beaubien 
> Cc: Sam Burnell , 4D Tech Mailing List 
<4d_tech@lists.4d.com>
> Subject: Re: Please post this!
> 
>Hi Dani,
> 
>Thanks for the response.
> 
>I don’t know nearly enough about php to be able to build my own 
interpreter. I think I’m going in a different direction than php.
> 
>Thank you again,
> 
>Sam
> 
>> On Sep 3, 2019, at 4:06 PM, Dani Beaubien 
 wrote:
>> 
>> Hi Sam, you don’t have to use 4D’s PHP. You can install your own version 
of the PHP interpreter and call that through the command line. I had to do that 
due to having a requirement of a specific version of PHP. Works quite well.
>> 
>> Dani Beaubien
>> Open Road Development
>> 
>> 
>>> On Aug 28, 2019, at 10:43 PM, Sam Burnell via 4D_Tech 
<4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> I am looking for a solution to taking paypal payments on our website 
(which is served by a 4D Server database), which utilizes paypal's Instant 
Payment Notification (IPN) system.
>>> 
>>> To clarify, our system is already set up to take paypal payments but we 
get no notification from paypal that a payment was made. The only way we know 
that we received a payment is when we see the payment in our paypal account. We 
then have to manually create the necessary database records for the 
transaction, based on the payment. 
>>> 
>>> So we need paypal to notify us when a successful payment is received by 
them so that we can automate the process (as we do with credit cards).
>>> 
>>> Here is what we want to do:
>>> 
>>> Upon receiving a payment for our product, paypal will send an IPN 
(containing transation data) to a url specified by us, where we have a listener 
set up (in OWC) to intercept that notification and execute a file which 
receives the data, returns it to paypal, and then receives either a VERIFIED or 
INVALID response from paypal. If VERIFIED, we use the transaction data to 
auto-generate the required records in our database.
>>> 
>>> The file I just mentioned can be written in php, js, coldfusion, perl, 
ruby, etc. Paypal provides examples for each language on github.
>>> 
>>> So, I 

Re: Please post this!

2019-09-03 Thread Narinder Chandi via 4D_Tech
Sam,

I don't think Dani was suggesting that you build your own PHP interpreter 
(although it's not hard to compile it from source for custom needs). If I 
understood him correctly he was merely hinting at the option to download a 
prebuilt binary with cURL support baked in, for example.

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, 4 September 2019 at 01:09
To: Dani Beaubien 
Cc: Sam Burnell , 4D Tech Mailing List 
<4d_tech@lists.4d.com>
Subject: Re: Please post this!

Hi Dani,

Thanks for the response.

I don’t know nearly enough about php to be able to build my own 
interpreter. I think I’m going in a different direction than php.

Thank you again,

Sam

> On Sep 3, 2019, at 4:06 PM, Dani Beaubien 
 wrote:
> 
> Hi Sam, you don’t have to use 4D’s PHP. You can install your own version 
of the PHP interpreter and call that through the command line. I had to do that 
due to having a requirement of a specific version of PHP. Works quite well.
> 
> Dani Beaubien
> Open Road Development
> 
> 
>> On Aug 28, 2019, at 10:43 PM, Sam Burnell via 4D_Tech 
<4d_tech@lists.4d.com > wrote:
>> 
>> Hi,
>> 
>> I am looking for a solution to taking paypal payments on our website 
(which is served by a 4D Server database), which utilizes paypal's Instant 
Payment Notification (IPN) system.
>> 
>> To clarify, our system is already set up to take paypal payments but we 
get no notification from paypal that a payment was made. The only way we know 
that we received a payment is when we see the payment in our paypal account. We 
then have to manually create the necessary database records for the 
transaction, based on the payment. 
>> 
>> So we need paypal to notify us when a successful payment is received by 
them so that we can automate the process (as we do with credit cards).
>> 
>> Here is what we want to do:
>> 
>> Upon receiving a payment for our product, paypal will send an IPN 
(containing transation data) to a url specified by us, where we have a listener 
set up (in OWC) to intercept that notification and execute a file which 
receives the data, returns it to paypal, and then receives either a VERIFIED or 
INVALID response from paypal. If VERIFIED, we use the transaction data to 
auto-generate the required records in our database.
>> 
>> The file I just mentioned can be written in php, js, coldfusion, perl, 
ruby, etc. Paypal provides examples for each language on github.
>> 
>> So, I tried for weeks to implement the php version, only to find out 
(through partner support) that 4D's php interpreter is not set up to handle 
cURL functions, which are part of the php code in paypal's php sample...
>> 
>> So now I'm trying to work with javascript and not having much success 
(although more than with php) and I thought I'd put some feelers out there... 
Seems to me as though there has to be a commercial 4D website/database (or 
two!) out there that sells products online and takes paypal payments using 
paypal's IPN. If that is the case, I'm willing to PAY for time, advice, code, 
etc., so PLEASE contact me if you think you can assist, and thanks in advance.
>> 
>> Sam
>> **
>> 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: Help Tips for list boxes?

2019-09-03 Thread Narinder Chandi via 4D_Tech
Pat,

Perhaps you can create custom help tips with SVG overlays? You could also try 
using AJUI_Tip or just take a look at it for some inspiration:
https://ch-fr.4d.com/ajuitip

It may be worth checking out the 4D KnowledgeBase or 4D Blog too for possible 
options?

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: Tuesday, 3 September 2019 at 15:21
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Pat Bensky 
Subject: Help Tips for list boxes?

There's no Help Tip option for list boxes ... Anybody know of a way to roll
your own? The On Mouse enter event works, so it could be managed in there.

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

Re: On Clicked event not firing for Combo Box

2019-09-03 Thread Narinder Chandi via 4D_Tech
Pat,

From memory, the Combo Box doesn't respond to the "On Clicked" event  (and 
never has done). It took me a while to find confirmation in the docs. But I 
finally found it:

"WARNING: Combo boxes are not considered to be clickable objects. A combo box 
must be treated as an enterable text area whose associated drop-down list 
provides default values. Consequently, you handle data entry within a combo box 
through the On Before Keystroke, On After Keystroke and On Data Change events."

It is here:
https://doc.4d.com/4Dv17/4D/17.2/Form-event.301-4386698.en.html

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: Tuesday, 3 September 2019 at 11:37
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Pat Bensky 
Subject: On Clicked event not firing for Combo Box

Using v17, Mac:
The On Clicked event doesn't work for a combo box ... other events such as
On Mouse enter  On Data Change, etc. work as expected, but On Clicked does
not. Any ideas why that would (not) happen?

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

Re: Folder equivalent for: "SET DOCUMENT PROPERTIES"

2019-09-03 Thread Narinder Chandi via 4D_Tech
Jörg,

IS this for Mac/Windows or both? You can use the LAUNCH EXTERNAL PROCESS 
command:
https://doc.4d.com/4Dv17/4D/17.2/LAUNCH-EXTERNAL-PROCESS.301-4386604.en.html

On Mac you could accomplish this using the "chflags" terminal command, I don't 
know what the Windows equivalent would be but a quick Google suggested the 
"cacls" command.

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: Tuesday, 3 September 2019 at 10:20
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Jörg Knebel 
Subject: Folder equivalent for: "SET DOCUMENT PROPERTIES"

Hi all,

I’m wondering if someone has already a solution that can be applied to 
folder in v17 (NO  R-release!!!)

The parameters “locked” and “invisible” are of special interest.

Thanks for any hints even a “RTFM” will be appreciated.


Regards
Jörg Knebel, M.Eng. - 4D Developer since 1991
TTT Data Systems Pty Ltd
Phone: +61 (0)2 6601 7453
www.tttdatasystems.com.au 
**
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: Check Orphan Forms Warnings in MSC

2019-09-01 Thread Narinder Chandi via 4D_Tech
Yah, success!! 

I overlooked that the orphans after the repair were located under _project_ 
forms not table forms!

Then, every time I tried to select one I got into some endless loop where 4D 
refused to let me select the form as it was damaged. Eventually I managed it by 
holding down the Enter key. Once the form was open I deleted all objects from 
each of the 2 offending forms and was able to trash the form. The structure now 
verifies 100%!!

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: Sunday, 1 September 2019 at 20:44
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: Check Orphan Forms Warnings in MSC

...and replying to my own previous message, now when I use "Find in Design" 
I get a dialog pop up twice with the message:

"One field was bad. It has been suppressed from your form."

Having this come up every time is going to be a PITA :(( Is there a way to 
fix this?

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: Sunday, 1 September 2019 at 20:34
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: Check Orphan Forms Warnings in MSC

Thanks Tim - I overlooked that!

So, repairing the structure eliminated the previous FO4D warnings but I 
now have 9 new ones under Check Project Forms:

___Orphan___31086.Page1.Picture1 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture2 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture3 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture4 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture5 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture6 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture7 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture8 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture9 uses a deprecated picture format: PICT.

Any ideas on how to find and/or remove these?

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: Sunday, 1 September 2019 at 20:13
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tim Nevels 
Subject: Re: Check Orphan Forms Warnings in MSC

On Sep 1, 2019, at 2:00 PM, Narinder Chandi  wrote:

> So, after a long, long hard slog migrating from v15 to v17, I 
have reduced the 6,000 MSC warnings down to the last 2.
> 
> Under "Check Orphan Forms" I am seeing:
> The form resource FO4D of id 31086 is not used anywhere
> The form resource FO4D of id 21169 is not used anywhere
> 
> How do I address these? I know probably I can just ignore them 
but it would be nice to have zero warnings! I have tried without success:
> * compacting the structure
> * delete the .4DIndy structure index file followed by compacting 
the structure
> 
> Any other suggestions gratefully received!


Did  you do a “repair” of the structure?  Not “compact”, but 
“repair”.

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.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

Re: Check Orphan Forms Warnings in MSC

2019-09-01 Thread Narinder Chandi via 4D_Tech
...and replying to my own previous message, now when I use "Find in Design" I 
get a dialog pop up twice with the message:

"One field was bad. It has been suppressed from your form."

Having this come up every time is going to be a PITA :(( Is there a way to fix 
this?

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: Sunday, 1 September 2019 at 20:34
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: Check Orphan Forms Warnings in MSC

Thanks Tim - I overlooked that!

So, repairing the structure eliminated the previous FO4D warnings but I now 
have 9 new ones under Check Project Forms:

___Orphan___31086.Page1.Picture1 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture2 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture3 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture4 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture5 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture6 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture7 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture8 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture9 uses a deprecated picture format: PICT.

Any ideas on how to find and/or remove these?

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: Sunday, 1 September 2019 at 20:13
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tim Nevels 
Subject: Re: Check Orphan Forms Warnings in MSC

On Sep 1, 2019, at 2:00 PM, Narinder Chandi  wrote:

> So, after a long, long hard slog migrating from v15 to v17, I have 
reduced the 6,000 MSC warnings down to the last 2.
> 
> Under "Check Orphan Forms" I am seeing:
> The form resource FO4D of id 31086 is not used anywhere
> The form resource FO4D of id 21169 is not used anywhere
> 
> How do I address these? I know probably I can just ignore them but it 
would be nice to have zero warnings! I have tried without success:
> * compacting the structure
> * delete the .4DIndy structure index file followed by compacting the 
structure
> 
> Any other suggestions gratefully received!


Did  you do a “repair” of the structure?  Not “compact”, but “repair”.

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.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
**


**
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: Check Orphan Forms Warnings in MSC

2019-09-01 Thread Narinder Chandi via 4D_Tech
Thanks Tim - I overlooked that!

So, repairing the structure eliminated the previous FO4D warnings but I now 
have 9 new ones under Check Project Forms:

___Orphan___31086.Page1.Picture1 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture2 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture3 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture4 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture5 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture6 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture7 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture8 uses a deprecated picture format: PICT.
___Orphan___31086.Page1.Picture9 uses a deprecated picture format: PICT.

Any ideas on how to find and/or remove these?

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: Sunday, 1 September 2019 at 20:13
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tim Nevels 
Subject: Re: Check Orphan Forms Warnings in MSC

On Sep 1, 2019, at 2:00 PM, Narinder Chandi  wrote:

> So, after a long, long hard slog migrating from v15 to v17, I have 
reduced the 6,000 MSC warnings down to the last 2.
> 
> Under "Check Orphan Forms" I am seeing:
> The form resource FO4D of id 31086 is not used anywhere
> The form resource FO4D of id 21169 is not used anywhere
> 
> How do I address these? I know probably I can just ignore them but it 
would be nice to have zero warnings! I have tried without success:
> * compacting the structure
> * delete the .4DIndy structure index file followed by compacting the 
structure
> 
> Any other suggestions gratefully received!


Did  you do a “repair” of the structure?  Not “compact”, but “repair”.

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.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
**

Check Orphan Forms Warnings in MSC

2019-09-01 Thread Narinder Chandi via 4D_Tech
So, after a long, long hard slog migrating from v15 to v17, I have reduced the 
6,000 MSC warnings down to the last 2.

Under "Check Orphan Forms" I am seeing:
The form resource FO4D of id 31086 is not used anywhere
The form resource FO4D of id 21169 is not used anywhere

How do I address these? I know probably I can just ignore them but it would be 
nice to have zero warnings! I have tried without success:
* compacting the structure
* delete the .4DIndy structure index file followed by compacting the structure

Any other suggestions gratefully received!

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: _ as first character in Method Name [was 64 bit...]

2019-08-24 Thread Narinder Chandi via 4D_Tech
I was checking the docs on this point a couple of days ago. Method names are 
still limited to 31 characters but variable length up to 255 characters 
_should_ be possible if the database is running in Unicode mode.

Why do I say _should_? Because in my current v17 conversion project (from v15) 
I am not able to go beyond the current 31 character limit, even though the 
database is running with Unicode support active. I have not investigated this 
limitation at any length as I have the bigger task of the conversion itself to 
deal with.

I also just quickly checked this in a clean v17 database that I am using for 
testing and the 31 character limit still exists there. At this point I would 
say that the v17 docs are wrong?!

It would be interesting to hear from anyone who can definitively confirm the we 
can go above the old 31 character limit though and/or whether there is some 
other magic setting to enable this support?

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: Saturday, 24 August 2019 at 17:39
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Jim Labos - infobase 
Subject: Re: _ as first character in Method Name [was 64 bit...]

I haven't started to look at v17. Are we still limited to 32 characters for
Method and Variable names?





-
Jim Labos - infobase
--
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: v13 or v15 Pic Library usage

2019-08-20 Thread Narinder Chandi via 4D_Tech
Using Global Find with the picture's name or ID?

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: Tuesday, 20 August 2019 at 17:58
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: v13 or v15 Pic Library usage

Is there a simple(?) way to determine where a specific library picture 
is used, across the entire database?

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


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

2019-08-19 Thread Narinder Chandi via 4D_Tech
Not that I know of however since v16 there has been the GET PICTURE FORMATS 
command:
https://doc.4d.com/4Dv17/4D/17.2/GET-PICTURE-FORMATS.301-4387029.en.html
but that doesn't directly help you for v13 or v15.

So, I thought about it some more and _maybe_ could use PICTURE CODEC LIST and 
CONVERT PICTURE:
https://doc.4d.com/4Dv17/4D/17.2/PICTURE-CODEC-LIST.301-4387018.en.html
https://doc.4d.com/4Dv17/4D/17.2/CONVERT-PICTURE.301-4387025.en.html

So my thinking is...
Take an example picture and apply each codec returned by PICTURE CODEC LIST to 
it in turn. For each converted picture compare it with the original - if it's 
the same then you have identified its codec.

This is only theoretical as the act of converting the picture when the original 
and new codecs are identical may actually change the underlying picture in some 
way anyway thus rendering this idea useless. Maybe worth a try though?

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: Monday, 19 August 2019 at 22:33
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: PICTs

In v13, or v15 is there a way to tell is a picture in the library is in 
PICT, or other format?

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


**
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: _ as first character in Method Name [was 64 bit...]

2019-08-19 Thread Narinder Chandi via 4D_Tech
>> and 4D then processes to list all method names, and forms (1) with a  space 
>> in their names

...and actually, by chance I was reading the v17.2 docs at the weekend which 
explicitly states:

"Tip: It is a good programming technique to adopt the same naming convention as 
the one used by 4D for built-in commands. Use uppercase characters for naming 
your methods; however if a method is a function, capitalize the first character 
of its name. By doing so, when you reopen a database for maintenance after a 
few months, you will already know if a method returns a result by simply 
looking at its name in the Explorer window."

That quote above was taken from here:
https://doc.4d.com/4Dv17/4D/17.2/Identifiers.300-4387242.en.html

Personally, I've never used spaces (or all uppercase for that matter) when 
naming any 4D object but spaces are allowable and actually encouraged according 
to that above?!

Maybe we could with some official clarification from 4D about this?

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: _ as first character in Method Name [was 64 bit...]

2019-08-19 Thread Narinder Chandi via 4D_Tech
We have used digits for years, e.g. 00MyMethod, 000MyMethod2, etc. I haven't 
checked yet if digit prefixes for methods are still valid in v17 though!

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: Monday, 19 August 2019 at 16:27
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Pat Bensky 
Subject: Re: _ as first character in Method Name [was 64 bit...]

Hi Chip,
Yes, we've been doing that for years also ... and sometimes a dot, which
also is not allowed any more.
We've changed them all to "aa..."

Pat

On Mon, 19 Aug 2019 at 16:24, Chip Scheide via 4D_Tech 
<4d_tech@lists.4d.com>
wrote:

> I use an underscore to start the name of methods which I want to
> 'float' to the top of the method list.
> I.E. _Conventions
>
> What allowed character(s) can I use instead?
>
> Thanks
> Chip
>
> On Sat, 17 Aug 2019 06:03:27 +, Keisuke Miyako via 4D_Tech wrote:
> > underscore prefixes are reserved for internal features,
> > for plugins in particular.
> >
> > in the past, they were used to auto-save 4D Write/View/Draw plugin 
areas.
> > I don't know if there are any other plugins that take advantage of
> > the implicit association,
> > but to avoid unintended consequences, it's better to avoid them if at
> > all possible.
> >
> > 2019/08/17 8:17、Chip Scheide via 4D_Tech
> > <4d_tech@lists.4d.com>のメール:
> > - methods which start with Underscore are not allowed?
> >
> >
> >
> > **
> > 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
> **



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

Re: Screen arrangement

2019-08-09 Thread Narinder Chandi via 4D_Tech
Chip,

You may be able to determine this information by combining the output of the 
Count screens and SCREEN COORDINATES commands:
https://doc.4d.com/4Dv17/4D/17.2/Count-screens.301-4387339.en.html
https://doc.4d.com/4Dv17/4D/17.2/SCREEN-COORDINATES.301-4387338.en.html

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: Friday, 9 August 2019 at 17:52
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: Screen arrangement

In a situation where there are 2 or more screens attached to a computer.
is there any way to determine the screen arrangement? (horizontal, 
vertical, grid)

In a 2 or more horizontal
which screen is main (left, right, other)

In a 2 or more vertical
which screen is main (Top, bottom other)

in a grid (4 or more) with at least 2 vertical and at least 2 
horizontal)
which screen in main?

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


**
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: My 4D Experience Blog

2019-08-08 Thread Narinder Chandi via 4D_Tech
Gabriel,

Thanks for your blog - great effort, keep up the good work!

I really like the look of the Cobalt2 theme for 4D that you replicated from Wes 
Bos so I downloaded it and I'm going to give that a test drive in my local v17 
4D Dev this afternoon!

I think for most devs writing tips about the new features in v17 would be of 
great benefit. Of course 4D Blog is writing quite a lot about this already but 
having an independent developer's own tips can be of much use to the 4D 
community too.

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: Thursday, 8 August 2019 at 14:32
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: GI - AJAR 
Subject: My 4D Experience Blog

Hi Everyone,

I would like to share with you my blog about my experience with this great 
development tool (for those who didn’t see it yet).

I write my ideas, and experiences I can have within my company AJAR SA as a 
consultant, first level support and 4D developer.

I wish to write more posts but it can be time consuming and time is always 
missing. I have a growing list of stuff I would like to write on it, mainly 
based on trying to explain how 4D work in deep. Let me know if you have any 
ideas on how to improve my blog.

As a small gift for the readers, I have put a small spoil of what coming 
next in the AJ Suite components. I’m sure it will be well appreciated in the 4D 
community.

Here is the link : https://www.my4dexperience.com 


Thanks for your attention.

Best Regards,

Gabriel Inzirillo
— 
4D Developer
AJAR S.A.
—
https://ch-fr.4d.com/ 
https://www.my4dexperience.com
twitter: ajar_info
Tél : +41 (0)32 3422684

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

Re: No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
Tim,

Hi. I had only seen mention of this new Project format in passing so I've just 
taken a moment to read both of those Blog posts. Certainly this an interesting 
new feature and sets 4D moving in the right direction for source control 
integration. I will have to find some time to play with this after my current 
v17 migration project is finished.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Timothy Penner 
Date: Friday, 2 August 2019 at 19:03
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: RE: No Object Auto-Completion for 4D Commands?

Hi Narrinder,

> it to needs to shake off the legacy of storing everything in its own 
proprietary internal format in the structure
...
> Hopefully things will improve but it will be a while I guess...

Did you see the blog posts regarding the new Project format and how this 
opens up new possibilities with Source control?
https://blog.4d.com/convert-an-existing-database-into-a-project/
https://blog.4d.com/4d-projects-embrace-the-new-era-of-collaboration/

-Tim



Timothy Penner
Senior Technical Services Engineer

4D Inc
95 S. Market Street, Suite #240
San Jose,CA 95113
United States

Telephone: +1-408-557-4600
Fax:   +1-408-271-5080
Email: tpen...@4d.com
Web:   www.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: No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
I think 4D is finally facing up to the reality that to move forwards in a 
meaningful way it to needs to shake off the legacy of storing everything in its 
own proprietary internal format in the structure - that is the single reason 
why we have been kept waiting for so long for proper integration with source 
code control systems. CVS and Subversion have been around for 20+ years whilst 
Git has been the de-facto choice for many years now.

4D's Method Editor quite frankly is and always has been a very, very basic 
editor. Hopefully things will improve but it will be a while I guess...

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: Friday, 2 August 2019 at 18:42
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Kirk Brooks 
Subject: Re: No Object Auto-Completion for 4D Commands?

Narinder,
This is a good point. Previously 4D has been sort of development
environment with its own editors and so forth.
But now we are starting to look for it to be more of an IDE. Especially
with the Projects option coming where the 4D part is all stored in text
files.

On Fri, Aug 2, 2019 at 10:37 AM Narinder Chandi via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Yup, that is _exactly_ the behaviour I would expect from an IDE.
> Obviously, 4D's Method Editor isn't there yet...
>

-- 
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 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: No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
Urghhh!

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: Friday, 2 August 2019 at 18:24
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Jeffrey Kain 
Subject: Re: No Object Auto-Completion for 4D Commands?

And if you misspell a property (or get the case wrong), it will suggest 
that to you forever as well.  So don't make a mistake... ever! :)

> On Aug 2, 2019, at 1:10 PM, Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
> 
> This current behaviour as is means that there is a great chance of mixing 
properties from multiple different objects within a given Method that can and 
will result in unexpected coding errors. I guess for now it's simply a case of 
"programmer beware"!
> 
> Having used other IDEs, in particular those from JetBrains, 4D still has 
a ways to go to provide the "expected" behaviours for proper OOP style object 
property auto-completion. Maybe in the future...

**
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: No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
Chip,

Yup, that is _exactly_ the behaviour I would expect from an IDE. Obviously, 
4D's Method Editor isn't there yet...

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Chip Scheide <4d_o...@pghrepository.org>
Date: Friday, 2 August 2019 at 18:14
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: No Object Auto-Completion for 4D Commands?

Narinder,
are you asking 4D to 'look inside' of the object for properties, then 
allow those to be used in auto complete?

On Fri, 02 Aug 2019 18:10:09 +0100, Narinder Chandi via 4D_Tech wrote:
> 
> Having used other IDEs, in particular those from JetBrains, 4D still 
> has a ways to go to provide the "expected" behaviours for proper OOP 
> style object property auto-completion. Maybe in the future...
---
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: No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
Ah, ok that was what I had assumed but it didn't seem or feel right or 
intuitive.

This current behaviour as is means that there is a great chance of mixing 
properties from multiple different objects within a given Method that can and 
will result in unexpected coding errors. I guess for now it's simply a case of 
"programmer beware"!

Having used other IDEs, in particular those from JetBrains, 4D still has a ways 
to go to provide the "expected" behaviours for proper OOP style object property 
auto-completion. Maybe in the future...

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Timothy Penner 
Date: Friday, 2 August 2019 at 18:03
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: RE: No Object Auto-Completion for 4D Commands?

Hi Narrinder,

"Each time you open a method, or edit some code, the method editor collects 
the attributes used in your code and proposes them in the list of suggestions."

What this means is that it parses the typed code and collects the 
properties that are written in the code. If you haven’t typed the property into 
the method editor yet then the method editor won't suggest it, regardless of 
where the property came from.

-Tim



-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Narinder Chandi 
via 4D_Tech
Sent: Friday, August 02, 2019 9:57 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: No Object Auto-Completion for 4D Commands?

Tim,

Thanks, but I actually have that article open in a browser window and had 
referred to it prior to posting. It didn't answer my specific question that I 
posted about with regards to auto-complete for 4D commands that return objects. 
Can you or anybody else advise on that specific point? Thanks.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Timothy Penner 
Date: Friday, 2 August 2019 at 17:51
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: RE: No Object Auto-Completion for 4D Commands?

Hello,

> What gives? Tell me I made a basic mistake somewhere?!

Here is the blog post regarding the feature:
https://blog.4d.com/autocomplete-function-expanded-to-object-attributes

TL/DR - Each time you open a method, or edit some code, the method 
editor collects the attributes used in your code and proposes them in the list 
of suggestions.

-Tim







Timothy Penner
Senior Technical Services Engineer

4D Inc
95 S. Market Street, Suite #240
San Jose,CA 95113
United States

Telephone: +1-408-557-4600
Fax:   +1-408-271-5080
Email: tpen...@4d.com
Web:   www.4d.com

-Original Message-
    From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Narinder 
Chandi via 4D_Tech
Sent: Friday, August 02, 2019 9:42 AM
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: No Object Auto-Completion for 4D Commands?

So, I'm in the final phase of a v15 to v17.2 upgrade and 
eliminating/replacing all the remaining _o_ prefixed obsolete 4D commands. I 
came across some Method Editor behaviour that I totally didn't expect... btw, 
this is my very first foray into using C_OBJECT and 4D commands that return 
objects!

Let me illustrate with the following very simple example:

C_OBJECT($object)

$object:=Path to object(Get 4D folder)

Now, when I type $object into the Method Editor, I expected the 
auto-completion to show me available object properties such as parentFolder, 
name and extension but it didn't. I then modified the code to:

$object:=New object
$object:=Path to object(Get 4D folder)

But that didn't yield anything more - I had assumed in the first 
example that the 4D command would implicitly initialise the object internally. 
So, I have a couple questions a this point:
* for 4D commands that return an object is object initialisation 
implicit or must "New object" always be called first?
* is it the case that there is actually no auto-completion for 4D 
Commands that return objects? That would be a real disappointment :((

Note that I also tested the above in a completely new 4D v17 database 
just in

Re: No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
Tim,

Thanks, but I actually have that article open in a browser window and had 
referred to it prior to posting. It didn't answer my specific question that I 
posted about with regards to auto-complete for 4D commands that return objects. 
Can you or anybody else advise on that specific point? Thanks.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Timothy Penner 
Date: Friday, 2 August 2019 at 17:51
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: RE: No Object Auto-Completion for 4D Commands?

Hello,

> What gives? Tell me I made a basic mistake somewhere?!

Here is the blog post regarding the feature:
https://blog.4d.com/autocomplete-function-expanded-to-object-attributes

TL/DR - Each time you open a method, or edit some code, the method editor 
collects the attributes used in your code and proposes them in the list of 
suggestions.

-Tim







Timothy Penner
Senior Technical Services Engineer

4D Inc
95 S. Market Street, Suite #240
San Jose,CA 95113
United States

Telephone: +1-408-557-4600
Fax:   +1-408-271-5080
Email: tpen...@4d.com
Web:   www.4d.com

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Narinder Chandi 
via 4D_Tech
Sent: Friday, August 02, 2019 9:42 AM
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: No Object Auto-Completion for 4D Commands?

So, I'm in the final phase of a v15 to v17.2 upgrade and 
eliminating/replacing all the remaining _o_ prefixed obsolete 4D commands. I 
came across some Method Editor behaviour that I totally didn't expect... btw, 
this is my very first foray into using C_OBJECT and 4D commands that return 
objects!

Let me illustrate with the following very simple example:

C_OBJECT($object)

$object:=Path to object(Get 4D folder)

Now, when I type $object into the Method Editor, I expected the 
auto-completion to show me available object properties such as parentFolder, 
name and extension but it didn't. I then modified the code to:

$object:=New object
$object:=Path to object(Get 4D folder)

But that didn't yield anything more - I had assumed in the first example 
that the 4D command would implicitly initialise the object internally. So, I 
have a couple questions a this point:
* for 4D commands that return an object is object initialisation implicit 
or must "New object" always be called first?
* is it the case that there is actually no auto-completion for 4D Commands 
that return objects? That would be a real disappointment :((

Note that I also tested the above in a completely new 4D v17 database just 
in case there was something up with a converted database. I also checked that 
the auto-complete settings in Preferences were setup correctly - they are 
identical in both the converted v17 and new v17 databases.

I also tested this example:

C_OBJECT($object1)
C_OBJECT($object2)

$object1:=New object
$object1:=Path to object(Get 4D folder)

$object2:=New object
$object2.foo:="foo"
$object2.bar:="bar"

In this case I get auto-completion of "object1.foo" as well as 
"object2.foo" which is really not what I would expect at all! It seems to me 
that the Method Editor is wholly indiscriminate about what the auto-completion 
options are!

What gives? Tell me I made a basic mistake somewhere?!

Regards,

Narinder Chandi,
ToolBox Systems Ltd.
--


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

No Object Auto-Completion for 4D Commands?

2019-08-02 Thread Narinder Chandi via 4D_Tech
So, I'm in the final phase of a v15 to v17.2 upgrade and eliminating/replacing 
all the remaining _o_ prefixed obsolete 4D commands. I came across some Method 
Editor behaviour that I totally didn't expect... btw, this is my very first 
foray into using C_OBJECT and 4D commands that return objects!

Let me illustrate with the following very simple example:

C_OBJECT($object)

$object:=Path to object(Get 4D folder)

Now, when I type $object into the Method Editor, I expected the auto-completion 
to show me available object properties such as parentFolder, name and extension 
but it didn't. I then modified the code to:

$object:=New object
$object:=Path to object(Get 4D folder)

But that didn't yield anything more - I had assumed in the first example that 
the 4D command would implicitly initialise the object internally. So, I have a 
couple questions a this point:
* for 4D commands that return an object is object initialisation implicit or 
must "New object" always be called first?
* is it the case that there is actually no auto-completion for 4D Commands that 
return objects? That would be a real disappointment :((

Note that I also tested the above in a completely new 4D v17 database just in 
case there was something up with a converted database. I also checked that the 
auto-complete settings in Preferences were setup correctly - they are identical 
in both the converted v17 and new v17 databases.

I also tested this example:

C_OBJECT($object1)
C_OBJECT($object2)

$object1:=New object
$object1:=Path to object(Get 4D folder)

$object2:=New object
$object2.foo:="foo"
$object2.bar:="bar"

In this case I get auto-completion of "object1.foo" as well as "object2.foo" 
which is really not what I would expect at all! It seems to me that the Method 
Editor is wholly indiscriminate about what the auto-completion options are!

What gives? Tell me I made a basic mistake somewhere?!

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 


**
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: SQL - renaming a field

2019-07-26 Thread Narinder Chandi via 4D_Tech
Yup.

Actually, many flavours of SQL support table renaming or table duplication with 
additional keywords on ALTER TABLE since, at least in SQL92 AFAIK it wasn't 
supported as part of the DDL.

For example, the last time I used MySQL with the Sequel Pro GUI tool, It has a 
table duplication menu option which gives you the option to rename a table and 
also copies the data for you. This menu option is possible is because in MySQL 
the ALTER TABLE command supports the LIKE keyword, thus allowing you to do 
something like:
CREATE TABLE newTable LIKE oldTable; 
INSERT newTable SELECT * FROM oldTable;

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>
Organization: The Aquila Group, Inc.
Reply-To: , 4D Tech Mailing List 
<4d_tech@lists.4d.com>
Date: Friday, 26 July 2019 at 19:56
To: 4D Tech Mailing List <4d_tech@lists.4d.com>, 'Tom Benedict' 

Cc: "Stephen J. Orth" 
Subject: RE: SQL - renaming a field

Chip,

That kind of sucks because doesn't a "drop" destroy data?

Steve

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Chip Scheide via 
4D_Tech
Sent: Friday, July 26, 2019 1:46 PM
To: Tom Benedict 
Cc: Chip Scheide <4d_o...@pghrepository.org>; 4D iNug Technical 
<4d_tech@lists.4d.com>
Subject: Re: SQL - renaming a field

OK

Thanks both

I guess rename is only possible as Drop + Add

Chip

**
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: SQL - renaming a field

2019-07-26 Thread Narinder Chandi via 4D_Tech
Chip,

My initial observations are:
* I think [ ] around the table name are not required (that's not part of the 
SQL standard)
* it would seem that 4D's implementation of Alter table doesn't support "rename"

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: Friday, 26 July 2019 at 19:30
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: SQL - renaming a field

I'm trying to use SQL to rename an existing field
$Sql:="Alter table ["+$Table_Name+"] Rename "+"Unused"+" to 
"+$Field_Name+";"

When executed I get a parsing error at 'Rename'.

can someone better versed either correct my above syntax, or point out 
a way to rename an existing field using SQL, -- preferably without 
dropping and then adding.

Thanks
Chip

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


**
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: What is wrong with this statement? Corrected

2019-07-09 Thread Narinder Chandi via 4D_Tech
True, but you must have wasted a chunk of time today figuring out wtf was going 
on!

Another day in the life of a programmer™

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Chip Scheide <4d_o...@pghrepository.org>
Date: Tuesday, 9 July 2019 at 20:23
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: What is wrong with this statement? Corrected

At least it is easy to work around...

On Tue, 09 Jul 2019 20:18:18 +0100, Narinder Chandi via 4D_Tech wrote:
> Well, that is quite odd given that is "just" an array after all but 
> internally it seems 4D is treating it is something a bit different?? 
> It seems like an interpreter bug to me...
> 
> Regards,
>  
> Narinder Chandi,
> ToolBox Systems Ltd.
> -- 
> 
> -Original Message-
> From: Chip Scheide <4d_o...@pghrepository.org>
> Date: Tuesday, 9 July 2019 at 20:01
> To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
> Subject: Re: What is wrong with this statement? Corrected
> 
> hmm v12...
> 
> OK - I tracked it down.
> 
> It has to do with Listboxes
> a 'normal' array works as expected, however, if the array is a 
listbox 
> column (array based - did not try a selection listbox) then the code 
> fails.
> 
> For some reason, when referencing the contents of a listbox column 
the 
> value inside the { } can not be an expression (at least in v13). Even 
a 
> simple expression {2+8-6} fails.
> 
> Chip
> 
> 
> 
> On Tue, 09 Jul 2019 19:32:05 +0100, Narinder Chandi via 4D_Tech wrote:
> > That was with 17.2 Mac and I also tested the same code just now 
with 
> > 15.4 Mac and 12.4 Mac successfully too.
> > 
> > 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: Tuesday, 9 July 2019 at 19:16
> > To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> > Cc: Chip Scheide <4d_o...@pghrepository.org>
> > Subject: Re: What is wrong with this statement? Corrected
> > 
> > what version - it might be that the issue is resolved in a 
newer 
> > version (>v13) then I am working in...
> > 
> > On Tue, 09 Jul 2019 18:30:33 +0100, Narinder Chandi via 
> 4D_Tech wrote:
> > > Chip,
> > > 
> > > If I interpreted it correctly, I just created this code 
> block based 
> > > on your spec. and variable naming:
> > > 
> > > ARRAY LONGINT(array1;2)
> > > array1{1}:=4
> > > array1{2}:=2
> > > 
> > > ARRAY LONGINT(array2;10)
> > > C_LONGINT($i)
> > > For ($i;1;10)
> > >   array2{$i}:=-$i
> > > End for
> > > 
> > > C_POINTER($Return_ptr)
> > > C_POINTER($Column1)
> > > $Return_ptr:=->array1
> > > $Column1:=->array2
> > > 
> > > C_LONGINT($Item)
> > > $Item:=2
> > > 
> > > C_LONGINT($Result)
> > > $Result:=$Column1->{$Return_ptr->{$Item}}
> > > TRACE
> > > 
> > > It doesn't generate an error for me and the debugger shows 
the 
> > > expected values when I execute it. Is my implementation 
> "incorrect"? 
> > > ...or there is it down to some other issue??
> > > 
> > > Regards,
> > > Narinder Chandi,
> > > ToolBox Systems Ltd.
> > > -- 
> > > 
> > > -Original Message-
> > > From: Chip Scheide <4d_o...@pghrepository.org>
>

Re: What is wrong with this statement? Corrected

2019-07-09 Thread Narinder Chandi via 4D_Tech
Well, that is quite odd given that is "just" an array after all but internally 
it seems 4D is treating it is something a bit different?? It seems like an 
interpreter bug to me...

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-Original Message-
From: Chip Scheide <4d_o...@pghrepository.org>
Date: Tuesday, 9 July 2019 at 20:01
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: What is wrong with this statement? Corrected

hmm v12...

OK - I tracked it down.

It has to do with Listboxes
a 'normal' array works as expected, however, if the array is a listbox 
column (array based - did not try a selection listbox) then the code 
fails.

For some reason, when referencing the contents of a listbox column the 
value inside the { } can not be an expression (at least in v13). Even a 
simple expression {2+8-6} fails.

Chip



On Tue, 09 Jul 2019 19:32:05 +0100, Narinder Chandi via 4D_Tech wrote:
> That was with 17.2 Mac and I also tested the same code just now with 
> 15.4 Mac and 12.4 Mac successfully too.
> 
> 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: Tuesday, 9 July 2019 at 19:16
> To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> Cc: Chip Scheide <4d_o...@pghrepository.org>
> Subject: Re: What is wrong with this statement? Corrected
> 
> what version - it might be that the issue is resolved in a newer 
>     version (>v13) then I am working in...
> 
> On Tue, 09 Jul 2019 18:30:33 +0100, Narinder Chandi via 4D_Tech wrote:
> > Chip,
> > 
> > If I interpreted it correctly, I just created this code block based 
> > on your spec. and variable naming:
> > 
> > ARRAY LONGINT(array1;2)
> > array1{1}:=4
> > array1{2}:=2
> > 
> > ARRAY LONGINT(array2;10)
> > C_LONGINT($i)
> > For ($i;1;10)
> >   array2{$i}:=-$i
> > End for
> > 
> > C_POINTER($Return_ptr)
> > C_POINTER($Column1)
> > $Return_ptr:=->array1
> > $Column1:=->array2
> > 
> > C_LONGINT($Item)
> > $Item:=2
> > 
> > C_LONGINT($Result)
> > $Result:=$Column1->{$Return_ptr->{$Item}}
> > TRACE
> > 
> > It doesn't generate an error for me and the debugger shows the 
> > expected values when I execute it. Is my implementation 
"incorrect"? 
> > ...or there is it down to some other issue??
> > 
> > Regards,
> > Narinder Chandi,
> > ToolBox Systems Ltd.
> > -- 
> > 
> > -Original Message-
> > From: Chip Scheide <4d_o...@pghrepository.org>
> > Date: Tuesday, 9 July 2019 at 17:57
> > To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> > Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
> > Subject: Re: What is wrong with this statement? Corrected
> > 
> > yes - an intermediate value works, I was more wondering why the 
> > original statement will not work...
> > as it appears to be a perfectly valid statement.
> > 
> > Replacing the array element reference with a simple math 
> formula works. 
> > i.e.
> > Array{2+8-6} 
> > give the value of element 4 (assuming there is one)
> > 
> > there should not be an issue with a valid formula inside set 
> > brackets
> > ohh well...
> > 
> > Chip
> > 
> > 
> > On Tue, 09 Jul 2019 17:32:10 +0100, Narinder Chandi via 
> 4D_Tech wrote:
> > > Does it work if you do use an intermediate value? e.g.
> > > 
> > > $value:= $Return_ptr-> {$Item}
> > > $Result:= $Column1 ->{$value}
> > > 
> > > Regards,
> > >  
> > &g

Re: What is wrong with this statement? Corrected

2019-07-09 Thread Narinder Chandi via 4D_Tech
That was with 17.2 Mac and I also tested the same code just now with 15.4 Mac 
and 12.4 Mac successfully too.

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: Tuesday, 9 July 2019 at 19:16
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: Re: What is wrong with this statement? Corrected

what version - it might be that the issue is resolved in a newer 
version (>v13) then I am working in...

On Tue, 09 Jul 2019 18:30:33 +0100, Narinder Chandi via 4D_Tech wrote:
> Chip,
> 
> If I interpreted it correctly, I just created this code block based 
> on your spec. and variable naming:
> 
> ARRAY LONGINT(array1;2)
> array1{1}:=4
> array1{2}:=2
> 
> ARRAY LONGINT(array2;10)
> C_LONGINT($i)
> For ($i;1;10)
>   array2{$i}:=-$i
> End for
> 
> C_POINTER($Return_ptr)
> C_POINTER($Column1)
> $Return_ptr:=->array1
> $Column1:=->array2
> 
> C_LONGINT($Item)
> $Item:=2
> 
> C_LONGINT($Result)
> $Result:=$Column1->{$Return_ptr->{$Item}}
> TRACE
> 
> It doesn't generate an error for me and the debugger shows the 
> expected values when I execute it. Is my implementation "incorrect"? 
> ...or there is it down to some other issue??
> 
> Regards,
> Narinder Chandi,
> ToolBox Systems Ltd.
> -- 
> 
> -Original Message-
> From: Chip Scheide <4d_o...@pghrepository.org>
> Date: Tuesday, 9 July 2019 at 17:57
> To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
> Subject: Re: What is wrong with this statement? Corrected
> 
> yes - an intermediate value works, I was more wondering why the 
> original statement will not work...
> as it appears to be a perfectly valid statement.
> 
> Replacing the array element reference with a simple math formula 
works. 
> i.e.
> Array{2+8-6} 
> give the value of element 4 (assuming there is one)
>     
    > there should not be an issue with a valid formula inside set 
> brackets
> ohh well...
> 
> Chip
> 
> 
> On Tue, 09 Jul 2019 17:32:10 +0100, Narinder Chandi via 4D_Tech wrote:
> > Does it work if you do use an intermediate value? e.g.
> > 
> > $value:= $Return_ptr-> {$Item}
> > $Result:= $Column1 ->{$value}
> > 
> > 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: Tuesday, 9 July 2019 at 17:16
> > To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> > Cc: Chip Scheide <4d_o...@pghrepository.org>
> > Subject: Re: What is wrong with this statement? Corrected
> > 
> > My bad -- the correct line of code that is failing is:
> > $Result:= $Column1 ->{ $Return_ptr-> {$Item} }
> > 
> > On Tue, 9 Jul 2019 12:14:37 -0400, Chip Scheide via 4D_Tech 
wrote:
> > > $Result:= $Column1{ $Return_ptr{$Item} }
> > ---
> > 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
> > 
> **
> > 
> > 
> > 
**
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Optio

Re: What is wrong with this statement? Corrected

2019-07-09 Thread Narinder Chandi via 4D_Tech
Does it work if you do use an intermediate value? e.g.

$value:= $Return_ptr-> {$Item}
$Result:= $Column1 ->{$value}

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: Tuesday, 9 July 2019 at 17:16
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chip Scheide <4d_o...@pghrepository.org>
Subject: Re: What is wrong with this statement? Corrected

My bad -- the correct line of code that is failing is:
$Result:= $Column1 ->{ $Return_ptr-> {$Item} }

On Tue, 9 Jul 2019 12:14:37 -0400, Chip Scheide via 4D_Tech wrote:
> $Result:= $Column1{ $Return_ptr{$Item} }
---
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
**


**
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: The set does not exist

2019-07-06 Thread Narinder Chandi via 4D_Tech
Replying to myself here(!) but I should also have mentioned a third thing to 
check:

* have you used the correct name in the $ListBoxName variable?
* what does $tableNum contain? It should be a valid table number
* check the contents of $highlightSet - it should be a non-empty string

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: Saturday, 6 July 2019 at 12:24
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: The set does not exist

Carl,

Hi. Couple of obvious things to check:
* have you used the correct name in the $ListBoxName variable?
* what does $tableNum contain? It should be a valid table number

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: Saturday, 6 July 2019 at 11:59
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Carl Aage Wangel 
Subject: The set does not exist

Using the following method, I get the error "The set does not exist".

$ListBoxName:="ListBoxObjectName"

LISTBOX GET TABLE
SOURCE(*;$ListBoxName;$tableNum;$namedSelection;$highlightSet)

USE SET($highlightSet)

I select records (rows) from the listbox before running the method.

I obviously have a lack of knowledge. Can anyone guide me in the right
direction? Can't find anything in 4D Knowledge Base.

Regards

Carl

 

**
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: The set does not exist

2019-07-06 Thread Narinder Chandi via 4D_Tech
Carl,

Hi. Couple of obvious things to check:
* have you used the correct name in the $ListBoxName variable?
* what does $tableNum contain? It should be a valid table number

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: Saturday, 6 July 2019 at 11:59
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Carl Aage Wangel 
Subject: The set does not exist

Using the following method, I get the error "The set does not exist".

$ListBoxName:="ListBoxObjectName"

LISTBOX GET TABLE
SOURCE(*;$ListBoxName;$tableNum;$namedSelection;$highlightSet)

USE SET($highlightSet)

I select records (rows) from the listbox before running the method.

I obviously have a lack of knowledge. Can anyone guide me in the right
direction? Can't find anything in 4D Knowledge Base.

Regards

Carl

 

**
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: [off]Apple script issue

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

Been a long, long time since I write any AppleScript and I don't know what the 
dictionary for Preview supports but did you try passing  "properties {...}" to 
" without print dialog" - logically it doesn't make sense, but it might crazily 
work?!

Another (more hacky) option could be try and post system event keystrokes to 
close the print dialog after "with print dialog"?

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, 3 July 2019 at 18:53
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Chuck Miller 
Subject: [off]Apple script issue

Hi All

I have the following apple script created and run via launch external 
process
tell application "Preview"
print file "SnapServer:Test_Invoices:Checon_Invoices:2019:04 - 
April:224747_04_12.PDF" with print dialog
print file "SnapServer:Test_Invoices:Checon_Invoices:2019:04 - 
April:224841_04_23.PDF" with print dialog
print file "SnapServer:Test_Invoices:Checon_Invoices:2019:04 - 
April:224840_04_23.PDF" with print dialog
end tell

When I print using this everything prints as it should

When I use the following script

tell application "Preview"
print file "SnapServer:Test_Invoices:Checon_Invoices:2019:04 - 
April:224747_04_12.PDF" without print dialog
print file "SnapServer:Test_Invoices:Checon_Invoices:2019:04 - 
April:224841_04_23.PDF" without print dialog
print file "SnapServer:Test_Invoices:Checon_Invoices:2019:04 - 
April:224840_04_23.PDF" without print dialog
end tell



The top and bottom of the PDF is not printed
Doers anyone know what command to use to tell Preview to print at 100% to 
why the difference

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

Re: OUT OF RANGE

2019-07-03 Thread Narinder Chandi via 4D_Tech
From memory, this error is usually triggered because a record you are trying to 
access doesn't exist. You need to look at the context in which you are trying 
to create the selection to figure this error out. Perhaps you are in a 
transaction?

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, 3 July 2019 at 16:05
To: 4D Tech Mailing List <4d_tech@lists.4d.com>, <4d_tech-requ...@lists.4d.com>
Cc: "stardata.info" 
Subject: OUT OF RANGE

Hi All,

I use 4D V13 on windows in one client server application.

In the command CREATE SELECTION FROM ARRAY sometimes i have one error:

The cannot be used to build the selection

Record # is out of range during GOTO RECORD

The customer restart the application and this segnalation disappares.

Someone can explain the reason?

Now i trap the segnalation using ON ERR CALL but i need to understand 
the reasons.

Thanks

/Ferdinando/



**
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: 2-Way USB Communication

2019-06-24 Thread Narinder Chandi via 4D_Tech
David,

Hi. I believe your starting point will be the "Communication" section of the 
docs. For the latest v17.3 this is the link:
https://doc.4d.com/4Dv17/4D/17.2/Communications.201-4385988.en.html

HTH.

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: Monday, 24 June 2019 at 23:52
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: David Loeppky 
Subject: 2-Way USB Communication

I am wanting to do 2-way communication with a USB device directly from
within 4D.  I need to send command codes to the device and then receive
data back from the device.

Does anyone have experience with this?  Ideally, some help in finding some
technical documentation on how to do this would be ideal.

Thank you,

-- 

Regards,

David Loeppky



**
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: Import mysql dump into 4D v15, build database structure & import data

2019-06-22 Thread Narinder Chandi via 4D_Tech
Michael,

Hi. Well, straight away I can see that the your CREATE TABLE command includes 
specific directives that only apply to MySQL, e.g.
  ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
so that will most likely be the reason why it is ignored. I think you need to 
adapt MySQL's CREATE TABLE command to be compatible with 4D's SQL syntax.

I searched the 4D Tech archive and found this that might help you:
http://4d.1045681.n5.nabble.com/Creating-SQL-Tables-td5716546.html

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: Saturday, 22 June 2019 at 16:10
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: jarosz 
Subject: Re: Import mysql dump into 4D v15, build database structure & import 
data

Hi Narinder

I have found that the SQL EXECUTE SCRIPT command will import records into a
pre-existing database structure. So

INSERT INTO `nmiep_action_logs` (`id`, `message_language_key`, `message`,
`log_date`, `extension`, `user_id`, `item_id`, `ip_address`) VALUES
(1, 'PLG_ACTIONLOG_JOOMLA_USER_LOGGED_IN',

'{\"action\":\"login\",\"userid\":\"707\",\"username\":\"admin\",\"accountlink\":\"index.php?option=com_users=user.edit=707\",\"app\":\"PLG_ACTIONLOG_JOOMLA_APPLICATION_ADMINISTRATOR\"}',
'2019-06-12 11:23:03', 'com_users', 707, 0, 'COM_ACTIONLOGS_DISABLED'),

will import 1 record into the nmiep_action_logs table with 8 fields.

However it will ignore this code in the sql dump/import file

CREATE TABLE `nmiep_action_logs` (
  `id` int(10) UNSIGNED NOT NULL,
  `message_language_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL
DEFAULT '',
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `log_date` datetime NOT NULL DEFAULT '-00-00 00:00:00',
  `extension` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `item_id` int(11) NOT NULL DEFAULT '0',
  `ip_address` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT
'0.0.0.0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Do I need to write a database structure creation routine to parse this?
Or has anyone written one already?
Or do newer versions of 4D interpret this and create the database table and
fields?

Thanks

Michael



**
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: Developing Using Selector Methods

2019-06-20 Thread Narinder Chandi via 4D_Tech
Douglas,

Thanks. Plenty of food for thought in your post too!

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 
 
Kirk has explained how the “form controller” approach works and it is
essentially the same as selector methods. In the past, I avoided that
approach, as I’ll touch on below, but have embraced it fully, starting with
V11.

IIRC, that approach to programming arose in the late 90’s. My impression at
the time was that it was part of the movement in the 4D community to try to
bring OO coding principles into 4D and I saw that as trying to bludgeon a
square peg into a round hole. It is unfortunate that 4D, to this day, is
not an OO language but I hold out hope. Another motivation for that
selector codes was that 4D method names were limited to 15 characters. That
was a significant impediment and I accepted that selector methods were a
way to get around that. My dislike for selector methods was that they
violated the “a method should have one clearly defined purpose” dictum and,
if you looked code quality using the McCabe score, the decision count was
sky high.

In practical terms, it was very hard to track down what routines were
calling what other routines because the “Find in design” feature in 4D was
glacially slow in those versions.Another issue I ran into was that code
was so intertwined that it could be very hard to decipher. I referred to
that approach as “loopy swoopy” and, actually had one incident where I was
called upon to fix a bug in a body of code that had been written by the
previous programmer and, after studying it for some hours, had to admit to
the client that I needed to rewrite the code because I could not figure out
how the code worked. That was a very painful experience (bruised ego!) and
it reinforced my position against using that approach.

With the release of V11, 4D’s Find in design feature was vastly improved,
fortunately so it became much easier to find where routines are used. By
2007, I had also been programmatically creating wrapper routines for Object
Tools objects for about a decade. That allowed me to move away from process
variables and debugging code was  vastly simplified - I could put a break
point in a setter or a getter, run the code, and the debugger would pop
open. With those improvements, I was able to now use the form controller
approach and I embraced it fully.

Kirk did a good presentation at the last Summit and I’d advise you to get a
copy of it from him. My approach differs somewhat from how Kirk handles
things. IIRC, Kirk’s code reacts to form events. I’ve taken a different
approach which completely avoids coupling. This code pattern, reacting to
the appropriate events, is used in each active object on the form;

C_LONGINT($formEvent_L)
$formEvent_L:=Form event

Case of
: ($formEvent_L=On Data Change)
PROC_FormEventValues_Assign (OBJ_GPBN ("$h_")->)
MARKUP_FC (OBJ_GPBN ("$h_")->)
End case


PROC_FormEventValues_Assign contains this code:

PROC_FocusObjectPtr_Set ($h_;OBJ_FocusPtr_Return )
PROC_FocusObjectName_Set ($h_;OBJ_FocusName_Return )

PROC_CurrentObjectPtr_Set ($h_;OBJ_CurrentPtr_Return )
PROC_CurrentObjectName_Set ($h_;OBJ_CurrentName_Return )

PROC_FormEvent_Set ($h_;Form event)

PROC_gTablePtr_Set ($h_;gTablePtr_Get )

PROC_CurrentFormPage_Set ($h_;FORM Get current page)

 PROC_CurrentFormTable_Set ($h_;Current form table)

 PROC_FunctionName_Set ($h_;”")

PROC_ObjectState_Set ($h_;”")

PROC_FormEventValues_Assign

The OBJ_methods are wrappers for the underlying 4D function and gTablePtr
is a tell that this is a Foundation-based system.
This code is using an Object Tools object but newer code uses a C_Object.


I use that code in every object method rather than the form method because
I ran into issues with how the tab control behaves under certain
conditions. My approach requires more code but it does give me absolute
control over form activity and, as I mentioned, helps decouple my _FC.


The object is the only parameter passed to the form controller and it uses
Case statement and code as shown in this (cleaned up) sample code:

C_LONGINT($h_;$1)
$h_:=$1


  //C_POINTER($currentObject_P)
  //$currentObject_P:=PROC_CurrentObjectPtr_Get ($h_)

C_TEXT($currentObjectName_T)
$currentObjectName_T:=PROC_CurrentObjectName_Get ($h_)

C_POINTER($focusObject_P)
$focusObject_P:=PROC_FocusObjectPtr_Get ($h_)

C_LONGINT($formEvent_L)
$formEvent_L:=PROC_FormEvent_Get ($h_)

Case of
: ($formEvent_L=On Activate)
  //NOP

: ($formEvent_L=On Deactivate)
  //NOP

: ($formEvent_L=On Mouse Enter)


Re: Dot Notation in Legacy 4D Code

2019-06-20 Thread Narinder Chandi via 4D_Tech
Thanks Douglas. Yes, the Find in design has been amazing since v11 (I think?), 
certainly I have used it a _lot_ in recent years in v15! The next best thing to 
4D Insider, but still not anywhere near as good ;)

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: Thursday, 20 June 2019 at 18:11
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Douglas von Roeder 
Subject: Re: Dot Notation in Legacy 4D Code

Narinder:

That’s correct - it you’re using dotted notation, you’ll have to clean up
the old code. The good news is features in newer versions make that much
easier. The Find in design feature is much faster and far more flexible.
Once you run a query and the results window opens, you can delete items
from the list if you wish, you can drag and drop the content into a method
window and then right click to open the methods (or Ctrl K), and you can
“Replace in content” from the popup menu on the gears icon in the lower
left.

--
Douglas von Roeder



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

Dot Notation in Legacy 4D Code

2019-06-20 Thread Narinder Chandi via 4D_Tech
S, I suspected this would be the case but just seeking confirmation...

I am working with a 4D database that has made extensive use of dot in table, 
variable and project names (not of my doing btw!), e.g.
[my.table.name]
my.process.variable
my.project.method

Converting the database to v17 and enabling the compatibility option "Use 
object notation to access object properties" the database still passes 
compilation. However, numerous interpreter errors occur when using any database 
functionality. I thinks it's clear that all prior dot usage will have to be 
totally eliminated?? Urg...

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: Developing Using Selector Methods

2019-06-20 Thread Narinder Chandi via 4D_Tech
Kirk,

Hi. Thanks for that lengthy response! You make a lot of useful points in 
regards to v17 for sure and in fact I have already been reading up and 
digesting the implications of the new ways of working in 4D, particularly Form 
and ORDA. And yes, it totally makes sense to re-think ones approach for future 
new 4D development.

Of course re-factoring legacy code is a rare opportunity with the vast majority 
of clients due to cost implications regardless of the benefits so lots of that 
code will stick around for years to come!

As ever, learning to wield the new features in 4D by experimenting is the order 
of the day.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

Hi Narinder,
I have some thoughts.

To start, with v17 the whole concept of what a form is in 4D is
fundamentally different. I'm talking about building new forms, here, not
tweaking existing ones. One important change is ditching process variables
as form elements. Just stop. Buttons, fields, variables, and so forth do
not need to be in process variables any longer. In fact using them becomes
a liability if you attempt to use the new DIALOG(*) command. And you should
be using this because unlike our previous best-practice of opening new
windows in new processes the thinking now is to have few, like 1, process
for displaying data and opening multiple windows as needed within that
process. I still see a lot of examples coming out of 4D, even 4D technical
support, that use this old approach. I think it's old hands still doing
what's worked and they are in a hurry. Process vars are just not a good
idea on new forms.

But what about the Current Selection and table locking and all? These are
not concerns with ORDA. And if you start opening multiple forms in the same
process and these forms use process vars for buttons or things the value of
all those buttons (but not the Form event) all change each time you change
one. So, ditch the process vars on forms. In fact with an ORDA database I
rarely have more than a handful of process vars at all. What I do always
have is a single object process var and I use this for any process level
data that needs to persist. I use this as my own process data-store instead
of dozens (hundreds) of distinct vars. A lot of code I look at shows an
almost superstitious view of variable handling in 4D that seems to suggest
there is a hierarchy of variable stability starting with IP vars (most
stable) down to local vars (most volatile). I do not believe that has any
basis beyond very old programming habits of 4D devs. But we can probably
have another discussion about that topic alone. ;-)

The other truly radical change in forms is Form.
https://doc.4d.com/4Dv17R5/4D/17-R5/Form.301-4128553.en.html
The significance of Form to the way you setup a 4D form can not be
overstated. And very little of your understanding of forms from pre v17
programming really applies. It will still work, of course, but using Form
and ORDA you can achieve results on a form that would require a lot of
coding to manage using 4D classic. Sometimes I sat back after getting
something to work and just marveled because the actions were so profound
and there was no code - only the setup of the form and the data it worked
with. The blog has some good examples. One I studied a lot is here:
https://blog.4d.com/multilevel-collection-in-different-listboxes/

But getting back to some specifics of your question, I have argued for a
long time about the value of using a 'form controller' method on forms. I
put all the code for the form into that project method and include that
single method in any form object and the form method. You can identify what
object invoked the method using OBJECT get name. It's basically one big
Case of statement with each object identified by name with whatever code
that object needs. And you can add other actions shared by objects on the
form.

I still use this on complicated forms but I've noticed much less need for
object level code with ORDA. Having a single method is also useful, pretty
much required, to take advantage of Dynamic Forms since the 'method'
property of a dynamic form only accepts a project method, you can't include
code. Dynamic Forms are quite useful. They can be applied to a subform
object or a form opened with DIALOG. Managing various complex listboxes,
for example, is a lot easier with dynamic forms than building them in code.
Faster too. For example, I can design my listboxes in a temporary form and
then use FORM Convert to dynamic to get the code for it, save it to a file
and then load it into a subform when needed. Switching between various
listboxes in the same subform becomes simple. And there is no data loading
because the data are already 

Developing Using Selector Methods

2019-06-20 Thread Narinder Chandi via 4D_Tech
I'm wondering, who out there is still actively developing using selector 
methods?

For a long time now (way back since v6, perhaps even before that...) I have 
tended to encapsulate all of my code into Project Methods such that Form and 
Object level methods consist of nothing more than a Case...End Case block of 
Form Events that then then call an appropriate Project Method. We all pretty 
much work at some time or another with legacy code that usually has no 
conventions whatsoever. Any new code I add to such a codebase will follow the 
selector method convention.

Do you still adhere to the selector method philosophy or have you moved onto an 
alternative 4D programming style? If so, can you describe it and why you have 
found it a better approach than selector methods? It's easy to stick with old 
ways and not adapt to better approaches so I'm interested to learn and explore 
better techniques within 4D.

One of the reasons I am asking this question is that many years ago there was 
the wonderful QuickCode Pro plugin written by Aparajita which sadly ceased 
working with 4D v6, I think. As I recall, prior to that Aparajita had 
privileged access to the 4D source code to enable QCP to work its magic but at 
some point that access was rescinded and QCP sadly reached EOL. QCP was perfect 
for navigating selector methods using the Case tool as this technique often 
results in large methods.

With 4D 2003, I started to write my own QCP toolbar replacement using native 
4D, at the time using the DynamicStructure plugin (that too has disappeared now 
I think) and some other tricks to read and parse method source code. With newer 
versions of 4D some new possibilities have opened up and I am considering 
re-visiting this project in theory without needing to rely on any external 
plugins. Does anybody already have something like this that that they have 
written for their own use? Would anybody be interested in such a 4D component?

Thanks for your thoughts and input.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: Window type -724 (more info)

2019-06-19 Thread Narinder Chandi via 4D_Tech
I may be mistaken but I have a feeling that these kind of "magic" window types 
(for want of a better description) are a relic of the ancient history of the 
Mac (we are talking as far back Mac OS OS 7 and 8) and there availability in 4D 
is an un-documented feature and therefore wholly unsupported.

I think it goes without saying that the only window types you should consider 
will work tomorrow as they do today are those as defined by the 4D window 
constants. 

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, 19 June 2019 at 20:08
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Keith Culotta 
Subject: Re: Window type -724 (more info)

Chip,

How did you find this window type?  I accidentally created a window in 4D 
v15 that has a thin vertical window title with small type on the left side: 
-1*(Palette window+Has zoom box).  However, in v17 the title looks the same but 
is on top.
Is there a list that is not in the Docs?

Thanks,

Keith - CDI

> On Jun 19, 2019, at 1:18 PM, Chip Scheide via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
> 
> Description of the window that is opened with -724
> - It has ONLY a close button
> - it is indeed a floating window
> - it is resizable
> - it has/accepts a window title
> - on switching away from 4D the window disappears, only to show up at 
> the same location when returning to 4D
> - the window title area appears narrower the a standard type 8 window
> Thanks again
> Chip
> 
> On Wed, 19 Jun 2019 14:13:56 -0400, Chip Scheide via 4D_Tech wrote:
>> How does this value come about?
>> I know the '-' makes it a floating window
>> but how is the value 724 generated?
>> 
>> Thanks
>> Chip



**
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: Filter MSC Log File?

2019-06-18 Thread Narinder Chandi via 4D_Tech
Maybe this is too obvious or difficult due to the sheer size of the logfile, 
but would it not be possibly to ingest the log file into a database for easy 
searching? You could maybe use 4D :P

Alternatively, how about feeding it into a log monitoring and analysis service 
such as Splunk, https://www.splunk.com or Loggly, https://www.loggly.com?

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: Tuesday, 18 June 2019 at 22:11
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Keith Goebel 
Subject: Re: Filter MSC Log File?


> On 19/06/2019, at 7:00 am, Tom Benedict wrote:
> Is there a way to filter the log file that is generated by MSC? I want to 
only see the warnings or errors and filter out the rest. The log is hundreds of 
pages and scrolling through it looking for warnings is tedious. 

Tom, I have encountered this also - it makes checking the MSC results a 
real pain.
Anyone know why 4D decided to do that?
Cheers, 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: Backup and journal file configurations

2019-06-18 Thread Narinder Chandi via 4D_Tech
Tom,

Yup, you're absolutely right. Without automated testing for larger systems the 
risk of shipping a breaking release must be significant. For an internal system 
that is bad enough - for those shipping vertical market products it must be the 
stuff of nightmares.

I have been trying to digest a lot of 4D articles over the last few and I'm 
sure did come across a passing reference to Quality Assurance Automation 
Services - time to dig deeper into the detail of that, thanks.

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: Tuesday, 18 June 2019 at 22:23
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Tom Benedict 
Subject: Re: Backup and journal file configurations

I am very interested in increasing the level of support for automated 
testing in 4D. The larger and more complex the code base, the greater the 
testing burden. It has been my experience that the lack of automated test tool 
support in 4D is a roadblock to code refactoring. The cost of manual regression 
testing can easily exceed the programming cost. At the recent 4D World Tour 
Will Taylor presented a short description of Quality Assurance Automation 
Services. It looks very interesting and very modern (finally!). Details at 
https://us.4d.com/quality-assurance-automation-services.

Tom Benedict


> On Jun 18, 2019, at 11:40, Jim Hays via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> Hi Narinder,
> 
> We aren't quite that advanced.  We've mostly built test suites that cover
> key functionality.
> For example:
> Run a bunch of reports to Excel xml, or text files.  Manually check them
> for accuracy, then lock the files.
> Nightly, run the same reports and run diffs on them.  If any differences,
> let us know.
> 
> Jim
    > 
    > 
> On Tue, Jun 18, 2019 at 12:14 PM Narinder Chandi via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Jim,
>> 
>> Hi. I'm curious:
>>>> ...in dev-build-test cycle. This is where we run automated, headless
>> builds and tests with multiple data files...
>> 
>> Are you able to describe this in more detail? I would quite like to learn
>> what kind of build/test can be implemented for 4D.
>> 
>> Having worked quite a lot with PHP frameworks, I have worked with test
>> driven development (TDD) and more recently behaviour driven development
>> (BDD). Have you been able implement anything like TDD in 4D or an
>> approximation? Anybody else care to comment on their experience with 
this?
>> Thanks.
>> 
>> Regards,
>> 
>> Narinder Chandi,
>> ToolBox Systems Ltd.
>> --
>> 
>> 
>> 
>> **
>> 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
**


**
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: Backup and journal file configurations

2019-06-18 Thread Narinder Chandi via 4D_Tech
Jim,

Hi. I'm curious:
>> ...in dev-build-test cycle. This is where we run automated, headless builds 
>> and tests with multiple data files...

Are you able to describe this in more detail? I would quite like to learn what 
kind of build/test can be implemented for 4D.

Having worked quite a lot with PHP frameworks, I have worked with test driven 
development (TDD) and more recently behaviour driven development (BDD). Have 
you been able implement anything like TDD in 4D or an approximation? Anybody 
else care to comment on their experience with this? Thanks.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: Problems with images on email create with WP Export Variable.

2019-06-17 Thread Narinder Chandi via 4D_Tech
Luc,

Only obvious thing I can think is did you check that the image embedded in the 
email is available on the client's server? After that maybe worth checking the 
raw source of the email to see what if anything is different in the content?

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: Monday, 17 June 2019 at 13:54
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Luc Devar 
Subject: Problems with images on email create with WP Export Variable.

I am sending email created in a 4D writes zone that contains images and 
text. 

I am using WP export Variable:

wpArea:=WP New([EMAIL_TEMPLATE]TEMPLATE_)
ST SET OPTIONS(wpArea;ST Expressions display mode;ST Values)
WP EXPORT VARIABLE(wpArea;$str;wk mime html)

This worked fine on my Mac ( OSX.13.6), it worked fine on my test server 
(Window Server 2012r2) but fail on my client’s server (Window Server 2012r2).
On the last server, the images are replaced by an interrogation mark ? The 
rest of the email is just fine. Any idea what is causing this ?


Bad email
https://www.dropbox.com/s/1nocpbmcye1tm00/Bad%20Test.png?dl=0 


Good email
https://www.dropbox.com/s/9amo91uukftg5ec/GoodOne.png?dl=0 



Luc Devar
**
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: Apple Notarizing (Where is 4D documentation on how to notarize a 4D merged app?)

2019-06-16 Thread Narinder Chandi via 4D_Tech
Pat,

Interesting link. Will that work for Jeremy as it looks like that documentation 
is in relation to notarizing software built using Xcode only?

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

Jeremy,
This should help:

https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution

PB



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

2019-06-15 Thread Narinder Chandi via 4D_Tech
Bob,

>>  I’ve just been handed a website to host with 4D. No big deal, I thought. 
>> Except it built with WordPress.
If it's a WordPress site then, unless I'm mistaken, you wouldn't actually host 
it with 4D right? Perhaps your wording is just not conveying the correct 
intention...

I have no experience with WordPress, and I’ll need to host it and have 4D 
interact with it (the usual - capture incoming queries, name and address data, 
etc.).
>> Ah ok, this makes more sense.

>> Is it possible? If so, where do I start?
WordPress has a REST API so I would look into that as that would be the 
integration point with 4D I think.

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: v15 to v17 Conversion of Obsolete _o_C_STRING/_o_ARRAY STRING Commands

2019-06-14 Thread Narinder Chandi via 4D_Tech
Jim,

Hi. In principle, nothing wrong with option 2 I'd say. I think the issue often 
with fixing as you go is that we all work with code that we haven't touched in 
months or even years so arguably these would never be fixed - 4D has flagged 
these as obsolete since v15 and I hadn't touched any of the instances so far!

In the end, after evaluating scope of usage and potential issues I went ahead 
and converted them all. Job done!

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: Friday, 14 June 2019 at 15:46
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Jim Crate 
Subject: Re: v15 to v17 Conversion of Obsolete _o_C_STRING/_o_ARRAY STRING 
Commands

On Jun 7, 2019, at 8:48 AM, Narinder Chandi via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
> 
> Hi all. I am migrating a v15 database to v17, 4D Server running on Mac. I 
need some opinions as to what to do with regards to converting commands marked 
as obsolete as per this article:
[snip]
> I have searched the archives on this topic but opinions seem to be 
divided on whether or not to do this conversion? Perhaps I am mistaken, but I 
am of the opinion that it will have to be done sooner or later as 4D reserves 
the right to remove obsoleted commands and will eventually do so?
> 
> TL;DR the options are:
> 1. Replace
> 2. Do nothing for v17

Is there anything wrong with option 2, and just fixing these as you update 
the code around them? The commands still work in v17, even subtables still seem 
to work. I may replace the subtable this time around just because it’s only 
used a couple places and it’s a convenient time to change the structure.

My personal approach with 4D is to wait until I have to touch working code, 
since perhaps by the time the commands don’t work there will be language 
enhancements that make me want to touch the code. 

Jim Crate

**
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: 4D v17 Mac Crashing on First Launch

2019-06-14 Thread Narinder Chandi via 4D_Tech
Keisuke,

Thanks for the input. So, couple of things on this...
1. I did install directly from the DMG downloaded from 4D
2. historically, I have always partitioned my drive so all of my apps sit on a 
partitioned volume - maybe that caused a problem for 4D 17, but every other 
version I have ever used is installed to the same location and I never 
encountered a problem
3. I did try to install to /Applications on a second attempt, but maybe a 
problem had already been caused by installing in a "non-standard" location?
4. I have installed hundreds of Apps onto my partitioned volume over the years 
and I don't recall any other app ever crashing on first launch because of its 
location

It would be useful to understand why the translocation is occurring?

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: Friday, 14 June 2019 at 07:01
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Keisuke Miyako 
Subject: Re: 4D v17 Mac Crashing on First Launch

4D (or any .app) must be installed by drag & drop from a signed .dmg, 
directly to a subfolder of /Applications,
or by using a signed .pkg.

if you .zip it yourself, or install elsewhere, the .app is translocated and 
you get all sorts of problems.

    > 2019/06/14 0:03、Narinder Chandi via 4D_Tech <4D_Tech@lists.4d.com>のメール:
>
> Path:  /private/var/folders/*/4D.app/Contents/MacOS/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
**


**
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 v17 Mac Crashing on First Launch

2019-06-13 Thread Narinder Chandi via 4D_Tech
So, I was trying to install 4D v17.1 on a 2016 MacBook Pro running OS X 10.13.6 
(High Sierra). The installer was a direct download from 4D.com. Any attempt to 
launch 4D resulted in a hard crash - the output from the Crash Report for 17.2 
is below.

I tried re-installing, re-booting, starting the Mac with Shift key down but 
none of these worked as a solution. I also tried the latest 17.2 released 
yesterday 13/06 and also 17 R4 but no luck. Eventually, after some Googling I 
tried this in the terminal :

> xattr -d com.apple.quarantine path/to/4D.app

and 4D now launches! So, it seems that the Mac's FileVault is unable to verify 
the app upon first run. Anyway experienced this or know what gives? Thanks.

Process:   4D [5053]
Path:  /private/var/folders/*/4D.app/Contents/MacOS/4D
Identifier:com.4d.4d
Version:   17.2 build 17.238379 (17.0.2)
Code Type: X86-64 (Native)
Parent Process:??? [1]
Responsible:   4D [5053]
User ID:   501

Date/Time: 2019-06-13 15:51:03.010 +0100
OS Version:Mac OS X 10.13.6 (17G7024)
Report Version:12
Bridge OS Version: 3.0 (14Y901)
Anonymous UUID:4ED4AFD8-EE83-0BE5-B395-516D9FA1CC69

Sleep/Wake UUID:   2C8D228F-7093-44C6-91EE-C685662CEB64

Time Awake Since Boot: 11000 seconds
Time Since Wake:   7700 seconds

System Integrity Protection: enabled

Notes: Translocated Process

Crashed Thread:0   (id = 775)  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:   KERN_INVALID_ADDRESS at 0x0018
Exception Note:EXC_CORPSE_NOTIFY

Termination Signal:Segmentation fault: 11
Termination Reason:Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x18:
--> 
__TEXT 00010b731000-00010c26a000 [ 11.2M] r-x/rwx 
SM=COW  /var/folders/*/4D.app/Contents/MacOS/4D

Thread 0 Crashed::  (id = 775)  Dispatch queue: com.apple.main-thread
0   com.4d.4d   0x00010b946da1 
MacStringToVString(unsigned char const*, int, xbox::VString&, 
VUniToMacConverter*) + 274
1   com.4d.4d   0x00010bbfa1fe 
V4DLocalizationManager::_LocalizeStrSharpCode(int, int, xbox::VString&) + 174
2   com.4d.4d   0x00010bdbf6ec 
V4DCoreApplication::RetainFolder(unsigned int) const + 94
3   com.4d.4d   0x00010bdbde4b 
V4DCoreApplication::_Init_ResourceChain() + 99
4   com.4d.4d   0x00010bdbd7c9 
V4DCoreApplication::Init(unsigned int) + 445
5   com.4d.4d   0x00010ba3fcab 
V4DApplication::Init(unsigned int) + 95
6   com.4d.4d   0x00010bbdf008 _main() + 40
7   libdyld.dylib   0x7fff59a97015 start + 1

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 


**
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: Import mysql dump into 4D v15, build database structure & import data

2019-06-13 Thread Narinder Chandi via 4D_Tech
Could you import the SQL script file using the SQL EXECUTE SCRIPT command?

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: Thursday, 13 June 2019 at 15:34
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: jarosz 
Subject: Import mysql dump into 4D v15, build database structure & import data

In 4D v15 there is an SQL EXPORT DATABASE command which exports the database
as an SQL dump file.

Is there an equivalent function to import an SQL dump file, create the
database structure in 4D, and import the data into it? ie the equivalent of
the import function in phpmyadmin?

Or does anybody have some code to do this which they'd be willing to share?

Michael Jarosz




--
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: Emojis in text

2019-06-13 Thread Narinder Chandi via 4D_Tech
Thanks Keisuke, that looks like an acceptable solution for James I hope. The 
only comment I have is whether:

$regex:="[:^ascii:]"

should actually be:

$regex:="[[:^ascii:]]"

Since although 4D is accepting the first version, when I tested this with 
https://regex101.com it complained that "A posix character class may only 
appear inside a character class" which is explained here, 
https://www.regular-expressions.info/posixbrackets.html

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: Thursday, 13 June 2019 at 01:41
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Keisuke Miyako 
Subject: Re: Emojis in text

according to

https://unicode.org/reports/tr51/#Property_Stability

an Emoji is

  \p{RI} \p{RI}
| \p{Emoji}
  ( \p{EMod}
| \x{FE0F} \x{20E3}?
| [\x{E0020}-\x{E007E}]+ \x{E007F} )?
  (\x{200D} \p{Emoji}
( \p{EMod}
  | \x{FE0F} \x{20E3}? )?)+

no kidding.

but the ICU in 4D does not support the [:Emoji:] or \p{Emoji} property.

---

that said, if you just want to filter non-ASCII, for example, it could be 
as simple as

$text:="I an unwell  cough cough"

$regex:="[:^ascii:]"

While (Match regex($regex;$text;1;$pos;$len))
$text:=Delete string($text;$pos;$len)
End while



**
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: Emojis in text

2019-06-12 Thread Narinder Chandi via 4D_Tech
James,

Hi. It's late here now but I will look into this tomorrow. In my experience 
Regex can be a bit of a black art at times but once you get the hang of it you 
come to see how useful and powerful it can be.

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, 12 June 2019 at 22:52
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: macjimbo 
Subject: Re: Emojis in text

Thanks for your help with this Narinder

I'm still struggling, mostly because I don't know how to use Regex properly.

None of the regex patterns I can find online for removing emojis seem to
work at all.

I would be quite happy just to restrict the text to alphanumeric and the
kind of special characters I would find on an English keyboard, as we're not
likely to receive feedback in other languages. 

Can anyone help me with

a) how to use a regex pattern either to omit emojis or only include
alpanumeric + english special characters. Essentially the ASCII character
set;

b) how to use regex to build a string which only includes the characters I
want.

I've downloaded the Regex plugin from Pluggers and think this code should
work - if I can find the right pattern:

ARRAY TEXT($textarray;0)
Preg Match All ($pattern;$original;$textarray)

$cleaned:=""
For ($i;1;Size of array($textarray)
$cleaned:=$cleaned +$textarray{$i}
end for

This seems more complicated than it should be, so would be grateful for any
help.

Thanks!

James




--
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: Emojis in text

2019-06-12 Thread Narinder Chandi via 4D_Tech
In fact thinking about the Regex solution some more, even if there is no Regex 
support using 4D commands you could pipe it through the built-in PHP 
interpreter as there is excellent Regex support in PHP.

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, 12 June 2019 at 12:46
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
Subject: Re: Emojis in text

James,

Hi. I encountered a similar problem a while back although the client 
sending the request to MySQL was PHP rather than 4D. My solution was to use 
Regex to replace the emoji characters. Try Googling for something like "remove 
emojis from string" and that should turn up some options you can try out in 4D 
- does 4D have Regex commands now? I didn't check!

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, 12 June 2019 at 11:59
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: James Knight 
Subject: Emojis in text

Hi

I’ve just integrated our system with a review website, importing review 
scores and comments to store in our database.

This is done via a JSON API.

The comments will often include emoticons and unfortunately these choke 
our MySQL implementation (MyConnect plugin) because (I think) it communicates 
using the utf8 charset, whilst MySQL requires utf8mb4 in order to store emojis. 
Attempting to execute a query containing those characters throws a MySQL error.

I’m quite happy to get rid of the emojis, but I cannot see a way of 
stripping these from the text. I’ve tried using ST Get Plain text and JSON 
Stringify, without any luck.

Does anyone know a way of stripping a text field so that it only 
contains regular (UTF8 compatible) characters?

Or does anyone know a way of sending them through MyConnect?

TIA

James
**
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: Emojis in text

2019-06-12 Thread Narinder Chandi via 4D_Tech
James,

Hi. I encountered a similar problem a while back although the client sending 
the request to MySQL was PHP rather than 4D. My solution was to use Regex to 
replace the emoji characters. Try Googling for something like "remove emojis 
from string" and that should turn up some options you can try out in 4D - does 
4D have Regex commands now? I didn't check!

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, 12 June 2019 at 11:59
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: James Knight 
Subject: Emojis in text

Hi

I’ve just integrated our system with a review website, importing review 
scores and comments to store in our database.

This is done via a JSON API.

The comments will often include emoticons and unfortunately these choke our 
MySQL implementation (MyConnect plugin) because (I think) it communicates using 
the utf8 charset, whilst MySQL requires utf8mb4 in order to store emojis. 
Attempting to execute a query containing those characters throws a MySQL error.

I’m quite happy to get rid of the emojis, but I cannot see a way of 
stripping these from the text. I’ve tried using ST Get Plain text and JSON 
Stringify, without any luck.

Does anyone know a way of stripping a text field so that it only contains 
regular (UTF8 compatible) characters?

Or does anyone know a way of sending them through MyConnect?

TIA

James
**
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: Conversion from v2003

2019-06-11 Thread Narinder Chandi via 4D_Tech
Luc,

I assume that this 4D database is running on Windows since DDE is a Windows 
technology, I think DDE is Dynamic Data Entry which is a way of communicating 
between Windows programs, I think it was quite commonly used to send/receive 
information from Excel and also other applications. I think OLE technology came 
later possibly as replacement. Not sure how this can be done via 4D v17 - 
perhaps Windows experts can offer suggestions?

The solution for replacing 4D Oracle is probably to use a 4D ODBC driver (I 
think there is one?) on Windows and then use the native 4D SQL commands. I did 
something like this on Windows many, many years ago but it was to replace the 
4D Sybase plugin.

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: Tuesday, 11 June 2019 at 20:52
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Luc Devar 
Subject: Conversion from v2003

I have a client that still uses an old v2003 DB.  They finally decided to 
upgrade to a more current version.  I am doing a quick analysis to assets the 
amount of work that needs to be done.  I can see the v2003 use old plugins that 
does not exist anymore. Most of them I can deal with but the plugins 4D for 
Oracle and DDE_Tools are the one that concerns me.

I think M. Miyako Keisuke has developed something that duplicates the old 
4D for Oracle plugins. Is it a plugin or a component ? I am not sure as I am 
starting to look into this.

I am not too familiar with DDE_Tools. I am wondering if someone can point 
me in a direction to help me have more information on that plugins and how to 
replace it in V17. Maybe there is something similar out there now. A new 
plugin, a component or tech note that would help me replace it and move to v17.

Luc Devar
**
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: Replacing Obsolete Subtable Commands in v15 to v17 Migration

2019-06-11 Thread Narinder Chandi via 4D_Tech
Chip,

from memory so...

One note:
- I believe existing (v15+) subtable support is one level deep only, I
do not know if this will/does affect you.
i.e [parent].substable_level1.subtable_level2... is not supported.
I'm not affected by this.

there is a special link between converted subtables and their parent.
this special linage is NOT replaceable once broken.
The special linkage allows the subtable commands to continue to
function.
Yes, I am aware of that, thanks.

(speaking about 1 subtable)
I believe that if you remove the special link, and replace the subtable
commands that use it with record level commands you are good to go.
Yes, it seems so, although this requires using the " Get subrecord key "command 
as illustrated in the example in the docs:
https://doc.4d.com/4Dv15/4D/15.6/Get-subrecord-key.301-3818017.en.html

There may be one major exception:
Reports using the subtable data.  It has been along time since I played
in this area, but again, as I recall any reports using the subtable
commands will need extensive work. As subtable records load in a much
different fashion to related tables.
I don't think I have any reporting issues to be concerned about but I'll bear 
that in mind, thanks.

Depending on the subtable structure definition(s) you may also
want/need to add a primary key for backup/journal purposes.
Yes, I mentioned that in my original post so I'm aware of that, thanks.

Regards,
Narinder Chandi,
ToolBox Systems Ltd.
-- 



**
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: Replacing Obsolete Subtable Commands in v15 to v17 Migration

2019-06-11 Thread Narinder Chandi via 4D_Tech
Thanks. Yes, there is good example in the docs for "Get subrecord key ":

https://doc.4d.com/4Dv15/4D/15.6/Get-subrecord-key.301-3818017.en.html

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: Tuesday, 11 June 2019 at 14:17
To: 4D Tech Mailing List <4d_tech@lists.4d.com>
Cc: Garri Ogata 
Subject: Re: Replacing Obsolete Subtable Commands in v15 to v17 Migration

You may also want to offer just try doing 2c and use the get subrecord key 
function in v15. Keeping the id field.


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

  1   2   >