Re: Subform Tabbing

2017-12-02 Thread John Baughman via 4D_Tech
First off, I did some more testing and found that this behavior is the same for 
all list boxes no matter where it is and going back to v14.

The focusable and tabable check boxes are on the list box itself and has never, 
as far as I know, had any affect on tabbing between cells. If the cells are 
interable, you can tab between them without regard to the status of the tabable 
check box. If the tabable checkbox applied to movement between the cells, then 
I would have expected to see it on the columns and not the listbox.

I would think that the list box itself is just like any other object on the 
form. If you click on the entry order icon, the list box is included in the tab 
entry order just like a button or a field. If I uncheck the Tabable check box 
on any other object on the farm it can not be tabbed into focus. Not so with a 
list box. 

In any case. The cells in this case are  made editable by use of the checkbox 
for the columns. If I deselect Focusable, I can no longer edit the cell and to 
select a row I have to double click it. Not what I want.

So bottom line, how can one take a list box out of the tab order and still have 
the cells respect the enterable check box.

John

> On Dec 2, 2017, at 8:32 PM, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I would expect tab able to apply to the movement between cells in the listbox.
> 
> should you not rather deactivate focusable instead?
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





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

Re: Subform Tabbing

2017-12-02 Thread Keisuke Miyako via 4D_Tech
I would expect tab able to apply to the movement between cells in the listbox.

should you not rather deactivate focusable instead?



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

Re: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Keisuke Miyako via 4D_Tech
in my view,
I think we need to set reasonable limits on how the commands is expected to be 
used,
before we device that its performance is "poor".

is it really reasonable to insert 400 columns in one call?
at what point in developer did you notice the "poor performance"?

did you gradually extend the size,
and suddenly the speed dropped?

are you working on a proof of concept to see whether the design is feasible,
or have you already decided that the design is totally sane and 4D must be 
broken?

the command name suggests that it is designed to insert a single column.
so you can imagine that it goes through the same check list for every call.
the listbox is a UI element, so there must be some graphic engine calls 
involved.
(font metric calculation, scrollbar calculation, etc)
you can imagine you force 4D to discard and redo 400 computations.

you must also consider that a form may have multiple pages in the form editor,
but to the OS, it is just one window with a lot of hidden objects.

the "page" concept is offered for the developer's convenience,
but the cost of delivery is that at runtime the window has a lot of baggage.

there are other ways to manage multiple listboxes in a single dialog window.
re-using the same object is one way.
switching the content of a subform is another.

there are ways to improve the UX.
deferring the content population with a "pragma once" timer is one way.
using a worker and CALL FORM is another.
postponing the setup until the box is displayed, is yet another.

the speed must be unreasonably slow in order to define "poor performance" as a 
bug.
for example, there was a recent bug (fixed) whether access to the pasteboard 
took up to 1 minute,
on High Sierra. now that is slow.

but the speed issue discussed in this thread,
seem to me like a case where a command has been used in a way for which it was 
not designed.





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

Re: Query from two 4D application

2017-12-02 Thread John Baughman via 4D_Tech
Not having ever worked in SQL with 4D, I would take the HTTP route.

If they are on the same PC, I would give each a different port to listen on.

If on the same network but different PCs then I think some port forwarding will 
need to be configured on the network router.

In either case the requesting PC can simply send the search criteria to the 
other PC in an HTML get request. If the PC doing the query must return 
resulting data, then I would pack it in a JASON object (c_object) or XML and 
return it to the requesting PC. 

The only draw back that I can see in this scenario is that you will need 1 if 
not 2 4D web licenses, if you do not already have them.

John

