Re: v13 - Text entry area, Returns, and Filters

2018-07-02 Thread Chip Scheide via 4D_Tech
Thanks Jeremy,
that is the general pattern I am using.
it seems that as long as I apply a filter the return character will not 
be accepted, as entry into the field.

Chip
On Fri, 29 Jun 2018 19:32:45 -0400, Jeremy French wrote:
> Hi Chip,
> 
> Try defining the filter using the following pattern:
> 
> 1) first character is the tilde character; then
> 2) starting quote character (escaped); then
> 3) allowed characters in filter, separated with semicolons; then
> 4) ending double quote character (escaped).
> 
> The following example allows only:
> 
> 1) uppercase A thru Z; and
> 2) space; and
> 3) carriage return.
> 
> Call on form load event:
> ---
> C_TEXT($filter_t)
> $filter_t:="~\"A-Z; ;"+Char(Carriage return)+"\""
> OBJECT SET FILTER(*;"objNameOfTextBox";$filter_t)
> ―
> 
> Does this work for you?
> 
> - Jeremy French
> 
>> On Jun 29, 2018, at 12:39 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Not working  :(
>> I can not entry a return into the text area.
>> 
>> I have this line of code in my form method:
>> utl_text_Text_Entry_Filter (->[Department]Address)
>> 
>> 
>>  //(m) utl_text_Text_Entry_Filter
>>  //$1 - pointer - to text entry area
>> 
>> C_POINTER($1;$Text_Area)
>> C_TEXT($Filter;$0)
>> 
>> $Text_Area:=$1
>> $Filter:="&"+Quote_Char+Char(13)
>> $Filter:=$Filter+Semi_Colon_Char+Text_Filter
>> $Filter:=$Filter+Semi_Colon_Char+(2*BackSlash_Char)+Quote_Char
>> $0:=$Filter
>> OBJECT SET FILTER(($Text_Area->;$Filter)
>> 
>> Text_Filter = 
>> a-z;A-Z;0-9;_;-;:;`;.;&;^;%;@;(;);[;{;];};<;>;,;/;#;|;~;=;+;*;$;?;!;';_;.;,
>> 
>> 
>> - I can enter all of the characters listed in the text filter, except a 
>> return
>> - There is no button tied to return
>> - I removed the original filter I had on the address field
>> - I removed the code behind the address field
>> - I cleared the key short cut (enter) for the accept button
>> - There is no object accepting return as a shortcut
>> - (debugging) after Object Set Filter, Object Get Filter returns a 
>> filter which includes '\r'
>> - I placed the return at the front of the filter
>> - I placed the return at the end of the filter
>> - I added Char(10), just in case.
>> - The final filter looks correct in the debugger
>>  4Final_Filter : = 
>> 
&"\r;\n;a-z;A-Z;0-9;_;-;:;`;.;&;^;%;@;(;);[;{;];};<;>;,;/;#;|;~;=;+;*;$;?;!;';_;.;,;\\"
>> 
> 
> 
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Text entry area, Returns, and Filters

2018-06-29 Thread Jeremy French via 4D_Tech
Hi Chip,

I forgot to add there are 2-starting characters for the filter:

1) tilde forces uppercase; while
2) ampersand does not fore uppercase.

- Jeremy French

> On Jun 29, 2018, at 12:39 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Not working  :(
> I can not entry a return into the text area.

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

Re: v13 - Text entry area, Returns, and Filters

2018-06-29 Thread Jeremy French via 4D_Tech
Hi Chip,

Try defining the filter using the following pattern:

1) first character is the tilde character; then
2) starting quote character (escaped); then
3) allowed characters in filter, separated with semicolons; then
4) ending double quote character (escaped).

The following example allows only:

1) uppercase A thru Z; and
2) space; and
3) carriage return.

Call on form load event:
---
C_TEXT($filter_t)
$filter_t:="~\"A-Z; ;"+Char(Carriage return)+"\""
OBJECT SET FILTER(*;"objNameOfTextBox";$filter_t)
—

Does this work for you?

- Jeremy French

