Re: zipping files

2017-07-27 Thread Matthias Schmidt via 4D_Tech

> Am 28.07.2017 um 06:24 schrieb Jody Bevan via 4D_Tech <4d_tech@lists.4d.com>:
> 
> I have looked through the Knowledgebase, and past nug posts. I tried PHP to 
> do this but got no where (something obviously I am doing).
> I ended up (thus far) with miyako’s 4D plugin for zipping.
> 
> I go into his test db and try it out and it works perfectly. So now I want to 
> implement in our shell.
> 
> I place the plugin in the Plugin folder of our application and restart.
> 
> That is fine, and I now have a plugin that loads at startup and when I write 
> code the plugin command shows up as a plugin and the constants as well.
> 
> I run the code and it always fails!
> 
> So any ideas as to what I am doing wrong? Is this actually a component and 
> not ‘just’ a plug-in and I have to do more?
> 
I had a similar issue ;-)
It turns out there are 2 versions of the plugin.
The “younger version” is working only with 4d v15+ (or v14+ - I skipped v14 ;-)
As far as I remember Miyako San marked them clearly.
So far it work perfect for me.
one more thing, check if you have methods with the same name as the plugin 
commands, that won’t work ;-)

cheers
Matthias

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

Re: zipping files

2017-07-27 Thread Keisuke Miyako via 4D_Tech
what happens if you replace tokenised constants with their literal values?

> 2017/07/28 6:24、Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> のメール:
> That is fine, and I now have a plugin that loads at startup and when I write 
> code the plugin command shows up as a plugin and the constants as well.




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

Re: 4D Forums feature request - keep it the same

2017-07-27 Thread Keisuke Miyako via 4D_Tech
the forum is also where online services offered as part of the partner program 
are available,
such as downloads and discussions of nightly builds, beta/R versions and source 
code of 4D internal components / widgets.

you might have not noticed,
but forum accounts are already tied to partner program subscription or license 
(maintenance) activation accounts.
we just do it (and undo it) manually and/or annually.

> 2017/07/28 2:11、Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> のメール:
> why do i need to use a login credential which will likely have
> financial information behind it (partner/store) to access a purportedly
> open public forum?




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

Re: Cross platform JSON Problem

2017-07-27 Thread Keisuke Miyako via 4D_Tech
you are using an old version, which uses "float" for real, not "double"

https://github.com/miyako/4d-plugin-json





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

Cross platform JSON Problem

2017-07-27 Thread Clive Wilson via 4D_Tech
Hi,

I use Miyako¹s fantastic JSON Plugin in my 4D app.

4D version - v16r2
JSON.Bundle  - JSON version 1.0, Copyright 2016  Friday, March 18, 2016 at
4:36 PM

The JSON doc generated is used to upload data to an internet based
wholesale sales system.

I¹m having a problem with "JSON Append real"

JSON Append real 
($JSONStyle_pricing;"wholesale";[Style_Color_Master]Wholesale_Price_PL1)



Everything works fine on the Mac platform but does not on Windows.
On the Mac the generated JSON doc has all the information.
On Windows the prices are passed a 0 .

This worked fine when a v14 version of the app used the old Oauth plugin.

Any help will be appreciated.

Thanks  Clive Wilson


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

zipping files

2017-07-27 Thread Jody Bevan via 4D_Tech
I have looked through the Knowledgebase, and past nug posts. I tried PHP to do 
this but got no where (something obviously I am doing).
I ended up (thus far) with miyako’s 4D plugin for zipping.

I go into his test db and try it out and it works perfectly. So now I want to 
implement in our shell.

I place the plugin in the Plugin folder of our application and restart.

That is fine, and I now have a plugin that loads at startup and when I write 
code the plugin command shows up as a plugin and the constants as well.

I run the code and it always fails!

So any ideas as to what I am doing wrong? Is this actually a component and not 
‘just’ a plug-in and I have to do more?

Any help appreciated, as I continue to struggle with this.

Thanks

Jody Bevan
ARGUS Productions Inc.
Developer
Argus Productions Inc. 




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

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Jeffrey Kain via 4D_Tech
Update --

After clearing my cookies/website data in Safari for 4d.com and 4d.fr, I can 
access the forums without error.

