Re: ds.Table.query() field not available

2020-03-09 Thread Keisuke Miyako via 4D_Tech
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
**

ds.Table.query() field not available

2020-03-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

When I do a ds.Table.query() using a field/attribute of a non-indexed field, I 
get an error. 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?



Sannyasin Siddhanathaswami
**
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: DOM EXPORT TO FILE adds CRLF

2020-03-09 Thread Tom Benedict via 4D_Tech
Thanks Jim! That did the trick. 

The docs say that “XML no indentation” means “the document is not intended” but 
then goes on to say “its contents are placed in a single line.” The second part 
is the critical clue that end-of-line characters are a form of indentation.

I don’t think I would have realized that without your help.

Thanks again,

Tom

> On Mar 9, 2020, at 13:04, Jim Hays via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Try this:
> XML SET OPTIONS($rootRef_t;XML indentation;XML no indentation)
> 
> Jim Hays
> 
> On Mon, Mar 9, 2020 at 2:57 PM Tom Benedict via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> I am updating values in an XML file using DOM commands. I finish by
>> calling DOM EXPORT TO FILE. What I’ve found is that the end-of-line chars
>> in the XML file are doubled every time I export, so eventually there is
>> lots of white space between lines in the document. According to the
>> documentation this appears to be a ‘feature’. The documentation, shown
>> below, describes how to deal with it, but I don’t understand it. I want to
>> be able to browse my XML document with a text editor (NotePad or Notepad++)
>> so I do not want extra end-of-line characters added to my document.
>> 
>> From the documentation at
>> https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html <
>> https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html>:
>> ---
>> Notes about processing end-of-line characters <>
>> In XML, line breaks are not significant regardless of whether they are
>> within or between XML elements. Internally, XML uses standard LF characters
>> as line separators.
>> During import and export operations, line break characters can be
>> converted. During an import, the XML parser replaces CRLF characters
>> (standard line breaks under Windows) with LF characters. During export, LF
>> characters are replaced by CR characters on macOS and CRLF characters on
>> Windows.
>> If you want to keep carriage returns, you must include them in an XML
>> CDATA element so that they will not be processed by the XML parser. Instead
>> of CRLF characters, you can also use "" characters, which are explicit
>> carriage returns that will not be processed by the parser.
>> ———
>> 
>> This seems to say that import converts CRLF to LF, then export changes
>> them back. So why in my case are the CRLFs accumulating? Can someone
>> provide some guidance on what I need to do to avoid additional end of line
>> characters being added to my XML? I think there is some basic knowledge
>> which I am lacking.Where would I add the "” characters?
>> 
>> BTW, the XML I am editing is the BuildApp.xml used by 4D.
>> 
>> Thanks,
>> 
>> Tom Benedict
>> 

**
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: Trouble with Comment Blocks v18

2020-03-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Makes sense. I was hoping I wasn’t going nuts!

Sannyasin Siddhanathaswami
On Mar 9, 2020, 10:35 AM -1000, John DeSoi via 4D_Tech <4d_tech@lists.4d.com>, 
wrote:
I think there was a bug related to this late in the beta cycle. I'm not sure if 
the fix made it in to 18.0. Seems to work fine in 18.0 HF1.

John DeSoi, Ph.D.


On Mar 9, 2020, at 3:24 PM, Sannyasin Siddhanathaswami via 4D_Tech 
<4d_tech@lists.4d.com> wrote:

Aloha,

I’m having trouble getting the new comment blocks to work in v18. Seems silly 
simple but doesn’t work:

/*

This is a comment

*/

This gives a syntax error.

I’m using v18 on Mac OS Catalina, in client server.

I looked for compatibility settings, and anything useful in the documentation, 
but all I read says the above should work and be collapsable. What am I missing?

**
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: Trouble with Comment Blocks v18

2020-03-09 Thread John DeSoi via 4D_Tech
I think there was a bug related to this late in the beta cycle. I'm not sure if 
the fix made it in to 18.0. Seems to work fine in 18.0 HF1.

John DeSoi, Ph.D.


> On Mar 9, 2020, at 3:24 PM, Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Aloha,
> 
> I’m having trouble getting the new comment blocks to work in v18. Seems silly 
> simple but doesn’t work:
> 
> /*
> 
> This is a comment
> 
> */
> 
> This gives a syntax error.
> 
> I’m using v18 on Mac OS Catalina, in client server.
> 
> I looked for compatibility settings, and anything useful in the 
> documentation, but all I read says the above should work and be collapsable. 
> What am I missing?

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

Trouble with Comment Blocks v18

2020-03-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I’m having trouble getting the new comment blocks to work in v18. Seems silly 
simple but doesn’t work:

/*

This is a comment

*/

This gives a syntax error.

I’m using v18 on Mac OS Catalina, in client server.

I looked for compatibility settings, and anything useful in the documentation, 
but all I read says the above should work and be collapsable. What am I missing?

Thanks,

Sannyasin Siddhanathaswami
**
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: DOM EXPORT TO FILE adds CRLF

2020-03-09 Thread Jim Hays via 4D_Tech
Try this:
XML SET OPTIONS($rootRef_t;XML indentation;XML no indentation)

Jim Hays

On Mon, Mar 9, 2020 at 2:57 PM Tom Benedict via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I am updating values in an XML file using DOM commands. I finish by
> calling DOM EXPORT TO FILE. What I’ve found is that the end-of-line chars
> in the XML file are doubled every time I export, so eventually there is
> lots of white space between lines in the document. According to the
> documentation this appears to be a ‘feature’. The documentation, shown
> below, describes how to deal with it, but I don’t understand it. I want to
> be able to browse my XML document with a text editor (NotePad or Notepad++)
> so I do not want extra end-of-line characters added to my document.
>
> From the documentation at
> https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html <
> https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html>:
> ---
> Notes about processing end-of-line characters <>
> In XML, line breaks are not significant regardless of whether they are
> within or between XML elements. Internally, XML uses standard LF characters
> as line separators.
> During import and export operations, line break characters can be
> converted. During an import, the XML parser replaces CRLF characters
> (standard line breaks under Windows) with LF characters. During export, LF
> characters are replaced by CR characters on macOS and CRLF characters on
> Windows.
> If you want to keep carriage returns, you must include them in an XML
> CDATA element so that they will not be processed by the XML parser. Instead
> of CRLF characters, you can also use "" characters, which are explicit
> carriage returns that will not be processed by the parser.
> ———
>
> This seems to say that import converts CRLF to LF, then export changes
> them back. So why in my case are the CRLFs accumulating? Can someone
> provide some guidance on what I need to do to avoid additional end of line
> characters being added to my XML? I think there is some basic knowledge
> which I am lacking.Where would I add the "” characters?
>
> BTW, the XML I am editing is the BuildApp.xml used by 4D.
>
> Thanks,
>
> Tom Benedict
>
>
> **
> 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
**

alternative to create a mac pkg installer