> On Dec 2, 2017, at 11:23 AM, stardata.info via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Two applications are on the same pc, or in the same network
> 
> Ferdinando
> 
> Il 02/12/2017 21:00, 4d_tech-requ...@lists.4d.com ha scritto:
>> Message: 4
>> Date: Fri, 1 Dec 2017 22:13:49 -1000
>> From: John Baughman
>> To: 4D iNug Technical<4d_tech@lists.4d.com>
>> Subject: Re: Query from two 4D application
>> Message-ID:
>> Content-Type: text/plain;charset=us-ascii
>> 
>> Where are the 2 applications located? On the same computer, same LAN, or WAN?
>> 
>> Which application consumes the results of the query?
>> 
>> I am fairly certain, regardless of the answers to the above, http requests 
>> between the two would work. Web Service might work.
>> 
>> Not sure, but SQL might work as well.
>> 
>> John
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





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

Re: Query from two 4D application

2017-12-02 Thread stardata.info via 4D_Tech

Two applications are on the same pc, or in the same network

Ferdinando

Il 02/12/2017 21:00, 4d_tech-requ...@lists.4d.com ha scritto:

Message: 4
Date: Fri, 1 Dec 2017 22:13:49 -1000
From: John Baughman
To: 4D iNug Technical<4d_tech@lists.4d.com>
Subject: Re: Query from two 4D application
Message-ID:
Content-Type: text/plain;   charset=us-ascii

Where are the 2 applications located? On the same computer, same LAN, or WAN?

Which application consumes the results of the query?

I am fairly certain, regardless of the answers to the above, http requests 
between the two would work. Web Service might work.

Not sure, but SQL might work as well.

John


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

Re: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Tim Nevels via 4D_Tech
On Dec 2, 2017, at 2:00 PM,Piotr Chabot Stadhouders wrote:

>> There is an old saying where a man goes to the doctor and says “when I move
>> my arm like this it hurts, can you fix this” and the doctor replies “yes, 
>> don’t
>> move your arm like that”. :)
> 
> One could also say : "A man goes to a car mechanic and says : I have a flat 
> tire. The mechanic says : Go walk” 

But there is one difference. When you go to the mechanic you are willing pay 
him to fix your tire. Most likely the mechanic will want your money and will 
gladly fix your tire. 

> Defining the listboxes in the form editor was just the way I did it in the 
> past.
> Also putting listboxes stacked on top of each other is something I am doing 
> frequently
> Because I had to modify the listboxes on a regular basis (add columns in 
> request of users) I decided to create them programmatically
> Why does 4D implement all these new (listbox) object commands? I think just 
> for this reason to create all things programmatically

This is obviously a command that needs some attention and most likely can be 
optimized to make it faster. Apparently in all the development and testing when 
creating this command nobody ever used it to the high level that you are and 
noticed the poor performance.

>> 1. Wait for 4D to make a change to fix this (who knows if/when that would
>> happen) 2. Don’t use LISTBOX INSERT COLUMN
> 
> I am going to wait a bit more, but finally, if nothing happens, I am afraid I 
> have to create al columns in the form editor again.

So you know the drill… Submit a bug report with all your details so that 4D 
knows there is a performance problem. Remember, talking about it here will not 
cause 4D to take any action.

Second, go to 4D Forums and create a feature request to speed up LISTBOX INSERT 
COLUMN. Show your examples of how slow it is. 

Wouldn’t it be nice if 4D offered a service — like the mechanic — where you 
could say, "what would you charge me to fix this 4D problem”. And if the price 
was right, you would pay them and you could have this problem fixed quickly. 
But, as we all know, that is not the world that we live in.

The only way to get something done is to get 4D Engineering’s attention so that 
they will assign someone to go work on this command and make it faster.

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

Re: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Arnaud de Montard via 4D_Tech

> Le 2 déc. 2017 à 10:10, Jim Dorrance via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Ever use:
> 
> $tSQL:="SELECT * FROM "+$tTableName+" INTO : "+$tLBox
> [...]

Hi Jim, 
I swear I did not copy/paste your answer   :-)

Makes me think I forgot to mention that one must check 4D version before using 
INTO LISTBOX with more than one LB: 

I've seen it's corrected recently in a v16, but can't remember exactly which 
one. See Frank Louvigne bug reference in the mentioned thread to check that. 