Jeff

> On Jul 27, 2017, at 1:29 PM, Jeffrey Kain  wrote:
> 
> Hey Tim --
> 
>> forums.4d.com is the new way.
> 
> This also gives me the "too many redirects" error in Safari.
> 
>> Here is a direct link to login page referenced in the banner, please try 
>> using this to start the migration process:
>> https://account.4d.com/4DACTION/webAccount_Login?country=US&returnURL=http://forums.4d.com/MyHome/EN/
> 
> Same thing in Safari - after entering my store ID and password I get the 
> redirects error.
> 
> So, I tried forums.4d.com in Firefox and it worked and I was able to migrate 
> my account. I can use it normally in Firefox. After the migration, I still 
> get that redirects error in Safari even when navigating to forums.4d.com.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Jeffrey Kain via 4D_Tech
Hey Tim --

> forums.4d.com is the new way.

This also gives me the "too many redirects" error in Safari.

> Here is a direct link to login page referenced in the banner, please try 
> using this to start the migration process:
> https://account.4d.com/4DACTION/webAccount_Login?country=US&returnURL=http://forums.4d.com/MyHome/EN/

Same thing in Safari - after entering my store ID and password I get the 
redirects error.

So, I tried forums.4d.com in Firefox and it worked and I was able to migrate my 
account. I can use it normally in Firefox. After the migration, I still get 
that redirects error in Safari even when navigating to forums.4d.com.

HTH,

Jeff

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

RE: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Timothy Penner via 4D_Tech
Hi Jeff,

> Is there a new way to access forums.4d.fr?

forums.4d.com is the new way.

Forums.4d.fr should automatically redirect to forums.4d.com, but maybe that is 
the issue... can you try forums.4d.com instead of .fr ?

If the page loads then you should the following text at the top (unless you are 
already logged in with the global login system):


New! 4D forum is now using SSO, the same as other 4D websites (Taow, 
livedoc,..). A user authenticated through one of the 4D portals will then 
automatically be connected on forums.4D.com.

We strongly encourage existing forum users to use the "Sign in" link to start 
their account migration.

Please note that the previous forum authentication will only be available until 
September, 15th.

New forum users need to create a 4D account and use the “sign in” link on 
forums.4D.com


Here is a direct link to login page referenced in the banner, please try using 
this to start the migration process:
https://account.4d.com/4DACTION/webAccount_Login?country=US&returnURL=http://forums.4d.com/MyHome/EN/

What may help with the process is to -
1) sign out of both the forums and account.4d.com
2) while signed out, go to forums.4d.com and click the sign in link that takes 
you here: 
https://account.4d.com/4DACTION/webAccount_Login?country=US&returnURL=http://forums.4d.com/MyHome/EN/
3) Sign in with your normal 4D store account
4) you will redirected back to forums and be presented a migration page with 
the option of linking to an existing forums account
5) if you have an existing 4D forums account, type in the login credentials on 
the migration page to link the old forums account with the global login system

Kind Regards,

Tim PENNER



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

Re: 4D Forums feature request - keep it the same

2017-07-27 Thread Chip Scheide via 4D_Tech
link to post to up (or down) vote:
http://forums.4d.com/Post//19752777/1/


text of my post on the forum:
personally - I do NOT like the idea.

why do i need to use a login credential which will likely have 
financial information behind it (partner/store) to access a purportedly 
open public forum?

The forum's login is currently, and should stay, separate from the 
logins to other 4D resources.

To use as example a larger (more public) system. Online Games.
100s of million people use/play online games. Most of these 
games/companies have forums for discussion of bugs, feature requests 
etc. none of these game forums (that I have personally visited/used) 
use any part of  the game's login credentials - as login credentials 
for their forums. 

Why? to me it is simple - separation of financially backed logins from 
public forums.

IMHO - 4D should do the same, and continue to keep the forums (and 
other public resources) login credentials separate from more private 4D 
resources logins (partner login, 4D store etc).

---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Keith Culotta via 4D_Tech
In Safari: removed all "4D" website data (cookies).  After that the site came 
up and I was able to log in with the old saved username and password.  

