Re: How to detect EOL character in text file

2017-05-13 Thread James Crate via 4D_Tech
On May 13, 2017, at 8:53 AM, Peter Mew via 4D_Tech <4d_tech@lists.4d.com> wrote: > > Replace text($text;lf;cr) > Replace text($text;crlf;cr) > Position($text;cr) > -pm This won’t detect the line endings, which is what was asked, it will change them to CR. However, to properly normalize line endi

Re: Disable close button on Splash screen windows v12

2017-05-13 Thread truegold via 4D_Tech
Hi Doug, Thank you! I’ll give it a test. I’ve had mixed result so far with only being able to disable the close box of the parent window (main app window). Appreciate, John... > Just snarfed this from a legacy application and watched the code execute. > > $Error_Code:=gui_SetWndRect > ($Windo

Re: How to detect EOL character in text file

2017-05-13 Thread Arnaud de Montard via 4D_Tech
> Le 13 mai 2017 à 14:04, David Adams via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > On Sat, May 13, 2017 at 9:47 PM, Keisuke Miyako via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > >> if you are on v14 or later, >> "Document to text" will normalise the end-of-line to whichever one you >> pre

Re: How to detect EOL character in text file

2017-05-13 Thread Arnaud de Montard via 4D_Tech
> Le 13 mai 2017 à 16:01, Arnaud de Montard via 4D_Tech <4d_tech@lists.4d.com> > a écrit : > [...] Previous code modified to evaluate if time taken to add more and more memory is linear. It seems not, each step "costs" a little more than the previous one (macOS). +++ C_BLOB($_x) $Mbyte_l:=1

​Re: How to detect EOL character in text file

2017-05-13 Thread steve simpson via 4D_Tech
On Sat, May 13, 2017 at 9:04 AM, ​ ​ Peter Mew wrote: > > > Replace text($text;lf;cr) > Replace text($text;crlf;cr) > Position($text;cr) > ​+1. I find this the fastest and simplest method of handling high volumes of incoming "unknown" or "known to be dirty" or "suspect" text. (And not just to fin

Re: How to detect EOL character in text file

2017-05-13 Thread Arnaud de Montard via 4D_Tech
> Le 13 mai 2017 à 15:04, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > >> On 13 May 2017, at 22:58 AEST, Jörg Knebel via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> if the content bigger than 1GB? I don’t think TEXT could handle it. > > 4D v16 64bit can do big things with texts

​Re: Schemes for record level access control

2017-05-13 Thread steve simpson via 4D_Tech
On Sat, May 13, 2017 at 9:04 AM, ​ ​ David Adams wrote: > > > Just as a simple point, it's nice to have access values as a number: > > 1 2 3 4 5 > > Imagine that access increases at each step. > > // On after query > C_LONGINT($1;$user_access_level) > $user_access_level:=$1 > > QUERY SELECTION([F

Re: How to detect EOL character in text file

2017-05-13 Thread Jörg Knebel via 4D_Tech
> On 13 May 2017, at 22:58 AEST, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > if the content bigger than 1GB? I don’t think TEXT could handle it. 4D v16 64bit can do big things with texts too, can it not? What’s the size limit for TEXT (var/filed) in v16-64???

Re: How to detect EOL character in text file

2017-05-13 Thread Jörg Knebel via 4D_Tech
> On 13 May 2017, at 21:47 AEST, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > if you are on v14 or later, I’m on v16 > "Document to text" will normalise the end-of-line to whichever one you prefer. > > http://doc.4d.com/4Dv15/4D/15.4/Document-to-text.301-3274243.en.html >

Re: How to detect EOL character in text file

2017-05-13 Thread Peter Mew via 4D_Tech
Replace text($text;lf;cr) Replace text($text;crlf;cr) Position($text;cr) -pm Sent from my iPad > On 13 May 2017, at 09:16, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > G’day Guys, > > I’m not sure if this was already a topic in the past, at least I couldn’t > find anything in

Re: How to detect EOL character in text file

2017-05-13 Thread David Adams via 4D_Tech
On Sat, May 13, 2017 at 9:47 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > if you are on v14 or later, > "Document to text" will normalise the end-of-line to whichever one you > prefer. > > What a great feature! Thanks for pointing it out...I'd

Re: How to detect EOL character in text file

2017-05-13 Thread Keisuke Miyako via 4D_Tech
if you are on v14 or later, "Document to text" will normalise the end-of-line to whichever one you prefer. http://doc.4d.com/4Dv15/4D/15.4/Document-to-text.301-3274243.en.html it's better than using regex not knowing what the end-of-line is in the loaded text. 2017/05/13 17:16、Jörg Knebel via 4

Re: How to detect EOL character in text file

2017-05-13 Thread David Adams via 4D_Tech
On Sat, May 13, 2017 at 6:40 PM, Wayne Stewart via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Jörg, > > I'd just look and see. > > Grab a bunch of text say less than 1k > > Then use position (with the *) and see if you can find crlf, not there Look > for cr or LF then. > i like that idea. I was thi

Re: How to detect EOL character in text file

2017-05-13 Thread Wayne Stewart via 4D_Tech
Jörg, I'd just look and see. Grab a bunch of text say less than 1k Then use position (with the *) and see if you can find crlf, not there Look for cr or LF then. Wayne PS. Are you coming to Sydney world tour? On Sat, 13 May 2017 at 18:16, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> wrote:

How to detect EOL character in text file

2017-05-13 Thread Jörg Knebel via 4D_Tech
G’day Guys, I’m not sure if this was already a topic in the past, at least I couldn’t find anything in my 174-month-Nug-Postings-archive. BBEdit knows 3 EOL-“Markers” Mac(legacy) CR UnixLF Windows CRLF Having a bit of a singularity in my human C