BTW… 
I don't like the way 4D gives names to columns and headers in those "SQL from" 
listboxes. 
I'd like an option "use LB name as root":
 LB name = "myLB"
 col1 = "myLB_c1"
 col2 = "myLB_c2"
 head1 = "myLB_h1"
 head2 = "myLB_h2"
etc. 

-- 
Arnaud de Montard 


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

Re: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Arnaud de Montard via 4D_Tech

> Le 2 déc. 2017 à 09:38, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> Hi Arnaud,
> 
> Array listboxes

Hi Piotr, 
thanks. These users are of the air controller kind  ;-) 

If the performance issue is strictly related to the command that adds a new 
column, i'm wondering if using pre sized listboxes with "too much" columns 
could fix it - you would just have to mask columns in excess. 

Do you (can you…) use SQL "SELECT ... INTO LISTBOX" for some of these 
listboxes? 

You can cheat, too: fill the minimum set of LB on load, then delegate to 
something else (timer and/or another process) the filling of the rest. The user 
may be right to want it all, but still he has 1 brain and 2 eyes. 

-- 
Arnaud de Montard 


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

Re: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Jim Dorrance via 4D_Tech
Ever use:

$tSQL:="SELECT * FROM "+$tTableName+" INTO : "+$tLBox


to create a listbox with all fields as columns and then hide the unwanted
columns?

On Sat, Dec 2, 2017 at 9:38 AM, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi Arnaud,
>
> Array listboxes
>
> >> Le 1 déc. 2017 à 15:49, Piotr Chabot Stadhouders via 4D_Tech
> <4d_t...@xxx.xxx> a écrit :
> >>
> >> Hi,
> >>
> >> In search of a performance problem in 1 of our forms I am asking for
> some advice.
> >>
> >> I have succeeded in analyzing 10 4DDebuglog.txt files (using an Oracle
> DB by the way) and have come to following :
> >> The problem is with the execution time of the "LISTBOX INSERT COLUMN"
>
> > array or selection listbox?
>
> > --
> > Arnaud
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
Jim Dorrance
jim.dorra...@gmail.com
4...@dorrance.eu
www.4d.dorrance.eu

PS: If you know of anyone that needs an experienced 4D programmer to add
energy and experience to their team, please let me know. I have
experience in many areas. Reasonable rates. Remote or Paris only.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Arnaud,

Array listboxes

>> Le 1 déc. 2017 à 15:49, Piotr Chabot Stadhouders via 4D_Tech 
>> <4d_t...@xxx.xxx> a écrit :
>> 
>> Hi,
>> 
>> In search of a performance problem in 1 of our forms I am asking for some 
>> advice.
>> 
>> I have succeeded in analyzing 10 4DDebuglog.txt files (using an Oracle DB by 
>> the way) and have come to following :
>> The problem is with the execution time of the "LISTBOX INSERT COLUMN"

> array or selection listbox?

> -- 
> Arnaud

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

RE: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Tim,

> -Oorspronkelijk bericht-
> Van: Tim Nevels [mailto:timnev...@mac.com]
> Verzonden: vrijdag 1 december 2017 22:00
> Aan: 4d_tech@lists.4d.com
> Onderwerp: Re: poor performance LISTBOX INSERT COLUMN
> 
> On Dec 1, 2017, at 2:00 PM,Piotr Chabot Stadhouders wrote:
> 
> > But, bottom line, we are skipping the fact that still the command
> > LISTBOX INSERT COLUMN is very slow compared to all other commands And
> > we wouldn't probably having this discussion if it was executed as fast
> > as the other commands
> 
> There is an old saying where a man goes to the doctor and says “when I move
> my arm like this it hurts, can you fix this” and the doctor replies “yes, 
> don’t
> move your arm like that”. :)

One could also say : "A man goes to a car mechanic and says : I have a flat 
tire. The mechanic says : Go walk" 


