Re: Posting to LiveCode Server

2018-04-18 Thread David Bovill via use-livecode
Todd, the browser auto-translates things you type / copy paste in the url
bar to something it expects you want as a url.

You have characters in the url that need to be escaped (<>)

On Wed, 18 Apr 2018 at 11:51, Todd Fabacher via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Any Help will be appreciated...
>
> Normally we use Node.js, but we are trying to get LiveCode server working.
> We are doing a simple test:
>
> 
>
>
> If I put the URL in a browser I get back, "It works"
>
> https://api01.triviamatic.tv/round_create.lc
> <
> https://www.google.com/url?q=https://api01.triviamatic.tv/round_create.lc=D=hangouts=1524117219848000=AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA
> >
>
>
> *put* "Accept: text/plain" & CR after tHeaders
> *put* "Content-Type: application/x-www-form-urlencoded" & CR after tHeaders
> *set* the httpHeaders to tHeaders
> *put*"fullname=chi=male=black" into tArgList
> *post* tArgList to URL "https://api01.triviamatic.tv/round_create.lc
> <
> https://www.google.com/url?q=https://api01.triviamatic.tv/round_create.lc=D=hangouts=1524117219848000=AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA
> >
> "
> *put* the result into tError
> *put* it into tFormResults
>
>
> The tError is:  tsneterr: (52) Empty reply from server
>
> and tFormResults is null
>
>
> I need some help ASAP. This is SUPER frustrating!!
>
> --Todd Fabacher
> ___
> 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: [Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Bob Sneidar via use-livecode
Heh heh. I wasn't asking you to actually USE convert to sqlite memory in your 
library. I was just saying that for a few xqueries yours a really useful 
library, but for lots of queries against a large array, the performance of 
first converting to an sqlite memory database and then querying that and 
converting back to array would likely be noticibly better performance wise. 

I already wrote code and posted it for converting a numbered array to a sqlite 
memory database so let me know if you didn't get that so you don't have to 
rewrite it all. 

Bob S


> On Apr 18, 2018, at 15:20 , Alex Tweedly via use-livecode 
>  wrote:
> 
> Well, it's only a case of "I expect ..." so we shouldn't trust my intuition 
> until we've benchmarked it a bit :-)
> 
> Having said that - we will still be using script to iterate over the 
> keys/elements of the array, so there is likely to be some cost there - even 
> before we allow sqlite to index some columns.
> 
> I've just started looking at it from the performance point of view, and 
> reduced the time for the simple case in the included test stack by 95% so it 
> doesn't feel so bad now  but I'll need to completely rewrite the main 
> functions/handlers :-(
> 
> I'll try to import the data into an sqlite DB and compare against that too - 
> will report with some numbers tomorrow (and come up with a more reasonable 
> test case.
> 
> Alex.


___
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: [Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Alex Tweedly via use-livecode
Well, it's only a case of "I expect ..." so we shouldn't trust my 
intuition until we've benchmarked it a bit :-)


Having said that - we will still be using script to iterate over the 
keys/elements of the array, so there is likely to be some cost there - 
even before we allow sqlite to index some columns.


I've just started looking at it from the performance point of view, and 
reduced the time for the simple case in the included test stack by 95% 
so it doesn't feel so bad now  but I'll need to completely rewrite 
the main functions/handlers :-(


I'll try to import the data into an sqlite DB and compare against that 
too - will report with some numbers tomorrow (and come up with a more 
reasonable test case.


Alex.


On 18/04/2018 18:08, Richard Gaskin via use-livecode wrote:

Alex Tweedly wrote:

> I expect the searches etc. would be faster with SQL / memory database

Both use hashed lookups to find data.  What would be needed to bring 
LC array queries on par with SQLite?





___
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

More Datagrid Wierdness

2018-04-18 Thread Bob Sneidar via use-livecode
After DL LC Community 9 some of my datagrids have 3D appearing column header 
buttons. Others do not. Something is definitely up with datagrid redrawing. 

Bob S


___
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: LC PDF Viewer

2018-04-18 Thread Bob Sneidar via use-livecode
Right. That creates a searchable PDF (interestingly enough). 

> On Apr 18, 2018, at 13:32 , Knapp Martin via use-livecode 
>  wrote:
> 
> They would not be fillable PDFs, but PDFs that had been created from the Mac 
> print-to-PDF option in the print dialog.


___
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: LC PDF Viewer

2018-04-18 Thread Paul Dupuis via use-livecode
Hi Martin and Yves,

ZIP file emailed to both of you.

I will also be doing a presentation at the May LiveCode Global on the
XPDF externals.

___
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: How to get the line break char?

2018-04-18 Thread Jerry Jensen via use-livecode
Tiemo,
Is the task to compare two CSV files regardless of their line endings? If you 
don’t care what the line endings are, as Brian points out, using “file:” to 
read them will convert all line endings to just LF. Then there is no problem 
comparing, right?
.Jerry

> On Apr 18, 2018, at 6:52 AM, Brian Milby via use-livecode 
>  wrote:
> 
> One other consideration is how you are opening the file. Using “file” will
> end up converting to just LF. You will need to use “binfile” to examine the
> line endings native in the file.
> On Wed, Apr 18, 2018 at 8:11 AM dunbarx via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Tiemo.
>> 
>> I guess I do not understand.
>> 
>> put charToNum(the number of chars of line (lineOfInterest + 1) of yourText)
>> into tChar
>> 
>> Then tChar can be compared to the "tChar" of any other line.
>> 
>> Craig

___
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: LC PDF Viewer

2018-04-18 Thread Knapp Martin via use-livecode
They would not be fillable PDFs, but PDFs that had been created from the Mac 
print-to-PDF option in the print dialog.

> On Apr 18, 2018, at 1:28 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Are you trying to extract text from a searchable PDF, or are you trying to 
> extract data from a fillable one?
> 
> Bob S
> 
> 
> 
>> On Apr 18, 2018, at 13:14 , Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> On 4/18/2018 1:58 PM, Knapp Martin via use-livecode wrote:
>>> I'm just getting my feet wet with the PDF viewer. Anybody worked with that 
>>> and can help give me with a jump start? I find the dictionary not very 
>>> helpful. I learn a lot better from actual working examples. I didn't see 
>>> anything in the online examples.
>>> 
>>> Basically I want to be able to select a PDF and then extract the text from 
>>> it page by page.
>>> 
>>> Thanks,
>>> Marty
>>> ___
>>> 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
>>> 
>> I am not at the right computer at the moment, but i will send you a
>> sample stack a bit later when I am.
>> 


___
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: LC PDF Viewer

2018-04-18 Thread Bob Sneidar via use-livecode
Are you trying to extract text from a searchable PDF, or are you trying to 
extract data from a fillable one?

Bob S



> On Apr 18, 2018, at 13:14 , Paul Dupuis via use-livecode 
>  wrote:
> 
> On 4/18/2018 1:58 PM, Knapp Martin via use-livecode wrote:
>> I'm just getting my feet wet with the PDF viewer. Anybody worked with that 
>> and can help give me with a jump start? I find the dictionary not very 
>> helpful. I learn a lot better from actual working examples. I didn't see 
>> anything in the online examples.
>> 
>> Basically I want to be able to select a PDF and then extract the text from 
>> it page by page.
>> 
>> Thanks,
>> Marty
>> ___
>> 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
>> 
> I am not at the right computer at the moment, but i will send you a
> sample stack a bit later when I am.
> 
> 
> ___
> 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: LC PDF Viewer

2018-04-18 Thread Knapp Martin via use-livecode
That would be great Paul, thanks.

Marty

> On Apr 18, 2018, at 1:14 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> On 4/18/2018 1:58 PM, Knapp Martin via use-livecode wrote:
>> I'm just getting my feet wet with the PDF viewer. Anybody worked with that 
>> and can help give me with a jump start? I find the dictionary not very 
>> helpful. I learn a lot better from actual working examples. I didn't see 
>> anything in the online examples.
>> 
>> Basically I want to be able to select a PDF and then extract the text from 
>> it page by page.
>> 
>> Thanks,
>> Marty
>> ___
>> 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
>> 
> I am not at the right computer at the moment, but i will send you a
> sample stack a bit later when I am.


___
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: Posting to LiveCode Server

2018-04-18 Thread Tom Glod via use-livecode
Hi Clarance..There isn't much to expand on.thats what blew me away
about this  look up "httpd" in lc 9.0 dictionary.  there are 3
commands.  it can't possibly be any easier . you can just send an
encoded & encrypted array back and forth.  done.  Mark says wasn't built to
be a web server per se.  but it sure as life works like one :)

some benchmarks by richard gaskin:

http://lists.runrev.com/pipermail/use-livecode/2016-March/225068.html

Enjoy.


HTTPD Library
Type
library


Handle HTTP requests in your application
*Name* *Summary* *Syntax*
httpdResponse Respond to a HTTP request httpdResponse pSocketID,
pResponseCode,pContent,pHeaders
httpdStart Start a HTTP server httpdStart pCallback,pPort,pServerName
httpdStop Stop a HTTP server httpdStop pP



On Wed, Apr 18, 2018 at 3:51 PM, Clarence Martin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Tom, can you expand on your post? Maybe with an example.
>
> -Original Message-
> From: use-livecode  On Behalf Of
> Tom
> Glod via use-livecode
> Sent: Wednesday, April 18, 2018 11:31 AM
> To: How to use LiveCode 
> Cc: Tom Glod 
> Subject: Re: Posting to LiveCode Server
>
> I was going to use LC Server until I realized there was a built in httpd
> server library present in LC 9 I ditched LC server mainly because
> it
> smokes LC server in performance.  Just bringing to awareness all your
> options.
>
> http library is so simple to use with callbacks for each request.  its so
> awesome.  good luck.
>
> On Wed, Apr 18, 2018 at 9:50 AM, Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Can you share the code to the page you're actually posting to?  Its
> > sounding like its not actually returning any output, causing a 500
> > internal error.  Just to let you test, I set up a quick and dirty page
> > at http://guidezone.info/test.lc The code in the page is as follows.
> >
> >  > put the keys of $_POST into tKeys
> > if tKeys is not empty then
> >repeat for each line tKey in tKeys
> >   put $_POST[tkey] & ""
> >end repeat
> > else
> >put "Error: No data posted" -- gotta put somethingto avoid a 500
> > error end if ?>
> >
> > To test it, I used the following in a button.
> > put "Accept: text/plain" & CR after tHeaders put "Content-Type:
> > application/x-www-form-urlencoded" & CR after tHeaders set the
> > httpHeaders to tHeaders
> >
> > put liburlformdata("name","Chi","gender","male","color","black") into
> > tPostData
> >
> > put tPostData & cr --so that I can see the generated post string
> >
> > post tPostData to "http://guidezone.info/test.lc;
> >
> > put it && the result after msg
> >
> >
> > This works for me, though as I said, I don't have tsnet.  You're
> > welcome to do test runs against my url if you like. If it works for me
> > as written, and not for you, i'd be pointing my finger at tsnet.
> >
> > On Wed, Apr 18, 2018 at 7:01 AM, Alex Tweedly via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > Not quite sure what you're trying to do ... or why you use such a
> > > complicated URL in the client code.
> > >
> > > Changing it to simply
> > >
> > > *get URL "https://api01.triviamatic.tv/round_create.lc;
> > > *
> > >
> > > will work fine, as will
> > >
> > > *post*emptyto"https://api01.triviamatic.tv/round_create.lc;
> > >
> > >
> > > -- Alex.
> > >
> > >
> > >
> > > On 18/04/2018 11:50, Todd Fabacher via use-livecode wrote:
> > >
> > >> Any Help will be appreciated...
> > >>
> > >> Normally we use Node.js, but we are trying to get LiveCode server
> > working.
> > >> We are doing a simple test:
> > >>
> > >> 
> > >>
> > >>
> > >> If I put the URL in a browser I get back, "It works"
> > >>
> > >> https://api01.triviamatic.tv/round_create.lc
> > >>  > >> ound_create.lc=D=hangouts=1524117219848000
> > >> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
> > >>
> > >>
> > >> *put* "Accept: text/plain" & CR after tHeaders
> > >> *put* "Content-Type: application/x-www-form-urlencoded" & CR after
> > >> tHeaders
> > >> *set* the httpHeaders to tHeaders
> > >> *put*"fullname=chi=male=black" into tArgList
> > >> *post* tArgList to URL
> > >> "https://api01.triviamatic.tv/round_create.lc
> > >>  > >> ound_create.lc=D=hangouts=1524117219848000
> > >> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
> > >> "
> > >> *put* the result into tError
> > >> *put* it into tFormResults
> > >>
> > >>
> > >> The tError is:  tsneterr: (52) Empty reply from server
> > >>
> > >> and tFormResults is null
> > >>
> > >>
> > >> I need some help ASAP. This is SUPER frustrating!!
> > >>
> > >> --Todd Fabacher
> > >> ___
> > >> use-livecode mailing list
> > >> use-livecode@lists.runrev.com
> > >> Please visit this url to subscribe, unsubscribe and 

Re: LC PDF Viewer

2018-04-18 Thread Paul Dupuis via use-livecode
On 4/18/2018 1:58 PM, Knapp Martin via use-livecode wrote:
> I'm just getting my feet wet with the PDF viewer. Anybody worked with that 
> and can help give me with a jump start? I find the dictionary not very 
> helpful. I learn a lot better from actual working examples. I didn't see 
> anything in the online examples.
>
> Basically I want to be able to select a PDF and then extract the text from it 
> page by page.
>
> Thanks,
> Marty
> ___
> 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
>
I am not at the right computer at the moment, but i will send you a
sample stack a bit later when I am.


___
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: Posting to LiveCode Server

2018-04-18 Thread Clarence Martin via use-livecode
Tom, can you expand on your post? Maybe with an example.

-Original Message-
From: use-livecode  On Behalf Of Tom
Glod via use-livecode
Sent: Wednesday, April 18, 2018 11:31 AM
To: How to use LiveCode 
Cc: Tom Glod 
Subject: Re: Posting to LiveCode Server

I was going to use LC Server until I realized there was a built in httpd
server library present in LC 9 I ditched LC server mainly because it
smokes LC server in performance.  Just bringing to awareness all your
options.

http library is so simple to use with callbacks for each request.  its so
awesome.  good luck.

On Wed, Apr 18, 2018 at 9:50 AM, Mike Bonner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Can you share the code to the page you're actually posting to?  Its 
> sounding like its not actually returning any output, causing a 500 
> internal error.  Just to let you test, I set up a quick and dirty page 
> at http://guidezone.info/test.lc The code in the page is as follows.
>
>  put the keys of $_POST into tKeys
> if tKeys is not empty then
>repeat for each line tKey in tKeys
>   put $_POST[tkey] & ""
>end repeat
> else
>put "Error: No data posted" -- gotta put somethingto avoid a 500 
> error end if ?>
>
> To test it, I used the following in a button.
> put "Accept: text/plain" & CR after tHeaders put "Content-Type: 
> application/x-www-form-urlencoded" & CR after tHeaders set the 
> httpHeaders to tHeaders
>
> put liburlformdata("name","Chi","gender","male","color","black") into 
> tPostData
>
> put tPostData & cr --so that I can see the generated post string
>
> post tPostData to "http://guidezone.info/test.lc;
>
> put it && the result after msg
>
>
> This works for me, though as I said, I don't have tsnet.  You're 
> welcome to do test runs against my url if you like. If it works for me 
> as written, and not for you, i'd be pointing my finger at tsnet.
>
> On Wed, Apr 18, 2018 at 7:01 AM, Alex Tweedly via use-livecode < 
> use-livecode@lists.runrev.com> wrote:
>
> > Not quite sure what you're trying to do ... or why you use such a 
> > complicated URL in the client code.
> >
> > Changing it to simply
> >
> > *get URL "https://api01.triviamatic.tv/round_create.lc;
> > *
> >
> > will work fine, as will
> >
> > *post*emptyto"https://api01.triviamatic.tv/round_create.lc;
> >
> >
> > -- Alex.
> >
> >
> >
> > On 18/04/2018 11:50, Todd Fabacher via use-livecode wrote:
> >
> >> Any Help will be appreciated...
> >>
> >> Normally we use Node.js, but we are trying to get LiveCode server
> working.
> >> We are doing a simple test:
> >>
> >> 
> >>
> >>
> >> If I put the URL in a browser I get back, "It works"
> >>
> >> https://api01.triviamatic.tv/round_create.lc
> >>  >> ound_create.lc=D=hangouts=1524117219848000
> >> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
> >>
> >>
> >> *put* "Accept: text/plain" & CR after tHeaders
> >> *put* "Content-Type: application/x-www-form-urlencoded" & CR after 
> >> tHeaders
> >> *set* the httpHeaders to tHeaders
> >> *put*"fullname=chi=male=black" into tArgList
> >> *post* tArgList to URL 
> >> "https://api01.triviamatic.tv/round_create.lc
> >>  >> ound_create.lc=D=hangouts=1524117219848000
> >> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
> >> "
> >> *put* the result into tError
> >> *put* it into tFormResults
> >>
> >>
> >> The tError is:  tsneterr: (52) Empty reply from server
> >>
> >> and tFormResults is null
> >>
> >>
> >> I need some help ASAP. This is SUPER frustrating!!
> >>
> >> --Todd Fabacher
> >> ___
> >> 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
>
___
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:

Re: [Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Bob Sneidar via use-livecode
I was thinking about that. Depends on what you mean by par. If you are not 
indexing array values, then you will have to touch every array element each 
time you query. It's back to one pass sql conversion then, and you would get 
all the benefits of sql in the bargain. The only time an array query api comes 
in handy is if you are only trying to filter an array for a key:value a few 
times. If you have to do this many times, conversion to a memory based sqlite 
database could really pay dividends for a large array, especially if you took 
the time to index the columns that mattered most. 

I'm going to put together a benchmark soon I think. Shouldn't take too much 
time to do so. I have some good SQL data I can punch into an array then create 
a memory based SQL database from. 

Bob S


> On Apr 18, 2018, at 10:08 , Richard Gaskin via use-livecode 
>  wrote:
> 
> Alex Tweedly wrote:
> 
> > I expect the searches etc. would be faster with SQL / memory database
> 
> Both use hashed lookups to find data.  What would be needed to bring LC array 
> queries on par with SQLite?
> 
> -- 
> Richard Gaskin


___
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: use-livecode Digest, Vol 175, Issue 31

2018-04-18 Thread Todd Fabacher via use-livecode
Thanks Matthias for the reply

We figured it out. When you do a Post to LiveCode Server, you MUST call $_POST
or $_POST_RAW. If you do NOT then the server script will NOT process and
returns an error. We just put the file up there is see if we could get a
return. But when posting...you MUST make one of the two calls.

Thanks also to Elanor for the help,

Todd
___
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: Posting to LiveCode Server

2018-04-18 Thread Tom Glod via use-livecode
I was going to use LC Server until I realized there was a built in httpd
server library present in LC 9 I ditched LC server mainly because
it smokes LC server in performance.  Just bringing to awareness all your
options.

http library is so simple to use with callbacks for each request.  its so
awesome.  good luck.

On Wed, Apr 18, 2018 at 9:50 AM, Mike Bonner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Can you share the code to the page you're actually posting to?  Its
> sounding like its not actually returning any output, causing a 500 internal
> error.  Just to let you test, I set up a quick and dirty page at
> http://guidezone.info/test.lc
> The code in the page is as follows.
>
>  put the keys of $_POST into tKeys
> if tKeys is not empty then
>repeat for each line tKey in tKeys
>   put $_POST[tkey] & ""
>end repeat
> else
>put "Error: No data posted" -- gotta put somethingto avoid a 500 error
> end if
> ?>
>
> To test it, I used the following in a button.
> put "Accept: text/plain" & CR after tHeaders
> put "Content-Type: application/x-www-form-urlencoded" & CR after tHeaders
> set the httpHeaders to tHeaders
>
> put liburlformdata("name","Chi","gender","male","color","black") into
> tPostData
>
> put tPostData & cr --so that I can see the generated post string
>
> post tPostData to "http://guidezone.info/test.lc;
>
> put it && the result after msg
>
>
> This works for me, though as I said, I don't have tsnet.  You're welcome to
> do test runs against my url if you like. If it works for me as written, and
> not for you, i'd be pointing my finger at tsnet.
>
> On Wed, Apr 18, 2018 at 7:01 AM, Alex Tweedly via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Not quite sure what you're trying to do ... or why you use such a
> > complicated URL in the client code.
> >
> > Changing it to simply
> >
> > *get URL "https://api01.triviamatic.tv/round_create.lc;
> > *
> >
> > will work fine, as will
> >
> > *post*emptyto"https://api01.triviamatic.tv/round_create.lc;
> >
> >
> > -- Alex.
> >
> >
> >
> > On 18/04/2018 11:50, Todd Fabacher via use-livecode wrote:
> >
> >> Any Help will be appreciated...
> >>
> >> Normally we use Node.js, but we are trying to get LiveCode server
> working.
> >> We are doing a simple test:
> >>
> >> 
> >>
> >>
> >> If I put the URL in a browser I get back, "It works"
> >>
> >> https://api01.triviamatic.tv/round_create.lc
> >>  >> ound_create.lc=D=hangouts=1524117219848000
> >> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
> >>
> >>
> >> *put* "Accept: text/plain" & CR after tHeaders
> >> *put* "Content-Type: application/x-www-form-urlencoded" & CR after
> >> tHeaders
> >> *set* the httpHeaders to tHeaders
> >> *put*"fullname=chi=male=black" into tArgList
> >> *post* tArgList to URL "https://api01.triviamatic.tv/round_create.lc
> >>  >> ound_create.lc=D=hangouts=1524117219848000
> >> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
> >> "
> >> *put* the result into tError
> >> *put* it into tFormResults
> >>
> >>
> >> The tError is:  tsneterr: (52) Empty reply from server
> >>
> >> and tFormResults is null
> >>
> >>
> >> I need some help ASAP. This is SUPER frustrating!!
> >>
> >> --Todd Fabacher
> >> ___
> >> 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
>
___
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


LC PDF Viewer

2018-04-18 Thread Knapp Martin via use-livecode
I'm just getting my feet wet with the PDF viewer. Anybody worked with that and 
can help give me with a jump start? I find the dictionary not very helpful. I 
learn a lot better from actual working examples. I didn't see anything in the 
online examples.

Basically I want to be able to select a PDF and then extract the text from it 
page by page.

Thanks,
Marty
___
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: DataGrid Column Labels

2018-04-18 Thread Terence Heaford via use-livecode
All my tables just say

button id 1005 of stack "revDataGridLibrary"


Did the copy and paste thing and it did not work.

??

Terry

> On 18 Apr 2018, at 15:53, Bob Sneidar via use-livecode 
>  wrote:
> 
> 2. Copy what's in the message 

___
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: [Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Richard Gaskin via use-livecode

Alex Tweedly wrote:

> I expect the searches etc. would be faster with SQL / memory database

Both use hashed lookups to find data.  What would be needed to bring LC 
array queries on par with SQLite?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: [Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Alex Tweedly via use-livecode

No, no SQL database involved.

The array is kept untouched - although you can use the xaCopy function 
to make a copy of some subset of the data, in general it's going to be 
more efficient (both space and time) to keep the array.


There is no relational anything - it's just intended for wen you are 
using a LC array as a key <--> value data store.


You can do sorting by multiple columns, using xaOrderBy (each column is 
sorted in (reverse) turn, depending on the fact that LC's sort is 
stable).  (note it does the key matching as one phase, then sorts those 
keys as a second phase).


I expect the searches etc. would be faster with SQL / memory database - 
but if you are using the array anyway, this way can be simpler, easier 
and it avoids any sync issues if the array is being changed - as well as 
allowing you to keep only a single copy in memory.


-- Alex.

On 18/04/2018 16:07, Bob Sneidar via use-livecode wrote:

Thanks Alex. Couple questions:

Does this convert to an SQL database? If so, are there commands for ordering?

The advantage to converting to a memory based sqLite database is that there are 
features unique to SQL, like relational queries and sorting by multiple columns 
that you cannot get by simply extracting matching keys. The downside *might* be 
the time it takes to convert, but it's one pass through the array (or arrays), 
which I assume you are having to do anyway.

I use a memory database, but of course you wouldn't have to. Any SQL database 
would work but memory makes it so much faster, so long as the array size is not 
humongous.

Bob S



On Apr 18, 2018, at 07:00 , Alex Tweedly via use-livecode 
 wrote:

So, I was tempted too :-)

But I decide there was no need for the complexity of xquery, and it was better 
to keep it simple, along the lines of Andre's DBLib, or revIgniter's Database 
lIbrary.

Hence : xaLib  - eXtract from an Array Library
which can be found (I hope) at github.com/alextweedly/xalib


___
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: [Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Bob Sneidar via use-livecode
Thanks Alex. Couple questions: 

Does this convert to an SQL database? If so, are there commands for ordering? 

The advantage to converting to a memory based sqLite database is that there are 
features unique to SQL, like relational queries and sorting by multiple columns 
that you cannot get by simply extracting matching keys. The downside *might* be 
the time it takes to convert, but it's one pass through the array (or arrays), 
which I assume you are having to do anyway. 

I use a memory database, but of course you wouldn't have to. Any SQL database 
would work but memory makes it so much faster, so long as the array size is not 
humongous. 

Bob S


> On Apr 18, 2018, at 07:00 , Alex Tweedly via use-livecode 
>  wrote:
> 
> So, I was tempted too :-)
> 
> But I decide there was no need for the complexity of xquery, and it was 
> better to keep it simple, along the lines of Andre's DBLib, or revIgniter's 
> Database lIbrary.
> 
> Hence : xaLib  - eXtract from an Array Library
>which can be found (I hope) at github.com/alextweedly/xalib


___
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: DataGrid Column Labels

2018-04-18 Thread Mike Bonner via use-livecode
Should have been diffcompare(the script of tWorking, the script of tBroken,
1)
Typos galore.

On Wed, Apr 18, 2018 at 9:05 AM, Mike Bonner  wrote:

> I'm curious as to the differences..
> Bob, what do you get if you..
> put the behavior of group "workingdatagridname" into tWorking
> put the behavior of group "nonworkingdatagridname" into tBroken
> get dicompare(the script of tWorking,tBroken,1)
> put it
>
> On Wed, Apr 18, 2018 at 8:53 AM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> 1. Find a datagrid that does not exhibit the problem. In the message box
>> put:
>> put the behavior of group >
>> 2. Copy what's in the message
>>
>> 3. Go to the datagrid that is NOT working
>>
>> 4. In the message box type:
>> set the behavior of  to 
>>
>> Bob S
>>
>>
>> > On Apr 17, 2018, at 23:36 , Terence Heaford via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >
>> > I’ve had a look at various behaviours but rather then make a mess of
>> everything can you give a blow by blow of your actions please.
>> >
>> >
>> > Thanks
>> >
>> > Terry
>> >
>> >
>> >> On 17 Apr 2018, at 15:47, Bob Sneidar via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >>
>> >> As I mentioned, I get the behavior of a datagrid that IS working, then
>> set the behavior of the datagrid that ISN'T working to that behavior. I'm
>> not sure why but there seem to be more than one datagrid behavior object
>> floating around.
>> >>
>> >> Bob S
>>
>> ___
>> 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: DataGrid Column Labels

2018-04-18 Thread Mike Bonner via use-livecode
I'm curious as to the differences..
Bob, what do you get if you..
put the behavior of group "workingdatagridname" into tWorking
put the behavior of group "nonworkingdatagridname" into tBroken
get dicompare(the script of tWorking,tBroken,1)
put it

On Wed, Apr 18, 2018 at 8:53 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> 1. Find a datagrid that does not exhibit the problem. In the message box
> put:
> put the behavior of group 
> 2. Copy what's in the message
>
> 3. Go to the datagrid that is NOT working
>
> 4. In the message box type:
> set the behavior of  to 
>
> Bob S
>
>
> > On Apr 17, 2018, at 23:36 , Terence Heaford via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I’ve had a look at various behaviours but rather then make a mess of
> everything can you give a blow by blow of your actions please.
> >
> >
> > Thanks
> >
> > Terry
> >
> >
> >> On 17 Apr 2018, at 15:47, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> As I mentioned, I get the behavior of a datagrid that IS working, then
> set the behavior of the datagrid that ISN'T working to that behavior. I'm
> not sure why but there seem to be more than one datagrid behavior object
> floating around.
> >>
> >> Bob S
>
> ___
> 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: DataGrid Column Labels

2018-04-18 Thread Bob Sneidar via use-livecode
1. Find a datagrid that does not exhibit the problem. In the message box put:
put the behavior of group  to 

Bob S


> On Apr 17, 2018, at 23:36 , Terence Heaford via use-livecode 
>  wrote:
> 
> I’ve had a look at various behaviours but rather then make a mess of 
> everything can you give a blow by blow of your actions please.
> 
> 
> Thanks
> 
> Terry
> 
> 
>> On 17 Apr 2018, at 15:47, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> As I mentioned, I get the behavior of a datagrid that IS working, then set 
>> the behavior of the datagrid that ISN'T working to that behavior. I'm not 
>> sure why but there seem to be more than one datagrid behavior object 
>> floating around. 
>> 
>> Bob S

___
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

[Ann] xaLib - library to extract data from an array.

2018-04-18 Thread Alex Tweedly via use-livecode

Bob Sneidar and Richard Gaskin said :


> Essentially it's for finding things in an array. You might say I could
  > do the same thing by iterating through all the elements of an array,
  > but what if I wanted to do multiple queries? It's easier for me to
  > write SQL queries than it is to code repeat loops.

I hear ya'.  I find myself tempted way more than I have time for to
write an xquery-like library for working with arrays.  We could sure use
one.

So, I was tempted too :-)

But I decide there was no need for the complexity of xquery, and it was 
better to keep it simple, along the lines of Andre's DBLib, or 
revIgniter's Database lIbrary.


Hence : xaLib  - eXtract from an Array Library
   which can be found (I hope) at github.com/alextweedly/xalib

(I may not have done everything right on github - please let me know if 
I need to fix anything).


There a script-only library, and a very simple test/demo stack as well 
as some basic documentation.


Summary:
the data is held in a LC array. You
 - (optionally) specify the matching criteria (by a series of calls to 
xaWhere)
 - (optionally) specify the ordering needed (by a series of calls to 
xaOrderBy)

 - (optionally) name that query for later re-use (xaNameQuery)
 - then run the query by calling xaQuery, which returns the set of keys 
matching your needs.
 - (optionally) make a copy of the 'interesting' data (but usually 
better not to do this).


Any suggestions / comments / contributions welcomed.

-- Alex.
___
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: AW: How to get the line break char?

2018-04-18 Thread Brian Milby via use-livecode
One other consideration is how you are opening the file. Using “file” will
end up converting to just LF. You will need to use “binfile” to examine the
line endings native in the file.
On Wed, Apr 18, 2018 at 8:11 AM dunbarx via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Tiemo.
>
> I guess I do not understand.
>
> put charToNum(the number of chars of line (lineOfInterest + 1) of yourText)
> into tChar
>
> Then tChar can be compared to the "tChar" of any other line.
>
> Craig
>
>
>
> --
> 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: Posting to LiveCode Server

2018-04-18 Thread Mike Bonner via use-livecode
Can you share the code to the page you're actually posting to?  Its
sounding like its not actually returning any output, causing a 500 internal
error.  Just to let you test, I set up a quick and dirty page at
http://guidezone.info/test.lc
The code in the page is as follows.

"
   end repeat
else
   put "Error: No data posted" -- gotta put somethingto avoid a 500 error
end if
?>

To test it, I used the following in a button.
put "Accept: text/plain" & CR after tHeaders
put "Content-Type: application/x-www-form-urlencoded" & CR after tHeaders
set the httpHeaders to tHeaders

put liburlformdata("name","Chi","gender","male","color","black") into
tPostData

put tPostData & cr --so that I can see the generated post string

post tPostData to "http://guidezone.info/test.lc;

put it && the result after msg


This works for me, though as I said, I don't have tsnet.  You're welcome to
do test runs against my url if you like. If it works for me as written, and
not for you, i'd be pointing my finger at tsnet.

On Wed, Apr 18, 2018 at 7:01 AM, Alex Tweedly via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Not quite sure what you're trying to do ... or why you use such a
> complicated URL in the client code.
>
> Changing it to simply
>
> *get URL "https://api01.triviamatic.tv/round_create.lc;
> *
>
> will work fine, as will
>
> *post*emptyto"https://api01.triviamatic.tv/round_create.lc;
>
>
> -- Alex.
>
>
>
> On 18/04/2018 11:50, Todd Fabacher via use-livecode wrote:
>
>> Any Help will be appreciated...
>>
>> Normally we use Node.js, but we are trying to get LiveCode server working.
>> We are doing a simple test:
>>
>> 
>>
>>
>> If I put the URL in a browser I get back, "It works"
>>
>> https://api01.triviamatic.tv/round_create.lc
>> > ound_create.lc=D=hangouts=1524117219848000
>> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
>>
>>
>> *put* "Accept: text/plain" & CR after tHeaders
>> *put* "Content-Type: application/x-www-form-urlencoded" & CR after
>> tHeaders
>> *set* the httpHeaders to tHeaders
>> *put*"fullname=chi=male=black" into tArgList
>> *post* tArgList to URL "https://api01.triviamatic.tv/round_create.lc
>> > ound_create.lc=D=hangouts=1524117219848000
>> =AFQjCNFvW3yaTcJjQ9bGpWgi3CYh1mQwGA>
>> "
>> *put* the result into tError
>> *put* it into tFormResults
>>
>>
>> The tError is:  tsneterr: (52) Empty reply from server
>>
>> and tFormResults is null
>>
>>
>> I need some help ASAP. This is SUPER frustrating!!
>>
>> --Todd Fabacher
>> ___
>> 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: AW: How to get the line break char?

2018-04-18 Thread dunbarx via use-livecode
Tiemo.

I guess I do not understand.

put charToNum(the number of chars of line (lineOfInterest + 1) of yourText)
into tChar

Then tChar can be compared to the "tChar" of any other line.

Craig



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


Re: Posting to LiveCode Server

2018-04-18 Thread Alex Tweedly via use-livecode
Not quite sure what you're trying to do ... or why you use such a 
complicated URL in the client code.


Changing it to simply

*get URL "https://api01.triviamatic.tv/round_create.lc;
*

will work fine, as will

*post*emptyto"https://api01.triviamatic.tv/round_create.lc;


-- Alex.


On 18/04/2018 11:50, Todd Fabacher via use-livecode wrote:

Any Help will be appreciated...

Normally we use Node.js, but we are trying to get LiveCode server working.
We are doing a simple test:




If I put the URL in a browser I get back, "It works"

https://api01.triviamatic.tv/round_create.lc



*put* "Accept: text/plain" & CR after tHeaders
*put* "Content-Type: application/x-www-form-urlencoded" & CR after tHeaders
*set* the httpHeaders to tHeaders
*put*"fullname=chi=male=black" into tArgList
*post* tArgList to URL "https://api01.triviamatic.tv/round_create.lc

"
*put* the result into tError
*put* it into tFormResults


The tError is:  tsneterr: (52) Empty reply from server

and tFormResults is null


I need some help ASAP. This is SUPER frustrating!!

--Todd Fabacher
___
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: AW: How to get the line break char?

2018-04-18 Thread Alex Tweedly via use-livecode

put the number of chars in line 1 of tVar into temp

put char temp+1 of tVar into tLineBreakChar

(and beware of single-line data :-)

-- Alex.


On 18/04/2018 13:57, Tiemo Hollmann TB via use-livecode wrote:

Yes, thats what I said. I am looking for an alternative to examine the line
break if it is LF, CR, LFCR or whatever
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von dunbarx via use-livecode
Gesendet: Mittwoch, 18. April 2018 14:50
An: use-revolut...@lists.runrev.com
Cc: dunbarx 
Betreff: Re: How to get the line break char?

Hi.

You cannot ask for the "last" char of a line, because LC will give you the
last "non-control" char.

Say you have the below text in a field:

abc
def


So the last char of line 1 is "c". But the number of chars of that text
snippet is 7

But numToChar(char 4 of fld 1) = 10. That is a return char between the "c"
and the "d"

Craig



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



___
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

AW: How to get the line break char?

2018-04-18 Thread Tiemo Hollmann TB via use-livecode
Yes, thats what I said. I am looking for an alternative to examine the line
break if it is LF, CR, LFCR or whatever
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von dunbarx via use-livecode
Gesendet: Mittwoch, 18. April 2018 14:50
An: use-revolut...@lists.runrev.com
Cc: dunbarx 
Betreff: Re: How to get the line break char?

Hi.

You cannot ask for the "last" char of a line, because LC will give you the
last "non-control" char.

Say you have the below text in a field:

abc
def


So the last char of line 1 is "c". But the number of chars of that text
snippet is 7

But numToChar(char 4 of fld 1) = 10. That is a return char between the "c"
and the "d"

Craig



--
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: How to get the line break char?

2018-04-18 Thread dunbarx via use-livecode
Hi.

You cannot ask for the "last" char of a line, because LC will give you the
last "non-control" char.

Say you have the below text in a field:

abc
def


So the last char of line 1 is "c". But the number of chars of that text
snippet is 7

But numToChar(char 4 of fld 1) = 10. That is a return char between the "c"
and the "d"

Craig



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


Re: Posting to LiveCode Server

2018-04-18 Thread Matthias Rebbe via use-livecode
Todd,

is there a reason why you are not using the function libURLMultipartFormData to 
format the data before posting?

We are using the post method for different tasks including uploading really big 
files to a livecode server, but we always use libURLMultipartFormData to create 
the form data.

Btw.which version of LC server is running on your side?


Matthias


> Am 18.04.2018 um 12:50 schrieb Todd Fabacher via use-livecode 
> :
> 
> Any Help will be appreciated...
> 
> Normally we use Node.js, but we are trying to get LiveCode server working.
> We are doing a simple test:
> 
> 
> 
> 
> If I put the URL in a browser I get back, "It works"
> 
> https://api01.triviamatic.tv/round_create.lc
> 
> 
> 
> *put* "Accept: text/plain" & CR after tHeaders
> *put* "Content-Type: application/x-www-form-urlencoded" & CR after tHeaders
> *set* the httpHeaders to tHeaders
> *put*"fullname=chi=male=black" into tArgList
> *post* tArgList to URL "https://api01.triviamatic.tv/round_create.lc
> 
> "
> *put* the result into tError
> *put* it into tFormResults
> 
> 
> The tError is:  tsneterr: (52) Empty reply from server
> 
> and tFormResults is null
> 
> 
> I need some help ASAP. This is SUPER frustrating!!
> 
> --Todd Fabacher
> ___
> 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


Posting to LiveCode Server

2018-04-18 Thread Todd Fabacher via use-livecode
Any Help will be appreciated...

Normally we use Node.js, but we are trying to get LiveCode server working.
We are doing a simple test:




If I put the URL in a browser I get back, "It works"

https://api01.triviamatic.tv/round_create.lc



*put* "Accept: text/plain" & CR after tHeaders
*put* "Content-Type: application/x-www-form-urlencoded" & CR after tHeaders
*set* the httpHeaders to tHeaders
*put*"fullname=chi=male=black" into tArgList
*post* tArgList to URL "https://api01.triviamatic.tv/round_create.lc

"
*put* the result into tError
*put* it into tFormResults


The tError is:  tsneterr: (52) Empty reply from server

and tFormResults is null


I need some help ASAP. This is SUPER frustrating!!

--Todd Fabacher
___
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


How to get the line break char?

2018-04-18 Thread Tiemo Hollmann TB via use-livecode
Hello,

I want to compare two CSV files and I suspect that there is a difference in
the kind of line break. With charToNum(last char of line 1 of field "foo") I
can compare the last visible char of each line, but how can I get and
analyse the line break char that is used?

Thanks

Tiemo

 

 

 

___
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: DataGrid Column Labels

2018-04-18 Thread Terence Heaford via use-livecode
I’ve had a look at various behaviours but rather then make a mess of everything 
can you give a blow by blow of your actions please.


Thanks

Terry


> On 17 Apr 2018, at 15:47, Bob Sneidar via use-livecode 
>  wrote:
> 
> As I mentioned, I get the behavior of a datagrid that IS working, then set 
> the behavior of the datagrid that ISN'T working to that behavior. I'm not 
> sure why but there seem to be more than one datagrid behavior object floating 
> around. 
> 
> Bob S
> 
> 
>> On Apr 16, 2018, at 08:29 , Terence Heaford via use-livecode 
>>  wrote:
>> 
>> I see what you have done and when I create a new project with LC9 and create 
>> a Data Grid I do not have any problems.
>> 
>> The issue I have is when I create a Data Grid within a project that has been 
>> created with an earlier version of LC.
>> 
>> If this is relevant I do not know.
>> 
>> For the moment I have settled on placing this in the preOpenCard handler
>> 
>> 
>> put  “aa,bb,cc,dd,ee,ff,gg,hh" into tFields
>> 
>> replace "," with CR in tFields
>> 
>> set the dgProp[ "column labels" ] of group  “myTable" to tFields
>> 
>> 
>> 
>> This does the trick but it would be better if I knew why?
>> 
>> There are 13 Data Grids in the project.
>> 
>> 8 that were there before LC9 are OK the other 5 exhibit the issue. 
>> 
>> 
>> 
>> All the best
>> 
>> Terry
> 
> ___
> 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