Re: Object notation replacement for use of Self in a script — v18

2020-04-30 Thread kculotta via 4D_Tech
Sorry, meant to say the pointer that results from the Object Get name is to the 
entity

> On Apr 30, 2020, at 3:59 PM, kculotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 18.1
> 
> The pointer OBJECT Get name(Object current) is to the entity instead of the 
> to the entity attribute.
> 
> The field is eg, MyEntity.MyName, but the pointer to the form object ends up 
> being ->MyEntity
> 
>> On Apr 30, 2020, at 3:52 PM, lists via 4D_Tech <4d_tech@lists.4d.com> wrote:
>> 
>> Sorry, Are you saying that you can get a valid pointer with Object get 
>> pointer() on a dot notation object of a form?, if so what version?
>> 
>> Lahav
>> 
>> -----Original Message-
>> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of kculotta via 
>> 4D_Tech
>> Sent: Thursday, April 30, 2020 2:50 PM
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Cc: kculotta 
>> Subject: Re: Object notation replacement for use of Self in a script — v18
>> 
>> Yes, I'm using it, but it really seems like an artificial way to get an 
>> entity field's displayed contents.
>> 
>> I'll explore your example.
>> 
>> Keith - CDI
>> 
>>> On Apr 30, 2020, at 3:45 PM, lists via 4D_Tech <4d_tech@lists.4d.com> wrote:
>>> 
>>> Did you actually test this?, any kind of a get pointer on a form object 
>>> having a dot notation source will return a Nil pointer, regardless of the 
>>> name matching or not.
>>> 
>>> If you are using matched names, you could use the following:
>>> 
>>> Form[Object get name(object current)]:=DoWhatever(Form[Object get 
>>> name(object current)])
>>> 
>>> But that is not quite what we need to be truly generic
>>> 
>>> Lahav
>>> 
>>> -Original Message-
>>> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of kculotta via 
>>> 4D_Tech
>>> Sent: Thursday, April 30, 2020 2:29 PM
>>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>>> Cc: kculotta 
>>> Subject: Re: Object notation replacement for use of Self in a script — 
>>> v18
>>> 
>>> This example does not avoid having to carefully name form objects and the 
>>> form object must have "matching" variable and object names: variable 
>>> entity.MyName with its object name of  "MyName"
>>> 
>>> // the object method
>>> a_test (OBJECT Get name(Object current))
>>> 
>>> // a_Test
>>> $ent:=OBJECT Get pointer(Object named;$1)-> $s:=$ent[$1]
>>> ALERT($s)  // the value entered into the text area
>>> 
>>> Keith - CDI
>>> 
>>>> On Apr 30, 2020, at 2:54 PM, Chris Belanger via 4D_Tech 
>>>> <4d_tech@lists.4d.com> wrote:
>>>> 
>>>> I don’t wish to imply that I ‘prefer’ pointers; in fact, I am not using a 
>>>> single process variable, interprocess variable, or any other ‘vestiges’ of 
>>>> 4D Classic. I am ‘fully committed’ to object notation. I also use Storage 
>>>> extensively for system-wide values, and really love it.
>>>> The problem I describe is that I need a way to generically ‘get’ and ’set’ 
>>>> the value of an object (meaning an entry variable on the form).
>>>> 
>>>> 1) A variable is placed on the form. It’s “variable or expression” is:
>>>> Form.LB.Browser_JobForms.en_edit.RigFrom.  It has an object name of  
>>>> “enLSDFromRigDispatch”
>>>> 
>>>> I have given it this name because it gives me a simple methodology to 
>>>> SHOW/HIDE a whole group of objects on the screen with OBJECT SET 
>>>> VISIBLE(*; “enLSD@“;…)
>>>> 
>>>> Now I wish to use a standard project method to ‘pretty-format’ this 
>>>> variable.
>>>> With ‘4D Classic’ this is easily achieved by making a project method that 
>>>> takes a POINTER in $1. 
>>>> The OBJECT SCRIPT would be something simple, like:   
>>>> PRETTY_FORMAT(Self)
>>>> [PRETTY_FORMAT, given Self, would be able to get at the CONTENTS of 
>>>> the variable and do any formatting options needed]
>>>> 
>>>> With ‘4D DOT NOTATION’ …
>>>> —  How do I create a simple OBJECT SCRIPT that would do something 
>>>> similar to that in 4D Classic?  — I don’t feel that I should have to 
>>>> resort to using the ‘variable or expression’ name in every single script; 
>>>> becaus

Re: Object notation replacement for use of Self in a script — v18

2020-04-30 Thread kculotta via 4D_Tech
18.1

The pointer OBJECT Get name(Object current) is to the entity instead of the to 
the entity attribute.

The field is eg, MyEntity.MyName, but the pointer to the form object ends up 
being ->MyEntity