> 
> Is there a reason you MUST call LISTBOX INSERT COLUMN or is it just the way
> you have designed the form and your coding style. I know a lot of people think
> it is the best way to program to build all your list boxes programmatically. 
> Do it
> all with code and they have a dozen methods that do all the work. It’s a
> programming style.
> 
> The other option is to define your list boxes with the form editor defining 
> all the
> columns and properties. Then when the form is loaded all that column
> definition and insertion is eliminated. That is my personal programming
> preference.
> 
> If some of your list boxes are used for several purposes you could also create
> multiple list boxes that are stacked on top of each other, each setup exactly
> how you need it. Then you show/hide the ones you need as appropriate.

Defining the listboxes in the form editor was just the way I did it in the past.
Also putting listboxes stacked on top of each other is something I am doing 
frequently
Because I had to modify the listboxes on a regular basis (add columns in 
request of users) I decided to create them programmatically
Why does 4D implement all these new (listbox) object commands? I think just for 
this reason to create all things programmatically


> 
> I know this is probably not what you want to hear, but if you are determined 
> to
> cut down on load and display time, and you have found LISTBOX INSERT
> COLUMN is causing issues, you only have 2 choices:
> 
> 1. Wait for 4D to make a change to fix this (who knows if/when that would
> happen) 2. Don’t use LISTBOX INSERT COLUMN
> 

I am going to wait a bit more, but finally, if nothing happens, I am afraid I 
have to create al columns in the form editor again.


> Tim
> 
> 
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> 
> 

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

Re: Component works with compiled source but not as a component

2017-12-02 Thread Jim Dorrance via 4D_Tech
Putting the pointer de-pointed in a blob and passing the blob solves the
problem.

On Fri, Dec 1, 2017 at 11:58 PM, Jim Dorrance 
wrote:

> Thanks, I'll try stuffing the array into a blob, and passing the blob.
>
> On Fri, Dec 1, 2017 at 9:44 PM, Timothy Penner via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
>> This thread sounds familiar...  Maybe the answer is already posted:
>> http://4d.1045681.n5.nabble.com/Passing-var-from-component-
>> to-host-td5737479.html
>>
>> http://forums.4d.com/Post/FR/16238062/1/16238063#16238063
>>
>> http://livedoc.4d.com/4Dv16.1/help/Title/en/page1274.html#516584
>> " The component architecture allows the coexistence, within the same
>> interpreted database, of both interpreted and compiled components
>> (conversely, only compiled components can be used in a compiled database).
>> In order to use pointers in this case, you must respect the following
>> principle: the interpreter can unpoint a pointer built in compiled mode;
>> however, in compiled mode, you cannot unpoint a pointer built in
>> interpreted mode. "
>>
>> Hope that helps,
>>
>> -Tim
>>
>>
>>
>>
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>>
>
>
>
> --
> Jim Dorrance
> jim.dorra...@gmail.com
> 4...@dorrance.eu
> www.4d.dorrance.eu
>
> PS: If you know of anyone that needs an experienced 4D programmer to add
> energy and experience to their team, please let me know. I have
> experience in many areas. Reasonable rates. Remote or Paris only.
>



-- 
Jim Dorrance
jim.dorra...@gmail.com
4...@dorrance.eu
www.4d.dorrance.eu

PS: If you know of anyone that needs an experienced 4D programmer to add
energy and experience to their team, please let me know. I have
experience in many areas. Reasonable rates. Remote or Paris only.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Query from two 4D application

2017-12-02 Thread John Baughman via 4D_Tech
Where are the 2 applications located? On the same computer, same LAN, or WAN?

Which application consumes the results of the query?

I am fairly certain, regardless of the answers to the above, http requests 
between the two would work. Web Service might work.

Not sure, but SQL might work as well.

John


> On Dec 1, 2017, at 8:33 PM, stardata.info via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> I use 4D V15 on windows, and i need to do a query from one 4D application to 
> another 4D application.
> How i can do this?
> 
> Thanks
> /Ferdinando/
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





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