I signed back out, went to the site, and clicked the "Sign In" button near the 
top right.  The next window was a migration window.  After the migration I'm 
auto-logged in with my partner credentials.

Keith - CDI

> On Jul 27, 2017, at 10:42 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I think I tried that yesterday, and then also ended up with redirect errors.
> 
> What URL did you use to get in for the migration?  I'm using forums.4d.fr
> 
> 
> 
> --
> Jeffrey Kain
> jeffrey.k...@gmail.com
> 
> 
> 
> 
>> On Jul 27, 2017, at 11:39 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I was just able to get in and 'migrate' my account by following a link to
>> an old post which took me in without trying to login. Then I read the
>> banner and took the suggestion to click the LogIn link which redirected me
>> to the Partner Login screen. After that I was redirected to a simple little
>> form that let me enter my old user name and password.
>> 
>> You might try with a browser you don't use often to avoid any auto-sign on
>> stuff that might be getting in the way.
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread David Adams via 4D_Tech
> Is there a new way to access forums.4d.fr? For the past few days I
haven't been able to reach this site --
> Safari displays an error saying too many redirects.

Are you on an iPad? That's what it's always done for me on an iPad...I
thought the Forums just weren't supported on the iPad for some reason.
Never asked.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Jeffrey Kain via 4D_Tech
I think I tried that yesterday, and then also ended up with redirect errors.

What URL did you use to get in for the migration?  I'm using forums.4d.fr



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




> On Jul 27, 2017, at 11:39 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I was just able to get in and 'migrate' my account by following a link to
> an old post which took me in without trying to login. Then I read the
> banner and took the suggestion to click the LogIn link which redirected me
> to the Partner Login screen. After that I was redirected to a simple little
> form that let me enter my old user name and password.
> 
> You might try with a browser you don't use often to avoid any auto-sign on
> stuff that might be getting in the way.

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

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Kirk Brooks via 4D_Tech
I was just able to get in and 'migrate' my account by following a link to
an old post which took me in without trying to login. Then I read the
banner and took the suggestion to click the LogIn link which redirected me
to the Partner Login screen. After that I was redirected to a simple little
form that let me enter my old user name and password.

You might try with a browser you don't use often to avoid any auto-sign on
stuff that might be getting in the way.

On Thu, Jul 27, 2017 at 8:30 AM, Stephen J. Orth via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> This appears to have broken today, as all I get is a 500 Internal error.
>
>
> -Original Message-
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Spencer
> Hinsdale via 4D_Tech
> Sent: Thursday, July 27, 2017 10:19 AM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: Spencer Hinsdale 
> Subject: Re: 4D Forums no longer accessible -- too many redirects
>
>
> they have implemented Single Sign On.  there was a banner that took me to
> partners sign-on, then a button to "migrate forums logon" or some such.
> sorry to be vague. :)
>
>
> > On Jul 27, 2017, at 8:17 AM, Jeffrey Kain via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Is there a new way to access forums.4d.fr? For the past few days I
> haven't been able to reach this site -- Safari displays an error saying too
> many redirects.
> >
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
Kirk Brooks
San Francisco, CA
===

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

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

RE: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Stephen J. Orth via 4D_Tech
This appears to have broken today, as all I get is a 500 Internal error.


-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Spencer 
Hinsdale via 4D_Tech
Sent: Thursday, July 27, 2017 10:19 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Spencer Hinsdale 
Subject: Re: 4D Forums no longer accessible -- too many redirects


they have implemented Single Sign On.  there was a banner that took me to 
partners sign-on, then a button to "migrate forums logon" or some such.  sorry 
to be vague. :)


> On Jul 27, 2017, at 8:17 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Is there a new way to access forums.4d.fr? For the past few days I haven't 
> been able to reach this site -- Safari displays an error saying too many 
> redirects.
> 

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

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Spencer Hinsdale via 4D_Tech

I guess I should have mentioned that it works fine for me, just the sign-on is 
new and improved