> On Jun 29, 2018, at 12:39 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Not working  :(
> I can not entry a return into the text area.
> 
> I have this line of code in my form method:
> utl_text_Text_Entry_Filter (->[Department]Address)
> 
> 
>  //(m) utl_text_Text_Entry_Filter
>  //$1 - pointer - to text entry area
> 
> C_POINTER($1;$Text_Area)
> C_TEXT($Filter;$0)
> 
> $Text_Area:=$1
> $Filter:="&"+Quote_Char+Char(13)
> $Filter:=$Filter+Semi_Colon_Char+Text_Filter
> $Filter:=$Filter+Semi_Colon_Char+(2*BackSlash_Char)+Quote_Char
> $0:=$Filter
> OBJECT SET FILTER(($Text_Area->;$Filter)
> 
> Text_Filter = 
> a-z;A-Z;0-9;_;-;:;`;.;&;^;%;@;(;);[;{;];};<;>;,;/;#;|;~;=;+;*;$;?;!;';_;.;,
> 
> 
> - I can enter all of the characters listed in the text filter, except a 
> return
> - There is no button tied to return
> - I removed the original filter I had on the address field
> - I removed the code behind the address field
> - I cleared the key short cut (enter) for the accept button
> - There is no object accepting return as a shortcut
> - (debugging) after Object Set Filter, Object Get Filter returns a 
> filter which includes '\r'
> - I placed the return at the front of the filter
> - I placed the return at the end of the filter
> - I added Char(10), just in case.
> - The final filter looks correct in the debugger
>  4Final_Filter : = 
> &"\r;\n;a-z;A-Z;0-9;_;-;:;`;.;&;^;%;@;(;);[;{;];};<;>;,;/;#;|;~;=;+;*;$;?;!;';_;.;,;\\"
> 

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

Re: v13 - Text entry area, Returns, and Filters

2018-06-29 Thread Chip Scheide via 4D_Tech
Not working  :(
I can not entry a return into the text area.

I have this line of code in my form method:
utl_text_Text_Entry_Filter (->[Department]Address)


  //(m) utl_text_Text_Entry_Filter
  //$1 - pointer - to text entry area

C_POINTER($1;$Text_Area)
C_TEXT($Filter;$0)

$Text_Area:=$1
$Filter:="&"+Quote_Char+Char(13)
$Filter:=$Filter+Semi_Colon_Char+Text_Filter
$Filter:=$Filter+Semi_Colon_Char+(2*BackSlash_Char)+Quote_Char
$0:=$Filter
OBJECT SET FILTER(($Text_Area->;$Filter)

Text_Filter = 
a-z;A-Z;0-9;_;-;:;`;.;&;^;%;@;(;);[;{;];};<;>;,;/;#;|;~;=;+;*;$;?;!;';_;.;,


- I can enter all of the characters listed in the text filter, except a 
return
- There is no button tied to return
- I removed the original filter I had on the address field
- I removed the code behind the address field
- I cleared the key short cut (enter) for the accept button
- There is no object accepting return as a shortcut
- (debugging) after Object Set Filter, Object Get Filter returns a 
filter which includes '\r'
- I placed the return at the front of the filter
- I placed the return at the end of the filter
- I added Char(10), just in case.
- The final filter looks correct in the debugger
  4Final_Filter : = 
&"\r;\n;a-z;A-Z;0-9;_;-;:;`;.;&;^;%;@;(;);[;{;];};<;>;,;/;#;|;~;=;+;*;$;?;!;';_;.;,;\\"


Any Help
Thank
On Thu, 28 Jun 2018 13:26:58 -0400, Charles Miller wrote:
> There is by you have to create filter as a variable and use set filter
> command.
> $Filter_txt:="&"+*Char*(Double quote)+" -~;|"+*Char*(13)+*Char*(Double quote
> ))
> 
> $Filter_txt:="&"+*Char*(Double quote)+*Char*(13)+"A-Z;a-z;0-9;
> ;.;,;(;);*;%;$;#;@;!;?;<;>;:;';-;+;_;=;^;[;];/;\\;|;{;};~;`"+*Char*(Double
> quote)
> object set filter
> 
> Regards
> 
> Chuck
> 
> 
> On Thu, Jun 28, 2018 at 1:06 PM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Is there a way to allow the user to type a return character (char(13))
>> in a text area when there is an entry filter in place??
>> 
>> I suppose another way of looking at this is:
>> Is there a way to include a return in an entry filter??
>> 
>> ex: a company address, this is something that is highly likely to be
>> copy pasted from a web site or other external source. The copy paste
>> could easily include a lot of random (non-printable) characters which
>> Sanity-Check used to call 'gremlins'.
>> An entry filter stops the extraneous characters -- BUT -- it also
>> disallows the user from entering a return.
>> 
>> 
>> Thanks
>> Chip
>> ---
>> 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: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Text entry area, Returns, and Filters

2018-06-28 Thread Chip Scheide via 4D_Tech
Thanks

On Thu, 28 Jun 2018 13:26:58 -0400, Charles Miller wrote:
> There is by you have to create filter as a variable and use set filter
> command.
> $Filter_txt:="&"+*Char*(Double quote)+" -~;|"+*Char*(13)+*Char*(Double quote
> ))
> 
> $Filter_txt:="&"+*Char*(Double quote)+*Char*(13)+"A-Z;a-z;0-9;
> ;.;,;(;);*;%;$;#;@;!;?;<;>;:;';-;+;_;=;^;[;];/;\\;|;{;};~;`"+*Char*(Double
> quote)
> object set filter
> 
> Regards
> 
> Chuck
> 
> 
> On Thu, Jun 28, 2018 at 1:06 PM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Is there a way to allow the user to type a return character (char(13))
>> in a text area when there is an entry filter in place??
>> 
>> I suppose another way of looking at this is:
>> Is there a way to include a return in an entry filter??
>> 
>> ex: a company address, this is something that is highly likely to be
>> copy pasted from a web site or other external source. The copy paste
>> could easily include a lot of random (non-printable) characters which
>> Sanity-Check used to call 'gremlins'.
>> An entry filter stops the extraneous characters -- BUT -- it also
>> disallows the user from entering a return.
>> 
>> 
>> Thanks
>> Chip
>> ---
>> 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: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Text entry area, Returns, and Filters