> On Apr 30, 2020, at 3:52 PM, lists via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Sorry, Are you saying that you can get a valid pointer with Object get 
> pointer() on a dot notation object of a form?, if so what version?
> 
> Lahav
> 
> -Original Message-
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of kculotta via 4D_Tech
> Sent: Thursday, April 30, 2020 2:50 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: kculotta 
> Subject: Re: Object notation replacement for use of Self in a script — v18
> 
> Yes, I'm using it, but it really seems like an artificial way to get an 
> entity field's displayed contents.
> 
> I'll explore your example.
> 
> Keith - CDI
> 
>> On Apr 30, 2020, at 3:45 PM, lists via 4D_Tech <4d_tech@lists.4d.com> wrote:
>> 
>> Did you actually test this?, any kind of a get pointer on a form object 
>> having a dot notation source will return a Nil pointer, regardless of the 
>> name matching or not.
>> 
>> If you are using matched names, you could use the following:
>> 
>> Form[Object get name(object current)]:=DoWhatever(Form[Object get 
>> name(object current)])
>> 
>> But that is not quite what we need to be truly generic
>> 
>> Lahav
>> 
>> -Original Message-
>> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of kculotta via 
>> 4D_Tech
>> Sent: Thursday, April 30, 2020 2:29 PM
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Cc: kculotta 
>> Subject: Re: Object notation replacement for use of Self in a script — 
>> v18
>> 
>> This example does not avoid having to carefully name form objects and the 
>> form object must have "matching" variable and object names: variable 
>> entity.MyName with its object name of  "MyName"
>> 
>> // the object method
>> a_test (OBJECT Get name(Object current))
>> 
>> // a_Test
>> $ent:=OBJECT Get pointer(Object named;$1)-> $s:=$ent[$1]
>> ALERT($s)  // the value entered into the text area
>> 
>> Keith - CDI
>> 
>>> On Apr 30, 2020, at 2:54 PM, Chris Belanger via 4D_Tech 
>>> <4d_tech@lists.4d.com> wrote:
>>> 
>>> I don’t wish to imply that I ‘prefer’ pointers; in fact, I am not using a 
>>> single process variable, interprocess variable, or any other ‘vestiges’ of 
>>> 4D Classic. I am ‘fully committed’ to object notation. I also use Storage 
>>> extensively for system-wide values, and really love it.
>>> The problem I describe is that I need a way to generically ‘get’ and ’set’ 
>>> the value of an object (meaning an entry variable on the form).
>>> 
>>> 1) A variable is placed on the form. It’s “variable or expression” is:
>>> Form.LB.Browser_JobForms.en_edit.RigFrom.  It has an object name of  
>>> “enLSDFromRigDispatch”
>>> 
>>> I have given it this name because it gives me a simple methodology to 
>>> SHOW/HIDE a whole group of objects on the screen with OBJECT SET 
>>> VISIBLE(*; “enLSD@“;…)
>>> 
>>> Now I wish to use a standard project method to ‘pretty-format’ this 
>>> variable.
>>> With ‘4D Classic’ this is easily achieved by making a project method that 
>>> takes a POINTER in $1. 
>>> The OBJECT SCRIPT would be something simple, like:   
>>> PRETTY_FORMAT(Self)
>>> [PRETTY_FORMAT, given Self, would be able to get at the CONTENTS of 
>>> the variable and do any formatting options needed]
>>> 
>>> With ‘4D DOT NOTATION’ …
>>> —  How do I create a simple OBJECT SCRIPT that would do something 
>>> similar to that in 4D Classic?  — I don’t feel that I should have to resort 
>>> to using the ‘variable or expression’ name in every single script; because 
>>> what happens if I change that variable for some reason and it totally 
>>> screws up the object script? And it also makes it very complicated.
>>> THE OBJECT METHOD should be something as simple as:
>>> PRETTY_FORMAT ( Object Get Name )—— instead of Self
>>> 
>>> The PRETTY_FORMAT( ) should be able to get at and set the value of the form 
>>> object from that name.
>>> 
>>> Alternatively, if one wants to not bother having scripts for every input 
>>> variable that needs PRETTY_FORMAT, they could just do

Re: Object notation replacement for use of Self in a script — v18

2020-04-30 Thread kculotta via 4D_Tech
Yes, I'm using it, but it really seems like an artificial way to get an entity 
field's displayed contents.

I'll explore your example.

Keith - CDI

> On Apr 30, 2020, at 3:45 PM, lists via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Did you actually test this?, any kind of a get pointer on a form object 
> having a dot notation source will return a Nil pointer, regardless of the 
> name matching or not.
> 
> If you are using matched names, you could use the following:
> 
> Form[Object get name(object current)]:=DoWhatever(Form[Object get name(object 
> current)])
> 
> But that is not quite what we need to be truly generic
> 
> Lahav
> 
> -Original Message-
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of kculotta via 4D_Tech
> Sent: Thursday, April 30, 2020 2:29 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: kculotta 
> Subject: Re: Object notation replacement for use of Self in a script — v18
> 
> This example does not avoid having to carefully name form objects and the 
> form object must have "matching" variable and object names: variable 
> entity.MyName with its object name of  "MyName"
> 
> // the object method
> a_test (OBJECT Get name(Object current))
> 
> // a_Test
> $ent:=OBJECT Get pointer(Object named;$1)-> $s:=$ent[$1]
> ALERT($s)  // the value entered into the text area
> 
> Keith - CDI
> 
>> On Apr 30, 2020, at 2:54 PM, Chris Belanger via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I don’t wish to imply that I ‘prefer’ pointers; in fact, I am not using a 
>> single process variable, interprocess variable, or any other ‘vestiges’ of 
>> 4D Classic. I am ‘fully committed’ to object notation. I also use Storage 
>> extensively for system-wide values, and really love it.
>> The problem I describe is that I need a way to generically ‘get’ and ’set’ 
>> the value of an object (meaning an entry variable on the form).
>> 
>> 1) A variable is placed on the form. It’s “variable or expression” is:
>> Form.LB.Browser_JobForms.en_edit.RigFrom.  It has an object name of  
>> “enLSDFromRigDispatch”
>> 
>> I have given it this name because it gives me a simple methodology to 
>> SHOW/HIDE a whole group of objects on the screen with OBJECT SET 
>> VISIBLE(*; “enLSD@“;…)
>> 
>> Now I wish to use a standard project method to ‘pretty-format’ this variable.
>> With ‘4D Classic’ this is easily achieved by making a project method that 
>> takes a POINTER in $1. 
>> The OBJECT SCRIPT would be something simple, like:   
>> PRETTY_FORMAT(Self)
>> [PRETTY_FORMAT, given Self, would be able to get at the CONTENTS of 
>> the variable and do any formatting options needed]
>> 
>> With ‘4D DOT NOTATION’ …
>> —  How do I create a simple OBJECT SCRIPT that would do something 
>> similar to that in 4D Classic?  — I don’t feel that I should have to resort 
>> to using the ‘variable or expression’ name in every single script; because 
>> what happens if I change that variable for some reason and it totally screws 
>> up the object script? And it also makes it very complicated.
>> THE OBJECT METHOD should be something as simple as:
>> PRETTY_FORMAT ( Object Get Name )—— instead of Self
>> 
>> The PRETTY_FORMAT( ) should be able to get at and set the value of the form 
>> object from that name.
>> 
>> Alternatively, if one wants to not bother having scripts for every input 
>> variable that needs PRETTY_FORMAT, they could just do it in the FORM METHOD:
>> Case of
>> :( Form event code = on load ) 
>>  Form.col_toPrettyFormat:= new collection ( Object Name 1, Object Name 2 
>> ) …  // objects that need to be ‘Pretty Formatted'
>> 
>> : ( Form event code = on losing focus )
>>  $curObjectName:= Form Event.objectName
>>  … see if is in the list of .col_toPrettyFormat …
>>  PRETTY_FORMAT( $curObjectName )
>> 
>> …
>> 
>> So how would one implement something like:
>>  PRETTY FORMAT ( Object Get Name ) in a script; or   PRETTY FORMAT ( 
>> Form Event.objectName )
>> ???
>> 
>> Thanks,
>> Chris
>> 
>> p.s. what you describe, Keisuke, is in 4D v18r3; the ability to create 
>> classes. That is very intriguing and a necessary development in 4D, as is 
>> C_VARIANT( ).
>> If one wanted to be able to have the script be:
>> 
>> (Object get name).prettyFormatHow would that be achieved?
>> 
>> Even if in the script one could use “This”, but it is null.
>> I think that ’This’ should be perfect