> On Jul 27, 2017, at 8:18 AM, Spencer Hinsdale  wrote:
> 
> 
> they have implemented Single Sign On.  there was a banner that took me to 
> partners sign-on, then a button to "migrate forums logon" or some such.  
> sorry to be vague. :)
> 
> 
>> On Jul 27, 2017, at 8:17 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com 
>> > wrote:
>> 
>> Is there a new way to access forums.4d.fr ? For the 
>> past few days I haven't been able to reach this site -- Safari displays an 
>> error saying too many redirects.
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html 
>> Archive:  http://lists.4d.com/archives.html 
>> 
>> Options: http://lists.4d.com/mailman/options/4d_tech 
>> 
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
>> 
>> **
> 

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

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Keith Culotta via 4D_Tech
Same here.  I tried from Partner Central, TOAW, and the usual link, and got too 
many redirects.

Keith - CDI

> On Jul 27, 2017, at 10:17 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Is there a new way to access forums.4d.fr? For the past few days I haven't 
> been able to reach this site -- Safari displays an error saying too many 
> redirects.
> 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Spencer Hinsdale via 4D_Tech

they have implemented Single Sign On.  there was a banner that took me to 
partners sign-on, then a button to "migrate forums logon" or some such.  sorry 
to be vague. :)


> On Jul 27, 2017, at 8:17 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Is there a new way to access forums.4d.fr? For the past few days I haven't 
> been able to reach this site -- Safari displays an error saying too many 
> redirects.
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

4D Forums no longer accessible -- too many redirects

2017-07-27 Thread Jeffrey Kain via 4D_Tech
Is there a new way to access forums.4d.fr? For the past few days I haven't been 
able to reach this site -- Safari displays an error saying too many redirects.


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

Re: 2dim json arrays with scalar values

2017-07-27 Thread Rob Laveaux via 4D_Tech