2020-03-09 Thread ADeeg via 4D_Tech
Hi all,

In the last years I have used the Packages Installer for my macOS apps.
Link: [url]http://s.sudre.free.fr/Software/Packages/about.html[/url]

But since the obligation to notarize the apps, I can't use the Packages
installer builder anymore, because the notarization fails, don't know why.

I have found 2 alternatives that I would like to share.

Link: https://forums.4d.com/Post//34224142/1/


Have fun

Armin




--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
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
**

DOM EXPORT TO FILE adds CRLF

2020-03-09 Thread Tom Benedict via 4D_Tech
I am updating values in an XML file using DOM commands. I finish by calling DOM 
EXPORT TO FILE. What I’ve found is that the end-of-line chars in the XML file 
are doubled every time I export, so eventually there is lots of white space 
between lines in the document. According to the documentation this appears to 
be a ‘feature’. The documentation, shown below, describes how to deal with it, 
but I don’t understand it. I want to be able to browse my XML document with a 
text editor (NotePad or Notepad++) so I do not want extra end-of-line 
characters added to my document. 

From the documentation at 
https://doc.4d.com/4Dv16/4D/16.6/DOM-EXPORT-TO-FILE.301-4445841.en.html 
:
---
Notes about processing end-of-line characters <>  
In XML, line breaks are not significant regardless of whether they are within 
or between XML elements. Internally, XML uses standard LF characters as line 
separators.
During import and export operations, line break characters can be converted. 
During an import, the XML parser replaces CRLF characters (standard line breaks 
under Windows) with LF characters. During export, LF characters are replaced by 
CR characters on macOS and CRLF characters on Windows.
If you want to keep carriage returns, you must include them in an XML CDATA 
element so that they will not be processed by the XML parser. Instead of CRLF 
characters, you can also use "" characters, which are explicit carriage 
returns that will not be processed by the parser.
———

This seems to say that import converts CRLF to LF, then export changes them 
back. So why in my case are the CRLFs accumulating? Can someone provide some 
guidance on what I need to do to avoid additional end of line characters being 
added to my XML? I think there is some basic knowledge which I am lacking.Where 
would I add the "” characters?

BTW, the XML I am editing is the BuildApp.xml used by 4D.

Thanks,

Tom Benedict


**
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: [ANN] AJ_MATH 1.2

2020-03-09 Thread Mike Kerner via 4D_Tech
opening the project works, it's the 4dbase that breaks.

On Mon, Mar 9, 2020 at 2:49 PM Mike Kerner 
wrote:

> the database piece is throwing an error that it needs the unit test
> piece.  did you change your folder organziation?
>
> On Mon, Mar 9, 2020 at 8:05 AM Maurice Inzirillo - AJAR via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
>> We are proud to announce our new release AJ_Math 1.2
>>
>> * * * AJ_Math - Math functions for 4D * * *
>>
>> It is intended for 4D developers. The component AJ_Math covers
>> mathematical and trigonometric functions.
>>
>> AJ_Math is one of the 4D tool components of our AJ_Suite which includes :
>> • AJUI_Banner 1.7
>> • AJUI_Breadcrumb 1.2.1
>> • AJUI_Tip 1.6.1
>> • AJUI_Progressbar 1.1
>> • AJUI_FloatingLabel 1.1.1
>> • AJUI_Button 1.3.1
>> • AJ_Tools_Regex
>> • AJ_Tools_xliff
>> • AJ_Tools_UnitTest 1.0.1
>>
>> This Free component is available here :
>>
>> https://ch-fr.4d.com/aj-suite
>>
>> What's new since version 1.0?
>>
>> The component has been extended with new functions :
>> - Math.acos(x)
>> - Math.asin(x)
>> - Math.atan2(y;x)
>> - Math.spherodistance (latitude1;longitude1;latitude2;longitude2)
>> - Math.toRadians(degrees)
>> - Math.toDegrees(radians)
>> - Math.roundDecimal(x;precision;roundType)
>>  roundType supported :
>>   • ROUND_UP,
>>   • ROUND_DOWN,
>>   • ROUND_CEILING,
>>   • ROUND_FLOOR,
>>   • ROUND_HALF_UP,
>>   • ROUND_HALF_DOWN,
>>   • ROUND_HALF_CEILING,
>>   • ROUND_HALF_FLOOR,
>>   • ROUND_HALF_EVEN.
>>
>> The wiki on github has been updated accordingly.
>>
>>
>>
>> Maurice Inzirillo
>> --
>> AJAR S.A.
>>
>> https://ch-fr.4d.com
>> twitter: ajar_info
>> Tél : +41 (0)323422684
>>
>>
>>
>>
>>
>> **
>> 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
>> **
>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>and did a little diving.
> And God said, "This is good."
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**
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: [ANN] AJ_MATH 1.2

2020-03-09 Thread Mike Kerner via 4D_Tech
the database piece is throwing an error that it needs the unit test piece.
did you change your folder organziation?

On Mon, Mar 9, 2020 at 8:05 AM Maurice Inzirillo - AJAR via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> We are proud to announce our new release AJ_Math 1.2
>
> * * * AJ_Math - Math functions for 4D * * *
>
> It is intended for 4D developers. The component AJ_Math covers
> mathematical and trigonometric functions.
>
> AJ_Math is one of the 4D tool components of our AJ_Suite which includes :
> • AJUI_Banner 1.7
> • AJUI_Breadcrumb 1.2.1
> • AJUI_Tip 1.6.1
> • AJUI_Progressbar 1.1
> • AJUI_FloatingLabel 1.1.1
> • AJUI_Button 1.3.1
> • AJ_Tools_Regex
> • AJ_Tools_xliff
> • AJ_Tools_UnitTest 1.0.1
>
> This Free component is available here :
>
> https://ch-fr.4d.com/aj-suite
>
> What's new since version 1.0?
>
> The component has been extended with new functions :
> - Math.acos(x)
> - Math.asin(x)
> - Math.atan2(y;x)
> - Math.spherodistance (latitude1;longitude1;latitude2;longitude2)
> - Math.toRadians(degrees)
> - Math.toDegrees(radians)
> - Math.roundDecimal(x;precision;roundType)
>  roundType supported :
>   • ROUND_UP,
>   • ROUND_DOWN,
>   • ROUND_CEILING,
>   • ROUND_FLOOR,
>   • ROUND_HALF_UP,
>   • ROUND_HALF_DOWN,
>   • ROUND_HALF_CEILING,
>   • ROUND_HALF_FLOOR,
>   • ROUND_HALF_EVEN.
>
> The wiki on github has been updated accordingly.
>
>
>
> Maurice Inzirillo
> --
> AJAR S.A.
>
> https://ch-fr.4d.com
> twitter: ajar_info
> Tél : +41 (0)323422684
>
>
>
>
>
> **
> 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
> **



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Jeremy,

Thanks! The fog is clearing…

Over-thinking is my speciality!