Re: Object notation replacement for use of Self in a script — v18

2020-04-30 Thread kculotta via 4D_Tech
Is there a "Get edited text without having to type anything first" kind of 
function.  
Does an entry area have an Object that contains its type and contents?

> On Apr 30, 2020, at 2:58 PM, Chris Belanger via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Exactly … that is my question. — Chris
> 
>> On Apr 29, 2020, at 11:15 AM, lists via 4D_Tech <4d_tech@lists.4d.com> wrote:
>> 
>> OK, so can we get a real example of how to replace the *old* way with the 
>> new?  In a case where there are several entry objects:
>> 
>> Form.Name
>> Form.Address
>> Form.Note
>> 
>> I want to enforce a proper uppercase/lowercase on all three, so in the old 
>> days I created an object, set the method to "UpperLower(self)", duplicated 
>> it three times, change the object name and I'm done.  For simplicity sake, 
>> lets say that UpperLower simply do $1->:=Uppercase($1->).
>> 
>> How would you do the same while using object notation instead of a variable, 
>> dynamic or not?
>> 
>> Thanks,
>> 
>> Lahav
>> 
>> 
>> -Original Message-
>> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Keisuke Miyako via 
>> 4D_Tech
>> Sent: Wednesday, April 29, 2020 10:14 AM
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Cc: Keisuke Miyako 
>> Subject: Re: Object notation replacement for use of Self in a script — v18
>> 
>> my feeling is that generic coding is very much possible in object notation, 
>> but we need to accept that the approach is different.
>> 
>> if you prefer to use pointers such as "Self", I think it's best to avoid 
>> object notation, at least if your goal is to make the code generic.
>> 
>> it's not a defect of object notation,
>> but the way to write generic code is different.
>> 
>> if you want to make your code generic in object notation, I think you need 
>> to fully commit.
>> 
>> what I mean by that, is that you need to think of objects and classes, 
>> properties and methods.
>> 
>> basically, instead of
>> 
>> doIt(Self)
>> 
>> you would write
>> 
>> $obj.doIt()
>> 
>> where the doIt() formula works on "This".
>> 
>> in my opinion, to take full advantage of object notation, it is pretty much 
>> mandatory to use 
>> 
>> This
>> Signal
>> Formula
>> Form
>> 
>> extensively, as well as 
>> 
>> Storage
>> New shared object
>> New shared collection
>> 
>> strategically.
>> 
>> simply replacing interprocess/process variables with object notation, may 
>> semantically look like object based coding, but at that level you may be 
>> losing major advantages of classic code, while not gaining much from what 
>> the new way of coding has to offer.
>> 
>>> On Apr 29, 2020, at 14:55, Chris Belanger via 4D_Tech 
>>> <4d_tech@lists.4d.com> wrote:
>>> And v18r3 does not even have a solution to this in its documentation.
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> 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)
>> 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)
> 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)
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: Object notation replacement for use of Self in a script — v18

2020-04-30 Thread kculotta via 4D_Tech
This example does not avoid having to carefully name form objects and
the form object must have "matching" variable and object names: variable 
entity.MyName with its object name of  "MyName"

// the object method
a_test (OBJECT Get name(Object current))

// a_Test
$ent:=OBJECT Get pointer(Object named;$1)->
$s:=$ent[$1]
ALERT($s)  // the value entered into the text area

Keith - CDI

> On Apr 30, 2020, at 2:54 PM, Chris Belanger via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I don’t wish to imply that I ‘prefer’ pointers; in fact, I am not using a 
> single process variable, interprocess variable, or any other ‘vestiges’ of 4D 
> Classic. I am ‘fully committed’ to object notation. I also use Storage 
> extensively for system-wide values, and really love it.
> The problem I describe is that I need a way to generically ‘get’ and ’set’ 
> the value of an object (meaning an entry variable on the form).
> 
> 1) A variable is placed on the form. It’s “variable or expression” is:
> Form.LB.Browser_JobForms.en_edit.RigFrom.  It has an object name of  
> “enLSDFromRigDispatch”
> 
> I have given it this name because it gives me a simple methodology to 
> SHOW/HIDE a whole group of objects on the screen with OBJECT SET VISIBLE(*; 
> “enLSD@“;…)
> 
> Now I wish to use a standard project method to ‘pretty-format’ this variable.
> With ‘4D Classic’ this is easily achieved by making a project method that 
> takes a POINTER in $1. 
> The OBJECT SCRIPT would be something simple, like:   
> PRETTY_FORMAT(Self)
> [PRETTY_FORMAT, given Self, would be able to get at the CONTENTS of the 
> variable and do any formatting options needed]
> 
> With ‘4D DOT NOTATION’ …
> —  How do I create a simple OBJECT SCRIPT that would do something similar to 
> that in 4D Classic?  —
> I don’t feel that I should have to resort to using the ‘variable or 
> expression’ name in every single script; because what happens if I change 
> that variable for some reason and it totally screws up the object script? And 
> it also makes it very complicated.
> THE OBJECT METHOD should be something as simple as:
> PRETTY_FORMAT ( Object Get Name )—— instead of Self
> 
> The PRETTY_FORMAT( ) should be able to get at and set the value of the form 
> object from that name.
> 
> Alternatively, if one wants to not bother having scripts for every input 
> variable that needs PRETTY_FORMAT, they could just do it in the FORM METHOD:
> Case of
> :( Form event code = on load ) 
>   Form.col_toPrettyFormat:= new collection ( Object Name 1, Object Name 2 
> ) …  // objects that need to be ‘Pretty Formatted'
> 
> : ( Form event code = on losing focus )
>   $curObjectName:= Form Event.objectName
>   … see if is in the list of .col_toPrettyFormat …
>   PRETTY_FORMAT( $curObjectName )
> 
> …
> 
> So how would one implement something like:
>   PRETTY FORMAT ( Object Get Name ) in a script; or   PRETTY FORMAT ( 
> Form Event.objectName )
> ???
> 
> Thanks,
> Chris
> 
> p.s. what you describe, Keisuke, is in 4D v18r3; the ability to create 
> classes. That is very intriguing and a necessary development in 4D, as is 
> C_VARIANT( ).
> If one wanted to be able to have the script be:
> 
> (Object get name).prettyFormatHow would that be achieved?
> 
> Even if in the script one could use “This”, but it is null.
> I think that ’This’ should be perfectly valid to use in an OBJECT SCRIPT, in 
> a TRIGGER (referring to the record/entity being operated on), etc. But it is 
> not, and I have trouble understanding why not.
> 
> 
> 
> 
>> On Apr 29, 2020, at 10:14 AM, Keisuke Miyako via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> my feeling is that generic coding is very much possible in object notation, 
>> but we need to accept that the approach is different.
>> 
>> if you prefer to use pointers such as "Self", 
>> I think it's best to avoid object notation, 
>> at least if your goal is to make the code generic.
>> 
>> it's not a defect of object notation, 
>> but the way to write generic code is different.
>> 
>> if you want to make your code generic in object notation, 
>> I think you need to fully commit.
>> 
>> what I mean by that, is that you need to think of objects and classes, 
>> properties and methods.
>> 
>> basically, instead of
>> 
>> doIt(Self)
>> 
>> you would write
>> 
>> $obj.doIt()
>> 
>> where the doIt() formula works on "This".
>> 
>> in my opinion, to take full advantage of object notation, 
>> it is pretty much mandatory to use 
>> 
>> This
>> Signal
>> Formula
>> Form
>> 
>> extensively, as well as 
>> 
>> Storage
>> New shared object
>> New shared collection
>> 
>> strategically.
>> 
>> simply replacing interprocess/process variables with object notation,
>> may semantically look like object based coding, 
>> but at that level you may be losing major advantages of classic code,
>> while not gaining much from what the new way of coding has to offer.
>> 
>>> On Apr 29, 2020, at 14:55, Chris Belanger via 4D_Tech 
>>> <4d_tech@

Re: With v18r2, can 4D display pdf documents?

2020-04-21 Thread kculotta via 4D_Tech
This worked after adding the third /  WA OPEN URL(*;"wa";"file:///Test.pdf")

> On Apr 21, 2020, at 10:36 AM, kculotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> No one mentioned WA OPEN URL and a web area, which I thought would have been 
> as easy as WA OPEN URL(*;"wa";"Test.pdf"), but that only resulted in a blank 
> area.
> When I did get a pdf to open in the web area, all pages were available.
> Is that different than what you are asking?
> 
> Keith - CDI
> 
>> On Apr 21, 2020, at 12:14 AM, Chris Belanger via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Is there a way in 4D to display PDF documents? Either natively inside it 
>> [with a plug-in, web thingy or otherwise] or by showing in a system pdf 
>> viewer?
>> **
>  

**
4D Internet Users Group (4D iNUG)
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: With v18r2, can 4D display pdf documents?

2020-04-21 Thread kculotta via 4D_Tech
No one mentioned WA OPEN URL and a web area, which I thought would have been as 
easy as WA OPEN URL(*;"wa";"Test.pdf"), but that only resulted in a blank area.
When I did get a pdf to open in the web area, all pages were available.
Is that different than what you are asking?

Keith - CDI

> On Apr 21, 2020, at 12:14 AM, Chris Belanger via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Is there a way in 4D to display PDF documents? Either natively inside it 
> [with a plug-in, web thingy or otherwise] or by showing in a system pdf 
> viewer?
> **

**
4D Internet Users Group (4D iNUG)
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: Where Are All The Steppers And Spinners?

2020-04-02 Thread kculotta via 4D_Tech
Just in case you did not see it, a Stepper and a Spinner are available in the 
Object Library of the "classic" mode.

Keith - CDI

> On Apr 1, 2020, at 4:41 PM, Allan Udy via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> A bit gutted that we're not in Chicago right now meeting some of you, but hey 
> what can you do -- it's a changing world!
> 
> Anyway, here's a question for you to ponder regarding the new Stepper and 
> Spinner objects (https://kb.4d.com/assetid=78429)...
> 
> Any ideas why I cannot see either the Spinner or Stepper in my copy of 4D 
> v18.1?  All I'm seeing is Progress Indicator, Dial and Ruler
> 
> I looked for the Spinner a while back in 18.0, and couldn't find it, but at 
> the time just ignored the fact that it was missing.
> 
> I would like to use a Stepper though, if I can find it.  ;-)
> 
> Hope you're all staying well.
> 
> Cheers,
> Allan Udy
> 
> Golden Micro Solutions Ltd, Blenheim, New Zealand
> http://www.golden.co.nz
> 

**
4D Internet Users Group (4D iNUG)
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: Display entity selection time fields in a list box?

2020-03-27 Thread kculotta via 4D_Tech
Would this affect the display?  
https://doc.4d.com/4Dv18/4D/18/Database-Parameters.302-4504404.en.html section 
"Times inside objects "

> On Mar 27, 2020, at 11:51 AM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I'm replacing some record based list boxes with entity selection list boxes. 
> I want to see HH MM SS format which was easy and the default with selection 
> list boxes. But since ORDA treats time as a number, the only way I see to do 
> that is to wrap the field property path with the Time function, e.g. 
> Time(This.time_field). Without that, any time format set with OBJECT SET 
> FORMAT just displays the number of seconds.
> 
> Is this really the only way to display time fields or have I missed 
> something? Seems like a step backwards. I'm using 18.1 Mac.
> 
> John DeSoi, Ph.D.
> 

**
4D Internet Users Group (4D iNUG)
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: Remote working with 4D networks - what are people using ?

2020-03-19 Thread kculotta via 4D_Tech
I remember connecting a terminal to the serial port on Apple's Lisa, and 
running a second user.  We must have installed Unix or Xenix at the time.  
Aren't "terminal services" already a part of Unix (or macOS)?  I put that in 
quotes because, apart form being a terminal services user on occasion, I am not 
familiar with the workings of it.

Keith - CDI

> On Mar 19, 2020, at 10:19 AM, James Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On Mar 19, 2020, at 11:13 AM, Herr Alexander Heintz via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
>> 
>> AFAIK the MacOS cannot be changed to allow multiple concurrent user sessions 
>> on one Computer, the OS simply lacks the necessary tools to do it.
>> When you switch users on a Mac, you need to first switch off the user you 
>> are currently logged in to.
> 
> When I screen share to Macs and another user is logged in, I am always given 
> the option to share that user’s screen or log in as myself. Logging in as 
> myself creates a virtual instance and allows me to use that machine without 
> disturbing anyone who maybe be sitting at the machine or screen sharing. It 
> has been this way since at least macOS 10.10. 
> 
> Jim Crate
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
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: barcode

2020-03-18 Thread kculotta via 4D_Tech
This is a good place to look: 
https://github.com/miyako?tab=repositories&q=zint&type=&language=

> On Mar 18, 2020, at 5:53 AM, stardata.info via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> Someone know how print bar codes in 4D?
> Now i use a font.
> 
> Thanks
> 
> /Ferdinando/

**
4D Internet Users Group (4D iNUG)
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: Use Named Selection Unexpectedly Loads First Record of Named Selection

2020-03-13 Thread kculotta via 4D_Tech
An unloaded record can still be the current record.

also

ALL RECORDS([RecipeRec]) // has current record
LAST RECORD([RecipeRec]) // has current record
NEXT RECORD([RecipeRec]) // no current record
.
.
.
USE NAMED SELECTION("ASD")  // no current record

> On Mar 13, 2020, at 8:05 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> and I would read into that - IF there is no selected record, the command will 
> load the First Record
> 
> Chip
> 
> 
>> Hi Douglas
>> 
>> 
>> Doc says:
>> When you create a named selection, the current record is “remembered” by the
>> named selection. USE NAMED SELECTION retrieves the position of this record
>> and makes the record the new current record; this command loads the current
>> record.
>> 
>> In your example, the first record is the "current record". So for me, it
>> works like it should be.
>> 
>> Patrick
>> 
>> 
>> 
>> -
>> Patrick EMANUEL
>>  

**
4D Internet Users Group (4D iNUG)
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: Use Named Selection Unexpectedly Loads First Record of Named Selection

2020-03-12 Thread kculotta via 4D_Tech
It works just as you described in v18 Mac too.
If you put NEXT RECORD after ALL RECORDS, that second record is later restored.

Keith - CDI

> On Mar 12, 2020, at 3:10 PM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 4D 17R6 on Windows.
> 
> ALL RECORDS([People])
> //Lots of records in the current selection
> //There is a current record
> 
> UNLOAD RECORD([People])
> //Lots of records in the current selection
> //There is no current record
> 
> COPY NAMED SELECTION([People];"ASD")
> //Lots of records in the current selection
> //There is no current record
> 
> QUERY([People];[People]SSAN="8675309”)
> //No record found
> //There is no current selection
> //There is no current record
> 
> USE NAMED SELECTION("ASD”)
> //Lots of records in the current selection
> //There is a current record
> 
> CLEAR NAMED SELECTION("ASD")
> //Lots of records in the current selection
> //There is a current record
> 
> I wasn’t expecting a Use named selection to load a record.
> 
> Has anyone else experienced this? It is reproducible?
> 
> --
> Douglas von Roeder
> 949-910-4084 
**
4D Internet Users Group (4D iNUG)
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: ds.Table.query() field not available

2020-03-10 Thread kculotta via 4D_Tech
You were not hallucinating.  When a field name is changed in the structure, the 
app must be restarted for the change to be recognized.

Keith - CDI

> On Mar 10, 2020, at 3:17 PM, Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Ok. I guess I was hallucinating or something. It works today with one 
> exception. If I change the name of a field (to remove spaces in field 
> names…..), the new field name doesn’t work in an orda query. I get this error:
> 
> The "Account_Name" attribute cannot be found in The "Deposits" datastore class
> 
> This is where I have to reboot the server as the only way to update the 
> datastore, right?
> 
> Thanks for the list of possible errors and troubleshooting options Miyako. I 
> will use them!
> 
> Sannyasin Siddhanathaswami
> On Mar 9, 2020, 6:47 PM -1000, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com>, wrote:
> Hello,
> 
> When I do a ds.Table.query() using a field/attribute of a non-indexed field, 
> I get an error.
> 
> that has not been my experience.
> v18, Client/Server, non-indexed field, ORDA query has always worked just fine.
> 
> ---
> 
> are sure definitely sure that indexing is causing the problem?
> 
> for instance, could it be that the table does not have a primary key?
> what is the field type? is it an object?
> what does the query string look like?
> does it include "linked" queries? (e.g. attr[a].attr = :1 and attr[a].prop = 
> :2)
> can you reproduce the problem on a fresh DB?
> 
> Of course, I can add an index, but then I seem to have restart the server for 
> it to work. This is super inconvenient, obviously and in may cases not 
> possible at that moment. Is there a command to run that reloads whatever list 
> the ds.Table.query() uses to find field/attributes? Or Should I just index 
> all fields? What do you all do?
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
> 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)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Listbox arrow navigation - line 1

2020-03-06 Thread kculotta via 4D_Tech
This code will make line1 of the listbox highlighted. Pressing the down arrow 
moves the highlight to row #2.
: (Form event code=On Load)
ARRAY TEXT(A1;5)
GOTO OBJECT(*;"ListBox")
LISTBOX SELECT ROW(*;"ListBox";1)

This code does the same thing, except pressing the down arrow the first time 
has no apparent effect.
Pressing it a second time moves the cursor down as expected.
(btw, first pressing the up arrow key highlights the last populated line)
An entity selection listbox has the same behavior.
ALL RECORDS([Client])
GOTO OBJECT(*;"ListBox")
LISTBOX SELECT ROW(*;"ListBox";1)
GOTO SELECTED RECORD([Client];1)

Adding the line "POST KEY(Down arrow key)" is one way to solve the problem for 
the user.
Is there a less tricky way to fix that first down arrow behavior?

Thanks,
Keith
**
4D Internet Users Group (4D iNUG)
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: SVG Eetracted to clip or png

2020-02-28 Thread kculotta via 4D_Tech
Try using SVG_Add_object ($svgOtherDocRef;$groupRef) to get the group into the 
other svg document.

Keith - CDI

> On Feb 28, 2020, at 10:07 AM, John J Foster via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi All,
> 
> I have an SVG Doc which contains many  grouped objects. Each group has a 
> unique ID (name).
> 
> Sometimes I’d like to click on a part of the document, corresponding to a 
> grouped object, and have it sent to the clipboard or saved as a png. Just the 
> part of the document clicked on.
> 
> Is there a technique to easily extract a  object into it’s own SVG doc so 
> I can save just the selected group as an png?
> 
> Yes, I could redraw each object that was selected but like to save that time 
> if it’s possible.
> 
> Thanks,
> John…
> 

**
4D Internet Users Group (4D iNUG)
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: SVG_New_textArea OR SVG_New_tspan

2020-02-28 Thread kculotta via 4D_Tech
John,

I find textAreas easier to work with for those purposes.  The only drawback is 
that the textArea is not supported by some browsers.  I'll see some documents 
appear without their text in Safari when textArea is being used.

Keith - CDI

> On Feb 28, 2020, at 10:18 AM, John J Foster via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi All,
> 
> 4D v17 (mac and windows)
> 
> In my current need I have been creating text by looping though an array and 
> then creating each text line individually and placing each new line below the 
> one previously created. This works fine.
> 
> But there are scenarios where I would be easier to manage a series of text as 
> a single object (SVG_New_textArea OR SVG_New_tspan) and then place it 
> centered horizontally/vertically at a point on the doc.
> 
> For example placing centered lines of text within a circle and having it 
> perfectly centered both horizontally and vertically.
> 
> Before I rewrite code I’d like to make sure that I am conceiving the problem 
> correctly. And then using the correct SVG command.
> 
> Anyone with experience who has used SVG_New_textArea OR SVG_New_tspan? Are 
> they the “ideal" way to move forward?
> 
> Thanks,
> John…
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
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: Subform & outside information

2020-02-27 Thread kculotta via 4D_Tech
Thanks Jeremy, I did not use the word "container" in my searches yesterday, and 
they landed all around it.

Keith

> On Feb 27, 2020, at 3:21 AM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Keith,
> 
> OBJECT GET SUBFORM CONTAINER SIZE
> 
> https://doc.4d.com/4Dv18/4D/18/OBJECT-GET-SUBFORM-CONTAINER-SIZE.301-4505436.en.html
>  
> <https://doc.4d.com/4Dv18/4D/18/OBJECT-GET-SUBFORM-CONTAINER-SIZE.301-4505436.en.html>
> 
> Jeremy
> 
>> On 26 Feb 2020, at 20:51, kculotta via 4D_Tech <4d_tech@lists.4d.com> wrote:
>> 
>> In the context of a form, we can know the width and height of a subform 
>> within it.  Has a way been introduced for an object inside the subform to 
>> know those dimensions using only its own methods, without outside help?
>> 
>> Thanks,
>> 
>> Keith - CDI
> **
> 4D Internet Users Group (4D iNUG)
> 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)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Subform & outside information

2020-02-26 Thread kculotta via 4D_Tech
In the context of a form, we can know the width and height of a subform within 
it.  Has a way been introduced for an object inside the subform to know those 
dimensions using only its own methods, without outside help?

Thanks,

Keith - CDI
**
4D Internet Users Group (4D iNUG)
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: Bar code

2020-02-21 Thread kculotta via 4D_Tech
Testing that - the barcode does not appear in the picture.  

$sheet:="ViewProArea"
VP NEW DOCUMENT ($sheet)
VP SET TEXT VALUE (VP Cell ($sheet;0;1);"BC123456")
VP SET FORMULA (VP Cell ($sheet;0;0);"=BC_QRCODE(A2)")
$obj:=VP Get value (VP Cell ($sheet;0;0))

$vpAreaObj:=VP Export to object ($sheet)
$pic:=VP Convert to picture ($vpAreaObj)  //;VP Cell ($vpAreaObj;0;0))  // 
trying to get the cell pic => error

SET PICTURE TO PASTEBOARD($pic) // the text appears, but not the picture.


> On Feb 21, 2020, at 3:22 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 4D View Pro is implemented in a CEF web area.
> its functions are written in JavaScript.
> you can't invoke them without a running form.

**
4D Internet Users Group (4D iNUG)
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: Bar code

2020-02-21 Thread kculotta via 4D_Tech
I am not familiar enough with View Pro not to ask, but is there a way to access 
these functions from a regular 4D method?
Something like $var:=Formula(BC_QRCODE("BarCodeMe"))?

Thanks,

Keith

> On Feb 21, 2020, at 12:45 PM, Tai Bui via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> Just another tip:
> It might be a little overkill in some cases, but 4D View Pro has built-in 
> formulas to convert a value to a barcode and qr codes.
> 
> The formulas start with "=BC_CO..." for most of the bar codes and 
> "=BC_QRCODE()" for the qrcode.
> 
> More information on the 11 types:
> https://www.grapecity.com/demos/spread/JS/TutorialSample/Features/BarCode/basicBarCode/purejs
> 
> Best Regards,
> -Tai B.
> 
> -----Original Message-
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of kculotta via 4D_Tech
> Sent: Friday, February 21, 2020 10:37 AM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: kculotta 
> Subject: Re: Bar code
> 
> If anyone did download that example at http://cdinc.co/Updates/BC128.zip 
> <http://cdinc.co/Updates/BC128.zip>, that last line of the BC128 method 
> should read "$0:=pattern_toPic ($pattern)"
> Apologies,
> 
> Keith
> 
>> On Feb 21, 2020, at 10:47 AM, Chuck Miller via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> 
>> Hi all. 
>> 
>> I had thought there was a tech note or something on how to draw bar codes in 
>> 4D using bag area. Can someone point me the the right direction
>> 
>> Thanks and regards 
>> Chuck
>> Sent from my iPhone 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
> 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)
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: Bar code

2020-02-21 Thread kculotta via 4D_Tech
If anyone did download that example at http://cdinc.co/Updates/BC128.zip 
, that last line of the BC128 method should 
read "$0:=pattern_toPic ($pattern)"
Apologies,

Keith

> On Feb 21, 2020, at 10:47 AM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
> Hi all. 
> 
> I had thought there was a tech note or something on how to draw bar codes in 
> 4D using bag area. Can someone point me the the right direction
> 
> Thanks and regards 
> Chuck
> Sent from my iPhone 
**
4D Internet Users Group (4D iNUG)
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: Bar code

2020-02-21 Thread kculotta via 4D_Tech
I just got started on this to explore the same thing.  If it helps... 
http://cdinc.co/Updates/BC128.zip

There is a very good plugin for all kinds of barcode production at 
https://github.com/miyako/4d-plugin-barcode 


Keith

> On Feb 21, 2020, at 10:47 AM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
> Hi all. 
> 
> I had thought there was a tech note or something on how to draw bar codes in 
> 4D using bag area. Can someone point me the the right direction
> 
> Thanks and regards 
> Chuck
> Sent from my iPhone 

**
4D Internet Users Group (4D iNUG)
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: Write failed

2020-02-11 Thread kculotta via 4D_Tech
Ditto in the Mac world.  If an AirPort, Time Capsule, or router gets modified 
and updated a temporary interruption can occur.  Problems with wiring or 
wireless signal can be a culprit too.

Keith