> On 27 Jul 2017, at 15:43, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> OK, found it. It is possible. (To be honest, I didn't expect anything else)
> 
> The only question is now, how do I combine the code developed using 4D's 
> object commands with the NTK JSON API?

Hi Lutz,

Unfortunately the 4D Plugin SDK provides no direct support for C_OBJECT.

The solution is quite simple:
Use JSON Stringify to serialise the object to a JSON string. You can then pass 
this string to the NTK JSON commands.
When you need to do the reverse, you ask NTK to create a JSON string for you, 
which you can then pass to JSON Parse to get a C_OBJECT back.

So it is quite easy to mix it with existing code.

HTH,

- Rob Laveaux


Pluggers Software
Scholekstersingel 48
2496 MP  Den Haag
The Netherlands

Email: rob.lave...@pluggers.nl 
Website: http://www.pluggers.nl 





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

Re: Serious 4D Internet commands issue in v15.4 with SMTP on Mac OS X

2017-07-27 Thread Paul Lovejoy via 4D_Tech
Hi Spencer,

No, none of the fields or variables involved have that property selected.

Paul

> Le 26 juil. 2017 à 14:41, Spencer Hinsdale via 4D_Tech <4d_tech@lists.4d.com> 
> a écrit :
> 
> 
> Hi Paul,
> 
> Look at forms being used for data entry to see if these text fields have the 
> Multi-style checkbox checked in Properties.
> 
> Here is a v14 picture:
> http://kb.4d.com/assetid=77175
> 
> And v15 feature:
> http://livedoc.4d.com/4D-Design-Reference-15.4/Properties-for-active-objects/Multi-style-Rich-text-area.300-3285451.en.html
> 
> 
> 
> 
>> On Jul 25, 2017, at 9:36 PM, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> It seems this does not do the trick in all instances.
>> 
>> It appears there may be a problem with the text in the fields. I exported to 
>> text and everything looks fine but some texts truncate with a “?” when the 
>> email is sent. I have re-typed some of the offending texts and they work 
>> fine. The strange thing is they are identical, character-to-character, to 
>> the texts that are truncating in the emails. Could it be something to do 
>> with a length byte or something else that 4D stores along with the text in 
>> the fields?
>> 
>> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

RE: 2dim json arrays with scalar values

2017-07-27 Thread Epperlein, Lutz (agendo) via 4D_Tech
> The result should be:
> { "values": [
> [ 4711 ]
> ] }
> 
> Is this possible too?

OK, found it. It is possible. (To be honest, I didn't expect anything else)

The only question is now, how do I combine the code developed using 4D's object 
commands with the NTK JSON API?
E.g., I have a C_OBJECT variable $c_object. 
Is this possible:
JSON Set Object ($ntkObject;"chart";$c_object)

I assume the other way, setting a NTK object to a 4D C_OBJECT isn't possible, 
is it?

Remains the third way, rewriting all the code to the NTK API ...

Regards
Lutz

P.S: OK, there is a fourth way, don't use 4D for this, but this leads to 
complete rewrite.


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

RE: 2dim json arrays with scalar values

2017-07-27 Thread Epperlein, Lutz (agendo) via 4D_Tech
Sounds good, how is it with the other way around?
Say, I have a 2dim longint array and would like to stringify it to json.

Pseudo code ( I don't know (yet) the API of the NTK plugin):


ARRAY LONGINT($values;1;1)
$values{1}{1}:=4711

JSON Set Array($object;”values”;$values)
$resultText:=JSON to Text($object)


The result should be:
{ "values": [
[ 4711 ]
] }

Is this possible too?

Thanks in advance
Lutz Epperlein


> -Original Message-
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Rob Laveaux
> via 4D_Tech
> Sent: Thursday, July 27, 2017 2:35 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: Rob Laveaux 
> Subject: Re: 2dim json arrays with scalar values
> 
> 
> > On 27 Jul 2017, at 14:09, Epperlein, Lutz (agendo) via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > Is there any way to get the wanted result?
> 
> 
> Hi Lutz,
> 
> Yes, there is. Use the JSON commands from NTK Plugin.
> 
> Here is some example code:
> 
> $object:=JSON Parse Text($json)
> If ($object#0)
>   $array1:=JSON Get Array($object;”values”)
>   $count1:=JSON Count Items($array1)
>   For($i;1;$count1)
>   $array2:=JSON Get Array($array1;String($i))
>   $count2:=JSON Count Items($array2)
>   For($j;1;$count2)
>   $value:=JSON Get Number($array2;String($j))
>   End for
>   End for
>   JSON Release($object)
> End if
> 
> HTH,
> 
> - Rob Laveaux
> 
> 
> Pluggers Software
> Scholekstersingel 48
> 2496 MP  Den Haag
> The Netherlands
> 
> Email: rob.lave...@pluggers.nl 
> Website: http://www.pluggers.nl 
> 
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 2dim json arrays with scalar values

2017-07-27 Thread Rob Laveaux via 4D_Tech

> On 27 Jul 2017, at 14:09, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Is there any way to get the wanted result? 


Hi Lutz,

Yes, there is. Use the JSON commands from NTK Plugin.

Here is some example code:

$object:=JSON Parse Text($json)
If ($object#0)
$array1:=JSON Get Array($object;”values”)
$count1:=JSON Count Items($array1)
For($i;1;$count1)
$array2:=JSON Get Array($array1;String($i))
$count2:=JSON Count Items($array2)
For($j;1;$count2)
$value:=JSON Get Number($array2;String($j))
End for
End for
JSON Release($object)
End if

HTH,

- Rob Laveaux


Pluggers Software
Scholekstersingel 48
2496 MP  Den Haag
The Netherlands

Email: rob.lave...@pluggers.nl 
Website: http://www.pluggers.nl 





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

2dim json arrays with scalar values

2017-07-27 Thread Epperlein, Lutz (agendo) via 4D_Tech
Hi,

Maybe it is related to the recent discussion pro and contra the quality of 4D's 
JSON implementation. I think I found a serious problem, a real limitation of 
4D's JSON.

4D's JSON resp. object implementation is able to handle arrays, so far, so 
good. But even the doc states that it doesn't work with 2dim arrays:
http://doc.4d.com/4Dv15/4D/15.4/OB-SET-ARRAY.301-3274736.en.html
> Note: It is not possible to use two-dimensional arrays.

Now we have got a requirement to fulfill a certain API to deliver exactly such 
arrays in a JSON structure. The result as JSON should be something like this:

{"values": [
  [0, 5606],
  [1, 5956],
  [2, 6228],
  [3, 6668]
]}

We have already a complex object structure where this values property is only a 
part of. Is there any way to get the wanted result? Or is 4D the wrong tool for 
this?

Regards
Lutz

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



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