Appreciate,
John…


> I think you have it: it is indeed magic!
> 
> The method called, via CALL FORM, by the worker has full access to all the 
> form’s variables (in that way, it’s just like a form method). Your worker 
> process can pass it, for example in an object, the values to be added to the 
> listbox’s arrays. It adds them and the box will just update. It’s very easy 
> to overthink it: give it a go and I suspect you’ll be amazed at how 
> straightforward it proves to be.
> 
> Jeremy
> 
>> On Mar 9, 2020, at 10:28 AM, John J Foster  wrote:
>> 
>> Hi Peter,
>> 
>> That makes sense and I beginning to get a sense/visualize it.
>> 
>> This stuff is like magic in comparison to the older approach.
>> 
>> Thank you Peter!!!
>> 
>> John...
>> 
>>> On Mar 9, 2020, at 10:25 AM, Peter Bozek >> > wrote:
>>> 
>>> 
>>> 
>>> On Mon, Mar 9, 2020 at 5:52 PM John J Foster via 4D_Tech 
>>> <4d_tech@lists.4d.com > wrote:
>>> Hi Peter,
>>> 
>>> I haven’t used CALL WORKED/CALL FORM yet. I’ve seen some tutorials by John 
>>> Baughman which made sense when I watched them. But a different context I 
>>> think.
>>> 
>>> 
>>> Idea is as follows: you cannot share memory (variables...) between worker 
>>> and another process. But you can pass parameters to method running in 
>>> another process.
>>> 
>>> So you need one method, that calculated content of displayed array, and 
>>> packs the calculated values into object with, say, OB Set array, and this 
>>> method runs in the worker, and another method that receives the object as a 
>>> parameter, extracts the values from objects and inserts them into arrays 
>>> displayed by LB.
>>> 
>>> CALL WORKER is called with first method as second parameter and runs inside 
>>> worker, second method is passed as a second parameter to  CALL FORM and 
>>> runs in the process of the form.
>>> 
>>> I guess that’s why my brain is not seeing this clearly yet.
>>> 
>>> My search form has a bunch of variables including a date range, a source 
>>> and target arrays that it needs to loop through and a mother array list. 
>>> The search will go something like:
>>> 
>>> Loop through Source array
>>> for this Source{index}...
>>>Loop through Target array
>>>for this Target{index}...
>>>   Loop through Aspect array
>>>   for this Aspect{index}…
>>>  Call this search method for tis date range…
>>>  As rows are found build the listbox   <--
>>> 
>>> instead of this line, you would, after, say, each N lines, pack the data 
>>> into object and call CALL FORM 
>>> 
>>> Another method (2nd parameter of CALL FORM will unpack data and build 
>>> listbox.
>>> 
>>>  Pseudocode would be:
>>> 
>>> Method_Worker:
>>> receives window reference in $1
>>> loop through data
>>>   each 50 records
>>> calculate values
>>>   end each
>>>   pack last 50 lines into object
>>>   CALL FORM(window reference;"Method_Form";object)
>>> end loop
>>> 
>>> Method_Form
>>> receives object in $1
>>> extract object into arrays
>>> loop through values in arrays
>>>   insert values from passed arrays into listbox
>>> end loop
>>> 
>>> then form in On load, calls
>>> CALL WORKER("worker name;"Method_Worker";window reference of itself)
>>> 
>>> Form method does not call Method_Form or do anything.
>>> 
>>> HTH,
>>> 
>>> Peter Bozek
>> 
> 
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Jeremy Roussak via 4D_Tech
John,

I think you have it: it is indeed magic!

The method called, via CALL FORM, by the worker has full access to all the 
form’s variables (in that way, it’s just like a form method). Your worker 
process can pass it, for example in an object, the values to be added to the 
listbox’s arrays. It adds them and the box will just update. It’s very easy to 
overthink it: give it a go and I suspect you’ll be amazed at how 
straightforward it proves to be.

Jeremy

> On 9 Mar 2020, at 17:28, John J Foster via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Peter,
> 
> That makes sense and I beginning to get a sense/visualize it.
> 
> This stuff is like magic in comparison to the older approach.
> 
> Thank you Peter!!!
> 
> John...
> 
>> On Mar 9, 2020, at 10:25 AM, Peter Bozek  wrote:
>> 
>> 
>> 
>> On Mon, Mar 9, 2020 at 5:52 PM John J Foster via 4D_Tech 
>> <4d_tech@lists.4d.com > wrote:
>> Hi Peter,
>> 
>> I haven’t used CALL WORKED/CALL FORM yet. I’ve seen some tutorials by John 
>> Baughman which made sense when I watched them. But a different context I 
>> think.
>> 
>> 
>> Idea is as follows: you cannot share memory (variables...) between worker 
>> and another process. But you can pass parameters to method running in 
>> another process.
>> 
>> So you need one method, that calculated content of displayed array, and 
>> packs the calculated values into object with, say, OB Set array, and this 
>> method runs in the worker, and another method that receives the object as a 
>> parameter, extracts the values from objects and inserts them into arrays 
>> displayed by LB.
>> 
>> CALL WORKER is called with first method as second parameter and runs inside 
>> worker, second method is passed as a second parameter to  CALL FORM and runs 
>> in the process of the form.
>> 
>> I guess that’s why my brain is not seeing this clearly yet.
>> 
>> My search form has a bunch of variables including a date range, a source and 
>> target arrays that it needs to loop through and a mother array list. The 
>> search will go something like:
>> 
>> Loop through Source array
>> for this Source{index}...
>>   Loop through Target array
>>   for this Target{index}...
>>  Loop through Aspect array
>>  for this Aspect{index}…
>> Call this search method for tis date range…
>> As rows are found build the listbox   <--
>> 
>> instead of this line, you would, after, say, each N lines, pack the data 
>> into object and call CALL FORM 
>> 
>> Another method (2nd parameter of CALL FORM will unpack data and build 
>> listbox.
>> 
>> Pseudocode would be:
>> 
>> Method_Worker:
>> receives window reference in $1
>> loop through data
>>  each 50 records
>>calculate values
>>  end each
>>  pack last 50 lines into object
>>  CALL FORM(window reference;"Method_Form";object)
>> end loop
>> 
>> Method_Form
>> receives object in $1
>> extract object into arrays
>> loop through values in arrays
>>  insert values from passed arrays into listbox
>> end loop
>> 
>> then form in On load, calls
>> CALL WORKER("worker name;"Method_Worker";window reference of itself)
>> 
>> Form method does not call Method_Form or do anything.
>> 
>> HTH,
>> 
>> Peter Bozek
> 
> **
> 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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Lahav,

Ref: "You are actually calling a method that runs in the context of the form 
window.  You don't need to trap for an event, the method just runs and does 
whatever it needs to do in the context of the form.”

I think I get it.

Ref: "One question for you, any reason to use arrays rather than a collection?”

Not for or against. I think it’s that arrays seem easier in this case. But 
maybe not. Habit I suppose.

Appreciate,
John…



> You are actually calling a method that runs in the context of the form 
> window.  You don't need to trap for an event, the method just runs and does 
> whatever it needs to do in the context of the form.
> 
> For example, if you only need to add a row to an array on the form, write a 
> method "InsertElement":
> 
> C_Text($1)
> 
> APPEND TO ARRAY(myFormArray;$1)
> 
> Then in the process that do all your data crunching, just call:
> 
> Call Form($YourcallingFormWindowID;" InsertElement ";"Add This")
> 
> You are done
> 
> One question for you, any reason to use arrays rather than a collection?
> 
> Lahav
> 
> 
>> On Mar 9, 2020, at 10:22 AM, John J Foster  wrote:
>> 
>> Hi Lahav,
>> 
>> Good to hear from you my man!
>> 
>> Ref: "An easier way to think of CALL FORM is to look at it as the old ON 
>> OUTSIDE CALL event in a form, but with the added bonus of being able pass 
>> data to the form as parameters from the calling process, without using 
>> global variables."
>> 
>> I kind of get that but can’t see where the form captures as event (we don't 
>> have On Call Form) so I know where to append to the listbox with the new 
>> rows/data as it’s being returned.
>> 
>> Does that make sense? That’s where my confusion lies.
>> 
>> John…
>> 
>> 
>> 
>>> On Mar 9, 2020, at 9:42 AM, John J Foster  wrote:
>>> 
>>> Hi Peter,
>>> 
>>> Yea, that’s what I thought!
>>> 
>>> So trying to understand (aka, visualize in my minds eye before I code) how 
>>> to correctly get back the rows being returned from another process. I am 
>>> thinking of some sort of object.
>>> 
>>> I’m still trying to follow Olivier’s explanation “try to see CALL FORM as 
>>> "execute this project method in the context of this form", similar to 
>>> EXECUTE METHOD IN SUBFORM”.
>>> 
>>> Anyway, reviewing your previous thoughts.
>>> 
>>> Appreciate,
>>> John…
>>> 
>>> 
 On Mar 9, 2020, at 9:24 AM, Peter Bozek  wrote:
 
 In fact, worker cannot share variables with another process (think of 
 worker as another process running on another processor, not sharing the 
 memory with main process.) But worker can call a method with CALL FORM and 
 pass a parameters to that call, and the parameter can be, for example, an 
 object with embedded values.
>>> 
>> 
> 
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread lists via 4D_Tech
Hey John,

You are actually calling a method that runs in the context of the form window.  
You don't need to trap for an event, the method just runs and does whatever it 
needs to do in the context of the form.

For example, if you only need to add a row to an array on the form, write a 
method "InsertElement":

C_Text($1)

APPEND TO ARRAY(myFormArray;$1)

Then in the process that do all your data crunching, just call:

Call Form($YourcallingFormWindowID;" InsertElement ";"Add This")

You are done

One question for you, any reason to use arrays rather than a collection?

Lahav

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of John J Foster via 
4D_Tech
Sent: Monday, March 9, 2020 11:22 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: John J Foster 
Subject: Re: Active Listbox/Form while listbox dynamically built

Hi Lahav,

Good to hear from you my man!

Ref: "An easier way to think of CALL FORM is to look at it as the old ON 
OUTSIDE CALL event in a form, but with the added bonus of being able pass data 
to the form as parameters from the calling process, without using global 
variables."

I kind of get that but can’t see where the form captures as event (we don't 
have On Call Form) so I know where to append to the listbox with the new 
rows/data as it’s being returned.

Does that make sense? That’s where my confusion lies.

John…



> On Mar 9, 2020, at 9:42 AM, John J Foster  wrote:
> 
> Hi Peter,
> 
> Yea, that’s what I thought!
> 
> So trying to understand (aka, visualize in my minds eye before I code) how to 
> correctly get back the rows being returned from another process. I am 
> thinking of some sort of object.
> 
> I’m still trying to follow Olivier’s explanation “try to see CALL FORM as 
> "execute this project method in the context of this form", similar to EXECUTE 
> METHOD IN SUBFORM”.
> 
> Anyway, reviewing your previous thoughts.
> 
> Appreciate,
> John…
> 
> 
>> On Mar 9, 2020, at 9:24 AM, Peter Bozek  wrote:
>> 
>> In fact, worker cannot share variables with another process (think of worker 
>> as another process running on another processor, not sharing the memory with 
>> main process.) But worker can call a method with CALL FORM and pass a 
>> parameters to that call, and the parameter can be, for example, an object 
>> with embedded values.
> 

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Peter,

> Method specified in CALL FORM is called in the form  just like form method, 
> but is not part of form method, nor is it called from form method.

Yes that was my problem expecting that it was somehow related to the form 
method, per se.

After I finish the main search routine I’ll get to work on implementing this.

Appreciate,
John…


> On Mar 9, 2020, at 10:27 AM, Peter Bozek  wrote:
> 
> 
> 
> On Mon, Mar 9, 2020 at 6:22 PM John J Foster via 4D_Tech 
> <4d_tech@lists.4d.com > wrote:
> 
> Ref: "An easier way to think of CALL FORM is to look at it as the old ON 
> OUTSIDE CALL event in a form, but with the added bonus of being able pass 
> data to the form as parameters from the calling process, without using global 
> variables."
> 
> I kind of get that but can’t see where the form captures as event (we don't 
> have On Call Form) so I know where to append to the listbox with the new 
> rows/data as it’s being returned.
> 
> It does not. Method specified in CALL FORM is called in the form  just like 
> form method, but is not part of form method, nor is it called from form 
> method.
> 
> pB
>  
> 
> Does that make sense? That’s where my confusion lies.
> 
> John…
> 
> 
> 
> > On Mar 9, 2020, at 9:42 AM, John J Foster  > > wrote:
> > 
> > Hi Peter,
> > 
> > Yea, that’s what I thought!
> > 
> > So trying to understand (aka, visualize in my minds eye before I code) how 
> > to correctly get back the rows being returned from another process. I am 
> > thinking of some sort of object.
> > 
> > I’m still trying to follow Olivier’s explanation “try to see CALL FORM as 
> > "execute this project method in the context of this form", similar to 
> > EXECUTE METHOD IN SUBFORM”.
> > 
> > Anyway, reviewing your previous thoughts.
> > 
> > Appreciate,
> > John…
> > 
> > 
> >> On Mar 9, 2020, at 9:24 AM, Peter Bozek  >> > wrote:
> >> 
> >> In fact, worker cannot share variables with another process (think of 
> >> worker as another process running on another processor, not sharing the 
> >> memory with main process.) But worker can call a method with CALL FORM and 
> >> pass a parameters to that call, and the parameter can be, for example, an 
> >> object with embedded values.
> > 
> 
> **
> 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 
> 
> **
> 
> 
> -- 
> --
> 
> Peter Bozek

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Peter,

That makes sense and I beginning to get a sense/visualize it.

This stuff is like magic in comparison to the older approach.

Thank you Peter!!!

John...

> On Mar 9, 2020, at 10:25 AM, Peter Bozek  wrote:
> 
> 
> 
> On Mon, Mar 9, 2020 at 5:52 PM John J Foster via 4D_Tech 
> <4d_tech@lists.4d.com > wrote:
> Hi Peter,
> 
> I haven’t used CALL WORKED/CALL FORM yet. I’ve seen some tutorials by John 
> Baughman which made sense when I watched them. But a different context I 
> think.
> 
> 
> Idea is as follows: you cannot share memory (variables...) between worker and 
> another process. But you can pass parameters to method running in another 
> process.
> 
> So you need one method, that calculated content of displayed array, and packs 
> the calculated values into object with, say, OB Set array, and this method 
> runs in the worker, and another method that receives the object as a 
> parameter, extracts the values from objects and inserts them into arrays 
> displayed by LB.
> 
> CALL WORKER is called with first method as second parameter and runs inside 
> worker, second method is passed as a second parameter to  CALL FORM and runs 
> in the process of the form.
> 
> I guess that’s why my brain is not seeing this clearly yet.
> 
> My search form has a bunch of variables including a date range, a source and 
> target arrays that it needs to loop through and a mother array list. The 
> search will go something like:
> 
> Loop through Source array
> for this Source{index}...
>Loop through Target array
>for this Target{index}...
>   Loop through Aspect array
>   for this Aspect{index}…
>  Call this search method for tis date range…
>  As rows are found build the listbox   <--
> 
> instead of this line, you would, after, say, each N lines, pack the data into 
> object and call CALL FORM 
> 
> Another method (2nd parameter of CALL FORM will unpack data and build listbox.
> 
>  Pseudocode would be:
> 
> Method_Worker:
> receives window reference in $1
> loop through data
>   each 50 records
> calculate values
>   end each
>   pack last 50 lines into object
>   CALL FORM(window reference;"Method_Form";object)
> end loop
> 
> Method_Form
> receives object in $1
> extract object into arrays
> loop through values in arrays
>   insert values from passed arrays into listbox
> end loop
> 
> then form in On load, calls
> CALL WORKER("worker name;"Method_Worker";window reference of itself)
> 
> Form method does not call Method_Form or do anything.
> 
> HTH,
> 
> Peter Bozek

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Peter Bozek via 4D_Tech
On Mon, Mar 9, 2020 at 6:22 PM John J Foster via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> Ref: "An easier way to think of CALL FORM is to look at it as the old ON
> OUTSIDE CALL event in a form, but with the added bonus of being able pass
> data to the form as parameters from the calling process, without using
> global variables."
>
> I kind of get that but can’t see where the form captures as event (we
> don't have On Call Form) so I know where to append to the listbox with the
> new rows/data as it’s being returned.
>

It does not. Method specified in CALL FORM is called in the form  just like
form method, but is not part of form method, nor is it called from form
method.

pB


>
> Does that make sense? That’s where my confusion lies.
>
> John…
>
>
>
> > On Mar 9, 2020, at 9:42 AM, John J Foster  wrote:
> >
> > Hi Peter,
> >
> > Yea, that’s what I thought!
> >
> > So trying to understand (aka, visualize in my minds eye before I code)
> how to correctly get back the rows being returned from another process. I
> am thinking of some sort of object.
> >
> > I’m still trying to follow Olivier’s explanation “try to see CALL FORM
> as "execute this project method in the context of this form", similar to
> EXECUTE METHOD IN SUBFORM”.
> >
> > Anyway, reviewing your previous thoughts.
> >
> > Appreciate,
> > John…
> >
> >
> >> On Mar 9, 2020, at 9:24 AM, Peter Bozek  wrote:
> >>
> >> In fact, worker cannot share variables with another process (think of
> worker as another process running on another processor, not sharing the
> memory with main process.) But worker can call a method with CALL FORM and
> pass a parameters to that call, and the parameter can be, for example, an
> object with embedded values.
> >
>
> **
> 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
> **



-- 
--

Peter Bozek
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Peter Bozek via 4D_Tech
On Mon, Mar 9, 2020 at 5:52 PM John J Foster via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi Peter,
>
> I haven’t used CALL WORKED/CALL FORM yet. I’ve seen some tutorials by John
> Baughman which made sense when I watched them. But a different context I
> think.
>
>
Idea is as follows: you cannot share memory (variables...) between worker
and another process. But you can pass parameters to method running in
another process.

So you need one method, that calculated content of displayed array, and
packs the calculated values into object with, say, OB Set array, and this
method runs in the worker, and another method that receives the object as a
parameter, extracts the values from objects and inserts them into arrays
displayed by LB.

CALL WORKER is called with first method as second parameter and runs inside
worker, second method is passed as a second parameter to  CALL FORM and
runs in the process of the form.

I guess that’s why my brain is not seeing this clearly yet.
>
> My search form has a bunch of variables including a date range, a source
> and target arrays that it needs to loop through and a mother array list.
> The search will go something like:
>
> Loop through Source array
> for this Source{index}...
>Loop through Target array
>for this Target{index}...
>   Loop through Aspect array
>   for this Aspect{index}…
>  Call this search method for tis date range…
>  As rows are found build the listbox   <--
>

instead of this line, you would, after, say, each N lines, pack the data
into object and call CALL FORM

Another method (2nd parameter of CALL FORM will unpack data and build
listbox.

 Pseudocode would be:

Method_Worker:
receives window reference in $1
loop through data
  each 50 records
calculate values
  end each
  pack last 50 lines into object
  CALL FORM(window reference;"Method_Form";object)
end loop

Method_Form
receives object in $1
extract object into arrays
loop through values in arrays
  insert values from passed arrays into listbox
end loop

then form in On load, calls
CALL WORKER("worker name;"Method_Worker";window reference of itself)

Form method does not call Method_Form or do anything.

HTH,

Peter Bozek
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Lahav,

Good to hear from you my man!

Ref: "An easier way to think of CALL FORM is to look at it as the old ON 
OUTSIDE CALL event in a form, but with the added bonus of being able pass data 
to the form as parameters from the calling process, without using global 
variables."

I kind of get that but can’t see where the form captures as event (we don't 
have On Call Form) so I know where to append to the listbox with the new 
rows/data as it’s being returned.

Does that make sense? That’s where my confusion lies.

John…



> On Mar 9, 2020, at 9:42 AM, John J Foster  wrote:
> 
> Hi Peter,
> 
> Yea, that’s what I thought!
> 
> So trying to understand (aka, visualize in my minds eye before I code) how to 
> correctly get back the rows being returned from another process. I am 
> thinking of some sort of object.
> 
> I’m still trying to follow Olivier’s explanation “try to see CALL FORM as 
> "execute this project method in the context of this form", similar to EXECUTE 
> METHOD IN SUBFORM”.
> 
> Anyway, reviewing your previous thoughts.
> 
> Appreciate,
> John…
> 
> 
>> On Mar 9, 2020, at 9:24 AM, Peter Bozek  wrote:
>> 
>> In fact, worker cannot share variables with another process (think of worker 
>> as another process running on another processor, not sharing the memory with 
>> main process.) But worker can call a method with CALL FORM and pass a 
>> parameters to that call, and the parameter can be, for example, an object 
>> with embedded values.
> 

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread lists via 4D_Tech
John,

An easier way to think of CALL FORM is to look at it as the old ON OUTSIDE CALL 
event in a form, but with the added bonus of being able pass data to the form 
as parameters from the calling process, without using global variables.

Cheers,

Lahav

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of John J Foster via 
4D_Tech
Sent: Monday, March 9, 2020 10:43 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: John J Foster 
Subject: Re: Active Listbox/Form while listbox dynamically built

Hi Peter,

Yea, that’s what I thought!

So trying to understand (aka, visualize in my minds eye before I code) how to 
correctly get back the rows being returned from another process. I am thinking 
of some sort of object.

I’m still trying to follow Olivier’s explanation “try to see CALL FORM as 
"execute this project method in the context of this form", similar to EXECUTE 
METHOD IN SUBFORM”.

Anyway, reviewing your previous thoughts.

Appreciate,
John…


> On Mar 9, 2020, at 9:24 AM, Peter Bozek  wrote:
> 
> In fact, worker cannot share variables with another process (think of worker 
> as another process running on another processor, not sharing the memory with 
> main process.) But worker can call a method with CALL FORM and pass a 
> parameters to that call, and the parameter can be, for example, an object 
> with embedded values.

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Peter,

I haven’t used CALL WORKED/CALL FORM yet. I’ve seen some tutorials by John 
Baughman which made sense when I watched them. But a different context I think.

I guess that’s why my brain is not seeing this clearly yet.

My search form has a bunch of variables including a date range, a source and 
target arrays that it needs to loop through and a mother array list. The search 
will go something like:

Loop through Source array
for this Source{index}...
   Loop through Target array
   for this Target{index}...
  Loop through Aspect array
  for this Aspect{index}…
 Call this search method for tis date range…
 As rows are found build the listbox

> 1. 4D would be quite straightforward: process that display LB wold initialise 
> empty arrays and will launch process or worker that calculates values. 

1. So when the form is loaded then the CALL WORKER is launched and remembered 
for later use.

2. Worker then calls CALL FORM periodically with values - per line or group of 
lines ??? 

3. Called method inserts calculated values into displayed arrays???

How does it do this using the above scenario? Pseudo code?

John…



> We did something similar with colleague, some time ago, not in 4D, but idea 
> would be similar:
> 
> 1. we initialised arrays to proper size (amount of data was know beforehand). 
> At that moment, user would see an area with empty lines
> 2. we run a process that calculated the lines and updated arrays and area. 
> 3. as a optimisation, we did not calculated all lines, only a small part 
> (256?) so the area would display something immediately. When the user 
> scrolled down, process started to calculate lines from scroll position. 
> 
> Implementing it in 4D would be quite straightforward: process that display LB 
> wold initialise empty arrays and will launch process or worker that 
> calculates values. Worker then calls CALL FORM periodically with values - per 
> line or group of lines -  and called method inserts calculated values into 
> displayed arrays. 4D would handle the update of LB, process with LB would not 
> be frozen and user would be able to see how are the values filling the area.
> 
> Using workers would allow implementation of point 3. quite straightforward, 
> but it may not be necessary. As a first  step, I would let worker calculate 
> all lines. Only if calculation takes too long (minutes) I would try to adjust 
> worker call so it calculates only displayed lines.
> 
> HTH,
> 
> Peter Bozek
> 
> 
> On Sun, Mar 8, 2020 at 7:38 PM John J Foster via 4D_Tech 
> <4d_tech@lists.4d.com > wrote:
> Hi All,
> 
> 4D v17 R5 (Mac and Windows single user standalone)
> 
> I have a list box that needs to be built and available before the calculation 
> is complete. In this case I have some searches looking for particular 
> conditions and when found add them to the listbox. They could easily take a 
> few seconds to I’m guessing a  minute or more. The searching could span 50-60 
> sub searches within a 100 years of daily data (Think daily stock market data 
> but it’s not for the stock market).
> 
> So I would like a strategy:
> 
> - so that list box remains available as it’s being built.
> 
> - the screen is not frozen as it’s being built.
> 
> - The list box fills as each row is found/added and can be seen rebuilding. 
> 
> I’ve seen this kind of thing in a windows app (not 4D) and I’d like to 
> emulate the behavior.
> 
> I need a strategy I’m guessing that involves another process which knows how 
> to communicate back to this form/listbox. Is this where workers could be 
> helpful?
> 
> Does anyone have some snippets of code I could see to visualize the process?
> 
> Appreciate,
> 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 
> 
> **
> 
> 
> -- 
> --
> 
> Peter Bozek

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Peter,

Yea, that’s what I thought!

So trying to understand (aka, visualize in my minds eye before I code) how to 
correctly get back the rows being returned from another process. I am thinking 
of some sort of object.

I’m still trying to follow Olivier’s explanation “try to see CALL FORM as 
"execute this project method in the context of this form", similar to EXECUTE 
METHOD IN SUBFORM”.

Anyway, reviewing your previous thoughts.

Appreciate,
John…


> On Mar 9, 2020, at 9:24 AM, Peter Bozek  wrote:
> 
> In fact, worker cannot share variables with another process (think of worker 
> as another process running on another processor, not sharing the memory with 
> main process.) But worker can call a method with CALL FORM and pass a 
> parameters to that call, and the parameter can be, for example, an object 
> with embedded values.

**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Peter Bozek via 4D_Tech
On Mon, Mar 9, 2020 at 4:46 PM John J Foster via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi Olivier,
>
> I think I’m so use to thinking of a process, aka CALL WORKER, as being
> independent. The variables are of the process. So in this case that would
> have to mean that the listbox and arrays are seen and updated in both the
> form and the process.
>
> Is that right?
>

In fact, worker cannot share variables with another process (think of
worker as another process running on another processor, not sharing the
memory with main process.) But worker can call a method with CALL FORM and
pass a parameters to that call, and the parameter can be, for example, an
object with embedded values.

Peter Bozek

>
> John...
>
>
> > Try to see CALL FORM as "execute this project method in the context of
> this form", similar to EXECUTE METHOD IN SUBFORM
> >
> > So, the method you execute should update/fill the listbox.
> >
> > e.g. CALL FORM ($WinRef;"MyListboxUpdateMethod";$ObjectWithData)
> >
> > Best,
> >
> > Olivier
> >
> >> On Mar 9, 2020, at 6:33 AM, John J Foster 
> wrote:
> >>
> >> Hi Jeremy,
> >>
> >> OK, conceptually then:
> >>
> >> LB Form (array based - 5-8 arrays) -> Search button spawns CALL WORKER
> >>
> >> So then CALL WORKER searches and as it finds a match it returns them
> via CALL FORM (perhaps in an object) and then the listbox rows are
> processed…
> >>
> >> So the question is - since CALL FORM doesn’t seem to cause an event and
> since the search data found and returned is from another process - how does
> the Listbox “know” to build (append to array) itself or add to itself as
> data arrives? How is the Listbox updated?
> >>
> >> Reviewed the few examples in the KB and HDI and I’m not seeing what I
> need to do. Probably too simple and I’m thinking more complicated.
> >>
> >> Any further code fragment or small examples?
> >>
> >> Appreciate the feedback,
> >> John…
> >>
> >>
> >>>
> >>> Have a look at CALL WORKER and CALL FORM.
> >>>
> >>> Start the data build in a new process using CALL WORKER.
> >>> Have the worker process prod the form into updating the listbox from
> time time using CALL FORM.
> >>>
> >>> I’ve implemented something much more trivial and it works nicely.
> >>>
> >>> Jeremy
> >>>
>  Hi All,
> 
>  4D v17 R5 (Mac and Windows single user standalone)
> 
>  I have a list box that needs to be built and available before the
> calculation is complete. In this case I have some searches looking for
> particular conditions and when found add them to the listbox. They could
> easily take a few seconds to I’m guessing a  minute or more. The searching
> could span 50-60 sub searches within a 100 years of daily data (Think daily
> stock market data but it’s not for the stock market).
> 
>  So I would like a strategy:
> 
>  - so that list box remains available as it’s being built.
> 
>  - the screen is not frozen as it’s being built.
> 
>  - The list box fills as each row is found/added and can be seen
> rebuilding.
> 
>  I’ve seen this kind of thing in a windows app (not 4D) and I’d like
> to emulate the behavior.
> 
>  I need a strategy I’m guessing that involves another process which
> knows how to communicate back to this form/listbox. Is this where workers
> could be helpful?
> 
>  Does anyone have some snippets of code I could see to visualize the
> process?
> 
>  Appreciate,
>  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
> **



-- 
--

Peter Bozek
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Peter Bozek via 4D_Tech
We did something similar with colleague, some time ago, not in 4D, but idea
would be similar:

1. we initialised arrays to proper size (amount of data was know
beforehand). At that moment, user would see an area with empty lines
2. we run a process that calculated the lines and updated arrays and area.
3. as a optimisation, we did not calculated all lines, only a small part
(256?) so the area would display something immediately. When the user
scrolled down, process started to calculate lines from scroll position.

Implementing it in 4D would be quite straightforward: process that display
LB wold initialise empty arrays and will launch process or worker that
calculates values. Worker then calls CALL FORM periodically with values -
per line or group of lines -  and called method inserts calculated values
into displayed arrays. 4D would handle the update of LB, process with LB
would not be frozen and user would be able to see how are the values
filling the area.

Using workers would allow implementation of point 3. quite straightforward,
but it may not be necessary. As a first  step, I would let worker calculate
all lines. Only if calculation takes too long (minutes) I would try to
adjust worker call so it calculates only displayed lines.

HTH,

Peter Bozek


On Sun, Mar 8, 2020 at 7:38 PM John J Foster via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi All,
>
> 4D v17 R5 (Mac and Windows single user standalone)
>
> I have a list box that needs to be built and available before the
> calculation is complete. In this case I have some searches looking for
> particular conditions and when found add them to the listbox. They could
> easily take a few seconds to I’m guessing a  minute or more. The searching
> could span 50-60 sub searches within a 100 years of daily data (Think daily
> stock market data but it’s not for the stock market).
>
> So I would like a strategy:
>
> - so that list box remains available as it’s being built.
>
> - the screen is not frozen as it’s being built.
>
> - The list box fills as each row is found/added and can be seen
> rebuilding.
>
> I’ve seen this kind of thing in a windows app (not 4D) and I’d like to
> emulate the behavior.
>
> I need a strategy I’m guessing that involves another process which knows
> how to communicate back to this form/listbox. Is this where workers could
> be helpful?
>
> Does anyone have some snippets of code I could see to visualize the
> process?
>
> Appreciate,
> 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
> **



-- 
--

Peter Bozek
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Olivier,

I think I’m so use to thinking of a process, aka CALL WORKER, as being 
independent. The variables are of the process. So in this case that would have 
to mean that the listbox and arrays are seen and updated in both the form and 
the process.

Is that right?

John...


> Try to see CALL FORM as "execute this project method in the context of this 
> form", similar to EXECUTE METHOD IN SUBFORM
> 
> So, the method you execute should update/fill the listbox.
> 
> e.g. CALL FORM ($WinRef;"MyListboxUpdateMethod";$ObjectWithData)
> 
> Best,
> 
> Olivier
> 
>> On Mar 9, 2020, at 6:33 AM, John J Foster  wrote:
>> 
>> Hi Jeremy,
>> 
>> OK, conceptually then:
>> 
>> LB Form (array based - 5-8 arrays) -> Search button spawns CALL WORKER 
>> 
>> So then CALL WORKER searches and as it finds a match it returns them via 
>> CALL FORM (perhaps in an object) and then the listbox rows are processed…
>> 
>> So the question is - since CALL FORM doesn’t seem to cause an event and 
>> since the search data found and returned is from another process - how does 
>> the Listbox “know” to build (append to array) itself or add to itself as 
>> data arrives? How is the Listbox updated?
>> 
>> Reviewed the few examples in the KB and HDI and I’m not seeing what I need 
>> to do. Probably too simple and I’m thinking more complicated.
>> 
>> Any further code fragment or small examples?
>> 
>> Appreciate the feedback,
>> John…
>> 
>> 
>>> 
>>> Have a look at CALL WORKER and CALL FORM.
>>> 
>>> Start the data build in a new process using CALL WORKER.
>>> Have the worker process prod the form into updating the listbox from time 
>>> time using CALL FORM.
>>> 
>>> I’ve implemented something much more trivial and it works nicely.
>>> 
>>> Jeremy
>>> 
 Hi All,
 
 4D v17 R5 (Mac and Windows single user standalone)
 
 I have a list box that needs to be built and available before the 
 calculation is complete. In this case I have some searches looking for 
 particular conditions and when found add them to the listbox. They could 
 easily take a few seconds to I’m guessing a  minute or more. The searching 
 could span 50-60 sub searches within a 100 years of daily data (Think 
 daily stock market data but it’s not for the stock market).
 
 So I would like a strategy:
 
 - so that list box remains available as it’s being built.
 
 - the screen is not frozen as it’s being built.
 
 - The list box fills as each row is found/added and can be seen 
 rebuilding. 
 
 I’ve seen this kind of thing in a windows app (not 4D) and I’d like to 
 emulate the behavior.
 
 I need a strategy I’m guessing that involves another process which knows 
 how to communicate back to this form/listbox. Is this where workers could 
 be helpful?
 
 Does anyone have some snippets of code I could see to visualize the 
 process?
 
 Appreciate,
 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
**

AW: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Olivier Flury via 4D_Tech
Hi John,

Try to see CALL FORM as "execute this project method in the context of this 
form", similar to EXECUTE METHOD IN SUBFORM

So, the method you execute should update/fill the listbox.

e.g. CALL FORM ($WinRef;"MyListboxUpdateMethod";$ObjectWithData)

Best,

Olivier

|| https://flury-software.ch/

-Ursprüngliche Nachricht-
Von: 4D_Tech <4d_tech-boun...@lists.4d.com> Im Auftrag von John J Foster via 
4D_Tech
Gesendet: Montag, 9. März 2020 14:33
An: 4d_tech@lists.4d.com
Cc: John J Foster 
Betreff: Re: Active Listbox/Form while listbox dynamically built

Hi Jeremy,

OK, conceptually then:

LB Form (array based - 5-8 arrays) -> Search button spawns CALL WORKER 

So then CALL WORKER searches and as it finds a match it returns them via CALL 
FORM (perhaps in an object) and then the listbox rows are processed…

So the question is - since CALL FORM doesn’t seem to cause an event and since 
the search data found and returned is from another process - how does the 
Listbox “know” to build (append to array) itself or add to itself as data 
arrives? How is the Listbox updated?

Reviewed the few examples in the KB and HDI and I’m not seeing what I need to 
do. Probably too simple and I’m thinking more complicated.

Any further code fragment or small examples?

Appreciate the feedback,
John…


> 
> Have a look at CALL WORKER and CALL FORM.
> 
> Start the data build in a new process using CALL WORKER.
> Have the worker process prod the form into updating the listbox from time 
> time using CALL FORM.
> 
> I’ve implemented something much more trivial and it works nicely.
> 
> Jeremy
> 
>> Hi All,
>> 
>> 4D v17 R5 (Mac and Windows single user standalone)
>> 
>> I have a list box that needs to be built and available before the 
>> calculation is complete. In this case I have some searches looking for 
>> particular conditions and when found add them to the listbox. They could 
>> easily take a few seconds to I’m guessing a  minute or more. The searching 
>> could span 50-60 sub searches within a 100 years of daily data (Think daily 
>> stock market data but it’s not for the stock market).
>> 
>> So I would like a strategy:
>> 
>> - so that list box remains available as it’s being built.
>> 
>> - the screen is not frozen as it’s being built.
>> 
>> - The list box fills as each row is found/added and can be seen rebuilding. 
>> 
>> I’ve seen this kind of thing in a windows app (not 4D) and I’d like to 
>> emulate the behavior.
>> 
>> I need a strategy I’m guessing that involves another process which knows how 
>> to communicate back to this form/listbox. Is this where workers could be 
>> helpful?
>> 
>> Does anyone have some snippets of code I could see to visualize the process?
>> 
>> Appreciate,
>> 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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread John J Foster via 4D_Tech
Hi Jeremy,

OK, conceptually then:

LB Form (array based - 5-8 arrays) -> Search button spawns CALL WORKER 

So then CALL WORKER searches and as it finds a match it returns them via CALL 
FORM (perhaps in an object) and then the listbox rows are processed…

So the question is - since CALL FORM doesn’t seem to cause an event and since 
the search data found and returned is from another process - how does the 
Listbox “know” to build (append to array) itself or add to itself as data 
arrives? How is the Listbox updated?

Reviewed the few examples in the KB and HDI and I’m not seeing what I need to 
do. Probably too simple and I’m thinking more complicated.

Any further code fragment or small examples?

Appreciate the feedback,
John…


> 
> Have a look at CALL WORKER and CALL FORM.
> 
> Start the data build in a new process using CALL WORKER.
> Have the worker process prod the form into updating the listbox from time 
> time using CALL FORM.
> 
> I’ve implemented something much more trivial and it works nicely.
> 
> Jeremy
> 
>> Hi All,
>> 
>> 4D v17 R5 (Mac and Windows single user standalone)
>> 
>> I have a list box that needs to be built and available before the 
>> calculation is complete. In this case I have some searches looking for 
>> particular conditions and when found add them to the listbox. They could 
>> easily take a few seconds to I’m guessing a  minute or more. The searching 
>> could span 50-60 sub searches within a 100 years of daily data (Think daily 
>> stock market data but it’s not for the stock market).
>> 
>> So I would like a strategy:
>> 
>> - so that list box remains available as it’s being built.
>> 
>> - the screen is not frozen as it’s being built.
>> 
>> - The list box fills as each row is found/added and can be seen rebuilding. 
>> 
>> I’ve seen this kind of thing in a windows app (not 4D) and I’d like to 
>> emulate the behavior.
>> 
>> I need a strategy I’m guessing that involves another process which knows how 
>> to communicate back to this form/listbox. Is this where workers could be 
>> helpful?
>> 
>> Does anyone have some snippets of code I could see to visualize the process?
>> 
>> Appreciate,
>> 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
**

[ANN] AJ_MATH 1.2

2020-03-09 Thread Maurice Inzirillo - AJAR via 4D_Tech
We are proud to announce our new release AJ_Math 1.2

* * * AJ_Math - Math functions for 4D * * * 

It is intended for 4D developers. The component AJ_Math covers mathematical and 
trigonometric functions.

AJ_Math is one of the 4D tool components of our AJ_Suite which includes :
• AJUI_Banner 1.7
• AJUI_Breadcrumb 1.2.1
• AJUI_Tip 1.6.1
• AJUI_Progressbar 1.1
• AJUI_FloatingLabel 1.1.1
• AJUI_Button 1.3.1
• AJ_Tools_Regex
• AJ_Tools_xliff
• AJ_Tools_UnitTest 1.0.1

This Free component is available here :

https://ch-fr.4d.com/aj-suite

What's new since version 1.0?

The component has been extended with new functions :
- Math.acos(x)
- Math.asin(x)
- Math.atan2(y;x)
- Math.spherodistance (latitude1;longitude1;latitude2;longitude2)
- Math.toRadians(degrees)
- Math.toDegrees(radians)
- Math.roundDecimal(x;precision;roundType)
 roundType supported : 
  • ROUND_UP,
  • ROUND_DOWN,
  • ROUND_CEILING, 
  • ROUND_FLOOR, 
  • ROUND_HALF_UP, 
  • ROUND_HALF_DOWN, 
  • ROUND_HALF_CEILING, 
  • ROUND_HALF_FLOOR, 
  • ROUND_HALF_EVEN.

The wiki on github has been updated accordingly.



Maurice Inzirillo
-- 
AJAR S.A.

https://ch-fr.4d.com
twitter: ajar_info
Tél : +41 (0)323422684





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