> On Feb 11, 2020, at 12:02 PM, Stephen J. Orth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Gary,
> 
> There could be multiple reasons for this error, but in our world (windows) it 
> typically means something interfered with your connection to the Server.  For 
> example, the port was closed on the network, or something cause the network 
> to hiccup.
> 
> 
> Steve
> 
> 
> -Original Message-
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Gary Boudreaux via 
> 4D_Tech
> Sent: Tuesday, February 11, 2020 11:39 AM
> To: 4d_tech@lists.4d.com
> Cc: Gary Boudreaux <4dli...@vistaservices.com>
> Subject: Write failed
> 
> My client is running 4D Server/Client v16 64-bit. They are occasionally 
> getting an error dialog that says: Write failed. Connection error with the 
> server. Please restart the application.
> 
> I had them to add memory to the Mac Mini, but the error persists (sometimes). 
> Has anyone seen this error? Any idea what could cause this?
> 

**
4D Internet Users Group (4D iNUG)
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: ORDA RELATE MANY SELECTION

2019-12-06 Thread kculotta via 4D_Tech
Kirk,

"Just like magic" was my reply to Neil.  ORDA is proving to offer more 
efficiencies than the classic way.

The input and output forms, not so much the brain, are starting from scratch 
with ORDA.  The code in the example is in a text object sitting above an entity 
listbox on the form.  "Self" was changed to "Get Edited Text" so the listbox 
changes after each keystroke, and ended up with this:

Case of 
: (Form event code=On After Edit)
$text:=Get edited text
If ($text#"")
$obj:=New 
object("$wordList";$text;"$fieldName";"Name";"$tableName";"Client")
$ents:=ORDA_WordQuery ($obj) // returns an entity 
selection, match if field contains all @words@
If ($ents#Null)
ents:=$ents.r_Contracts
End if 
End if 
End case 
// The ents entity selection is Contracts.  $ents is a Client entity selection. 
 The text entry area expects a Client name.


ORDA handles the problems solved by SET AUTOMATIC RELATIONS in both the input 
and output forms really well.  It is also flexible in terms of writing generic 
code.  You are right about pointers not being useful when trying to point to 
parts of an Entity.  

Christian, 
in your example:
  $clients:=ds.Client.query("Name = :1";"@"+Self->+"@")
  $contracts:=$clients.Contracts
is ".Contracts" meant to be the Table's name or is it meant to be the Link's 
name?

Thanks, Keith - CDI

> On Dec 6, 2019, at 10:04 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Keith,
> Neil is dead on in the case of RELATE MANY - you can access this directly
> from the entity via the name of the relation. But you are asking about
> RELATE MANY SELECTION where you have a selection of one-records and you
> want a selection of all the many-records.
> 
> Your example works fine - though you don't need the step of converting to
> and from the array:
> 
> $clients:=ds.Client.query("Name = :1";"@"+Self->+"@")
> $col:=$clients.distinct("PriKey")
> EntSel:=ds.Contract.query("to_Client IN :1";$col)
> 
> By definition the PriKey should be distinct already but there's no downside
> to the command and it will also work for non-distinct values so it's a good
> habit to develop.
> 
> I would shorten it to a single query line:
> 
> $col:=ds.Client.query("Name = :1";"@"+Self->+"@") .distinct("PriKey")
> EntSel:=ds.Contract.query("to_Client IN :1";$col)
> 
> 
> This doesn't throw an error if the query is empty. And it's two lines of
> code to replace 7.
> 
> I infer you are retro fitting this ORDA code into an existing form because
> of using Self and a process var for EntSel. My experience so far is this is
> the less optimal way to implement ORDA. First, classic 4D is probably doing
> just fine for this chore so carry on with what you've got. Introducing ORDA
> in cases like that usually don't work out great. Your example sort of makes
> this point - if you start thinking the way to solve an ORDA problem is to
> start converting back and forth between arrays you are probably missing
> something new you should be using.
> 
> For UI stuff like this that means the object referenced by Self will
> ultimately be better handled if you begin using Form. I like to start from
> scratch when  convert a form: make a new blank form. Copy in the most basic
> elements of it and learn to set it up using Form. You will know you're
> doing it right when you stop needing to rely on pointers (especially Self)
> and process variables to manage forms. I stress "rely on" here. Self is
> useful but if you are using ORDA it's the last resort, never the first.
> Process vars have a place but rarely - very rarely - for managing a modern
> 4D form. Learn to use Form instead.
> 
> Once you have the basics working, (opening, closing, moving around,
> populating static or semi static objects) start adding in the other
> functionality. As you do that think about what you trying to accomplish -
> what is goal and purpose of the list, listbox, subform, etc. you are adding
> in. And how do you accomplish that with ORDA. This is important because
> whatever that task is accomplishing it with ORDA will nearly always be a
> completely different workflow from accomplishing it in classic 4D. If you
> simply paste in what you've been doing it's not going to really change
> anything. And if you don't want to really change anything what's the point
> of

ORDA RELATE MANY SELECTION

2019-12-05 Thread kculotta via 4D_Tech
Hello,

RELATE MANY SELECTION is a convenient way to get a set of related many records.
Is there a more succinct or efficient ORDA method than the following to do the 
same thing?

  // get Contracts for a group of Clients
ARRAY TEXT($array;0)
C_COLLECTION($col)

$clients:=ds.Client.query("Name = :1";"@"+Self->+"@")  // get the clients
$col:=$clients.toCollection("PriKey")  // make a Collection of Client Primary 
Keys ("PriKey";"..Value..";"PriKey...)
COLLECTION TO ARRAY($col;$array;"PriKey")  // make it an array of Primary Keys
ARRAY TO COLLECTION($col;$array)  // back to a Collection of Text 
("..Value..";"..Value..")
EntSel:=ds.Contract.query("to_Client IN :1";$col)  // search in the Collection 

Thanks - Keith CDI
**
4D Internet Users Group (4D iNUG)
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: Dot notation in entry forms

2019-11-15 Thread kculotta via 4D_Tech
OK - Thanks

Keith - CDI

> On Nov 14, 2019, at 6:45 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> The short answer is no;
> 
> A pointer can only point to a variable, array, array element, table or field.
> An object property is none of the above, so it can not be referenced by a 
> pointer.
> 
> In general,
> 
> If you are going to make extensive use of OBJECT Get pointer, you should not 
> use the Form object.
> If you are going to make more use of the Form object, you should stop using 
> OBJECT Get pointer.
> 
> These are two different ways to accomplish the same thing,
> That is, dereference an object data source at runtime based on string.
> 
> You could either
> 
> OBJECT Get pointer (Object named; “foo”)->
> Where the form object is bound to a variable,
> 
> Or
> 
> Form.sources[“foo”].val (for example)
> Where the form object is bound to a property of the Form object 
> (Form.sources.foo.val)
> 
> It is pretty much mandatory to have a strict naming convention in object 
> based programming.
> 
>> 2019/11/15 5:30、kculotta via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> Is there another way to get the field's value? (v18 latest build)
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Dot notation in entry forms

2019-11-14 Thread kculotta via 4D_Tech

In an entry form with entry fields like entity.Name, entity.Address, etc...
When the cursor is in a field like entity.Address
$name:=OBJECT Get name(Object current) gets the form object's name, eg 
"text_Address", 
but OBJECT Get pointer(Object named;$name) always returns a pointer to entity 
(->entity),
so you could not get the length of the text in the field using Length(OBJECT 
Get pointer(Object named;$name)->)

Is there another way to get the field's value? (v18 latest build)

Thanks,

Keith

**
4D Internet Users Group (4D iNUG)
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: OBECT SET TABBABLE?

2019-11-14 Thread kculotta via 4D_Tech
Actually that done in this way
Case of 
: (Form event code=On Clicked)
OBJECT SET ENTERABLE(Self->;True)
HIGHLIGHT TEXT(*;OBJECT Get name(Object current);0;100)
: (FORM Event=On Losing Focus)
  // check if populated...
End case 
looks like a path there.

Thanks


> On Nov 14, 2019, at 12:08 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> ... although then of course you wouldn't be able to enter anything into it
> ... ):
> 
> On Thu, 14 Nov 2019 at 18:07, Pat Bensky  wrote:
> 
>> How about it you just make it non-enterable if it's not populated?
>> 
>> On Thu, 14 Nov 2019 at 17:25, kculotta via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>> 
>>> Is there a way to change the tabbable property of an object in an entry
>>> form using the language?
>>> It seems like "OBECT SET..." addresses almost every other property.
>>> I'd like to make a field tabbable if it is empty, and skip it when
>>> tabbing if it has a value (the easy way).
>>> 
>>> Thanks,
>>> 
>>> Keith - CDI
>>> **
>>> 4D Internet Users Group (4D iNUG)
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **
>> 
>> 
>> 
>> --
>> *
>> CatBase - Top Dog in Data Publishing
>> tel: +44 (0) 207 118 7889
>> w: http://www.catbase.com
>> skype: pat.bensky
>> *
>> 
> 
> 
> -- 
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> 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)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

OBECT SET TABBABLE?

2019-11-14 Thread kculotta via 4D_Tech
Is there a way to change the tabbable property of an object in an entry form 
using the language?
It seems like "OBECT SET..." addresses almost every other property.
I'd like to make a field tabbable if it is empty, and skip it when tabbing if 
it has a value (the easy way).

Thanks,

Keith - CDI
**
4D Internet Users Group (4D iNUG)
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: Pop up form window (v17.6)

2019-11-04 Thread kculotta via 4D_Tech
When it says "outside the window", it's referring to the pop-up window itself, 
so you are seeing the correct behavior.

• The window cannot have a close box but is automatically closed and 
the "cancel" event is passed to the window when:
• a click occurs outside the window;
• the background window or the MDI (Multiple Document 
Interface) window is moved;
• the user clicks the Esc key.

https://doc.4d.com/4Dv17/4D/17.3/Window-Types.300-4621132.en.html

Keith - CDI

> On Nov 4, 2019, at 5:13 PM, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am trying to find out about the WINDOW TYPE:   ‘pop up form window’.
> I am sure I read something about this new window type — that it is supposed 
> to be modal relative to the frontMost window that was open when it was called.
> If the user clicks outside that window, then it is basically ‘cancelled’ and 
> vaporizes.
> But I think it is supposed to be useful to query the user for something that 
> it can then pass on to the frontMost window it represents.
> 
> When what I call the “OWNER WINDOW” is showing, I pop up the POP UP FORM 
> window using:
> 
> 
> 
> $obj:=OBJ_GetWindowInfo // custom method that returns an object with 
> characteristics about the window (frontmost in this case)
> $testForm:=Open form window("pwChooseFieldToInsert";Pop up form 
> window;$obj.left;$obj.bottom-300) // open the window as pop up Form...
> DIALOG("pwChooseFieldToInsert”) // show the form.
> 
> 
> 
> This pops up this form window in the bottom-left of the current window, 
> displaying the correct form.
> If I click outside of it (when it is active) then it disappears as I remember 
> it was supposed to. (Like iOS, where touching outside a modal window just 
> dismisses it)
> However, if the 
> 
> However, how do I use information retrieved from it in my ‘OWNER WINDOW’ 
> after it is correctly entered and ‘approved’ [i.e. OKed] ?
> 
> Do you recall reading about this new window type? If so, can you give me a 
> link to the documentation? I cannot find it anywhere…
> 
> Thanks,
> Chris
> **
> 4D Internet Users Group (4D iNUG)
> 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)
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: Concatenating collections in v17R5

2019-11-04 Thread kculotta via 4D_Tech
collection.combine( ) does that.
https://doc.4d.com/4Dv17/4D/17.3/collectioncombine.305-4621805.en.html

Keith - CDI

> On Nov 4, 2019, at 5:26 PM, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I’m probably missing something obvious here, but if I have two collections 
> and I want to add all the elements of one to the end of the other, is there a 
> simple way?
> 
> So if c1 is [1,2,3] and c2 is [4,5,6], the result is [1,2,3,4,5,6].
> 
> Jeremy
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
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: Option click close box

2019-10-10 Thread kculotta via 4D_Tech
All true what you said, with some observations (17.3):

If On Close Box is checked, an input window gets the event, but does not close. 
 An output window did close.
If not checked an input window will close, revealing the output window it was 
opened from (when DIALOG was called without OPEN WINDOW being called first).
The windows were created with "DIALOG(outputForm)".

I saw the application window close, but was able to option-command-E to get the 
Explorer.

Keith - CDI
(sorry if any resend, still working out an eMail address change)

> On Oct 8, 2019, at 4:57 PM, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Nobody?
> 
>> On 5 Oct 2019, at 12:56, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Is 4D’s response to option-click in a window’s close box documented? All 
>> windows close, which is as I’d expect, but they don’t seem to get sent an On 
>> close box event. Also, the default splash screen window closes and I drop 
>> out of application mode.
>> 
>> v17R5, Mac, running interpreted.
>> 
>> Jeremy
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**