2018-06-28 Thread Charles Miller via 4D_Tech
There is by you have to create filter as a variable and use set filter
command.
$Filter_txt:="&"+*Char*(Double quote)+" -~;|"+*Char*(13)+*Char*(Double quote
))

$Filter_txt:="&"+*Char*(Double quote)+*Char*(13)+"A-Z;a-z;0-9;
;.;,;(;);*;%;$;#;@;!;?;<;>;:;';-;+;_;=;^;[;];/;\\;|;{;};~;`"+*Char*(Double
quote)
object set filter

Regards

Chuck


On Thu, Jun 28, 2018 at 1:06 PM Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Is there a way to allow the user to type a return character (char(13))
> in a text area when there is an entry filter in place??
>
> I suppose another way of looking at this is:
> Is there a way to include a return in an entry filter??
>
> ex: a company address, this is something that is highly likely to be
> copy pasted from a web site or other external source. The copy paste
> could easily include a lot of random (non-printable) characters which
> Sanity-Check used to call 'gremlins'.
> An entry filter stops the extraneous characters -- BUT -- it also
> disallows the user from entering a return.
>
>
> Thanks
> Chip
> ---
> 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: https://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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

v13 - Text entry area, Returns, and Filters

2018-06-28 Thread Chip Scheide via 4D_Tech
Is there a way to allow the user to type a return character (char(13)) 
in a text area when there is an entry filter in place??

I suppose another way of looking at this is:
Is there a way to include a return in an entry filter??

ex: a company address, this is something that is highly likely to be 
copy pasted from a web site or other external source. The copy paste 
could easily include a lot of random (non-printable) characters which 
Sanity-Check used to call 'gremlins'.
An entry filter stops the extraneous characters -- BUT -- it also 
disallows the user from entering a return.


Thanks
Chip
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**