Re: ArrayToJSON in LCServer ?
The mergJSON external is already included in LCServer - mergJSONEncode and mergJSONDecode work fine; it's just the convenience functions (arrayToJSON and JSONToArray) which are missing. They are very short, and can be found in the dictionary entries for those main functions, and then simply copied/pasted into your own script or library. -- Alex. On 25/11/2017 15:13, pink via use-livecode wrote: ArrayToJSON is from the mergJSON external... so in order for you to use it, you would need to be able to access the external through your server installation. I don't know if that is possible... My recommendation would be to use a library such as fastJSON. I use fastJSON with LC Server all the time without issue. - --- Greg (pink) Miller mad, pink and dangerous to code -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: "export snapshot" still NOT in 8.1.7
Could you explain in what way it doesn't work? Does it throw an execution error? I notice you don't specify a full path or set the defaultFolder- perhaps it is getting exported somewhere odd. (Works with macOS 10.12.6, 8.2.0 DP 2 Community) On Sun, Nov 26, 2017 at 6:23 PM Richmond Mathewson via use-livecode < use-livecode@lists.runrev.com> wrote: > Please can everyone help: > > http://forums.livecode.com/viewtopic.php?f=6=30220 > > Richmond. > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: "export snapshot" still NOT in 8.1.7
Please can everyone help: http://forums.livecode.com/viewtopic.php?f=6=30220 Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: RESTful PUT error
I’ve been working on a library connecting LiveCode with MS Dynamics365 CRM via some APIs custom made for us in c#. LiveCode makes its calls to the API by REST. At first I was using Put url to send some simple calls but started getting errors in some. I was advised to switch over to using Post instead of Put (which acts more like Get anyway). So I’d just use Post empty to url when no parameters were needed. Errors all gone. So my advice to you is use only Get and Post. tRequestURL1 = https://api.pipedrive.com/v1/persons?api_token=ef2c59a67144d185277fee92aa9ede877c6c10ff tRequestURL2 = https://api.pipedrive.com/v1/persons/2?api_token=ef2c59a67144d185277fee92aa9ede877c6c10ff tJSONtoUpload = {"phone":"555-555-"} Post empty to url(tRequestURL1) Put it into tResponse1 Post tJSONtoUpload to url(tRequestURL2) Put it into tResponse2 Sean Cole Pi Digital > On 26 Nov 2017, at 16:07, Roger Eller via use-livecode >wrote: > > If I remember correctly, PUT was never implemented in LibUrl. I have only > needed GET and POST in my rather limited uses. > > ~Roger > > > On Nov 26, 2017 10:37 AM, "Andrew Bell via use-livecode" < > use-livecode@lists.runrev.com> wrote: > > I'm working on connecting to a 3rd-party API (Pipedrive) to a LiveCode app > I've done and seem to have a problem; any assistance would be appreciated. > Dummy (sandbox) account information has been included with my code sample. > > I've never used RESTful before, but the API seems pretty well documented > and I've had success much faster than anticipated working with the data in > LiveCode. It looks like commands are broke down into 3 types: GET (to > retrieve data), POST (to create new data), and PUT (to update existing > data). > > I can retrieve data using "put URL tRequestURL1 into tJSONfromPipedrive" > I can create new data using "post tJSONtoUpload to url tRequestURL2" > But when I try to update data using "put tJSONtoUpload into url > tRequestURL2" I get a 400 error from the server. I tried to > urlEncode(tJSONtoUpload) but got the same error. > > Their API includes a sandbox for testing, and my code seems to align with > their examples and helped me get my tests in order. I'm just not sure > what's wrong with my PUT command. https://developers.pipedrive.c > om/docs/api/v1/#!/Persons/put_persons_id > > VARIABLE VALUES: > httpHeaders = {"Accept":"application/json"} > tRequestURL1 = https://api.pipedrive.com/v1/persons?api_token=ef2c59a67144d > 185277fee92aa9ede877c6c10ff > tRequestURL2 = https://api.pipedrive.com/v1/persons/2?api_token=ef2c59a6714 > 4d185277fee92aa9ede877c6c10ff > tJSONtoUpload = {"phone":"555-555-"} > > Is there something glaring I'm missing? I can get this to execute on their > developer website, but using the same code seems to error out for me in > LiveCode 8.2.0dp2 Business. > > --Andrew Bell > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: "export snapshot" still NOT in 8.1.7
Well, that's lovely for you. No joy "over here" on Mac OS 10.7.5 (which LiveCode states that 8.1.7 supports). Richmond Mathewson. On 26/11/17 6:13 pm, Roger Guay via use-livecode wrote: Works for me. Mac OS 10.13.1 LC 8.1.7 Roger On Nov 26, 2017, at 7:45 AM, Richmond Mathewson via use-livecodewrote: Nor in 8.1.8 rc 2 Tut, tut! Richmond. On 26/11/17 5:29 pm, Richmond Mathewson wrote: On a Macintosh. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: "export snapshot" still NOT in 8.1.7
Works for me. Mac OS 10.13.1 LC 8.1.7 Roger > On Nov 26, 2017, at 7:45 AM, Richmond Mathewson via use-livecode >wrote: > > Nor in 8.1.8 rc 2 > > Tut, tut! > > Richmond. > > On 26/11/17 5:29 pm, Richmond Mathewson wrote: >> On a Macintosh. >> >> Richmond. > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: RESTful PUT error
If I remember correctly, PUT was never implemented in LibUrl. I have only needed GET and POST in my rather limited uses. ~Roger On Nov 26, 2017 10:37 AM, "Andrew Bell via use-livecode" < use-livecode@lists.runrev.com> wrote: I'm working on connecting to a 3rd-party API (Pipedrive) to a LiveCode app I've done and seem to have a problem; any assistance would be appreciated. Dummy (sandbox) account information has been included with my code sample. I've never used RESTful before, but the API seems pretty well documented and I've had success much faster than anticipated working with the data in LiveCode. It looks like commands are broke down into 3 types: GET (to retrieve data), POST (to create new data), and PUT (to update existing data). I can retrieve data using "put URL tRequestURL1 into tJSONfromPipedrive" I can create new data using "post tJSONtoUpload to url tRequestURL2" But when I try to update data using "put tJSONtoUpload into url tRequestURL2" I get a 400 error from the server. I tried to urlEncode(tJSONtoUpload) but got the same error. Their API includes a sandbox for testing, and my code seems to align with their examples and helped me get my tests in order. I'm just not sure what's wrong with my PUT command. https://developers.pipedrive.c om/docs/api/v1/#!/Persons/put_persons_id VARIABLE VALUES: httpHeaders = {"Accept":"application/json"} tRequestURL1 = https://api.pipedrive.com/v1/persons?api_token=ef2c59a67144d 185277fee92aa9ede877c6c10ff tRequestURL2 = https://api.pipedrive.com/v1/persons/2?api_token=ef2c59a6714 4d185277fee92aa9ede877c6c10ff tJSONtoUpload = {"phone":"555-555-"} Is there something glaring I'm missing? I can get this to execute on their developer website, but using the same code seems to error out for me in LiveCode 8.2.0dp2 Business. --Andrew Bell ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: "export snapshot" still NOT in 8.1.7
Nor in 8.1.8 rc 2 Tut, tut! Richmond. On 26/11/17 5:29 pm, Richmond Mathewson wrote: On a Macintosh. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RESTful PUT error
I'm working on connecting to a 3rd-party API (Pipedrive) to a LiveCode app I've done and seem to have a problem; any assistance would be appreciated. Dummy (sandbox) account information has been included with my code sample. I've never used RESTful before, but the API seems pretty well documented and I've had success much faster than anticipated working with the data in LiveCode. It looks like commands are broke down into 3 types: GET (to retrieve data), POST (to create new data), and PUT (to update existing data). I can retrieve data using "put URL tRequestURL1 into tJSONfromPipedrive" I can create new data using "post tJSONtoUpload to url tRequestURL2" But when I try to update data using "put tJSONtoUpload into url tRequestURL2" I get a 400 error from the server. I tried to urlEncode(tJSONtoUpload) but got the same error. Their API includes a sandbox for testing, and my code seems to align with their examples and helped me get my tests in order. I'm just not sure what's wrong with my PUT command. https://developers.pipedrive.com/docs/api/v1/#!/Persons/put_persons_id VARIABLE VALUES: httpHeaders = {"Accept":"application/json"} tRequestURL1 = https://api.pipedrive.com/v1/persons?api_token=ef2c59a67144d185277fee92aa9ede877c6c10ff tRequestURL2 = https://api.pipedrive.com/v1/persons/2?api_token=ef2c59a67144d185277fee92aa9ede877c6c10ff tJSONtoUpload = {"phone":"555-555-"} Is there something glaring I'm missing? I can get this to execute on their developer website, but using the same code seems to error out for me in LiveCode 8.2.0dp2 Business. --Andrew Bell ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: New Books/Dictionary
While I use the internal dictionary (via TinyDict) for quick lookups, there is something nice about having a separate browsable copy on my iPad. Why would I like an electronic version? 1. I can easily make notes, bookmarks and highlights for future reference. 2. I can browse through it on a whim to learn random facts and explore other topics. (I'm a computer geek... this is fun for me) 3. I tend to do most of my programming on my MacBook Air which does not have a lot of real estate, so having one less window open helps. 4. I can just read and learn more about the language apart from the IDE, and in or at places I may not want to bring my laptop. There's more, but I think that covers most of it - --- Greg (pink) Miller mad, pink and dangerous to code -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
"export snapshot" still NOT in 8.1.7
On a Macintosh. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: New Books/Dictionary
For those wanting an electronic version of the dictionary download Dash (for Mac) or one of its widows or android equivalents and the Dash docset version of the docs. They are at lc9dp10 version and will be updated to dp11 soon after it is released. Searching is very fast, even with the guides. James ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode