RE: On Column Resize event

2018-01-05 Thread Chip Scheide via 4D_Tech
That will work  :)
but...
it *might* be simpler/ more efficient to use the On mouse enter/On 
mouse leave event for the listbox
and set a process variable, rather then run the mouse location code 
every time the On Column Resize event fires.

// object method - listbox
case of
 :(form event = On Mouse Enter)
flag_Mouse_in_listbox:=true
 
 :(form event = On Mouse Leave)
flag_Mouse_in_listbox:=false

  :(Form event = on Column Resize) & (flag_Mouse_in_listbox)
   // do whatever column size changes you are doing
 end case



On Fri, 5 Jan 2018 17:50:44 +, Piotr Chabot Stadhouders via 4D_Tech 
wrote:
> Hi,
> 
> Based on the tip op Chip (sounds nice), I have created a function 
> that can be used in the "On Column Resize" event:
> 
> 
> C_TEXT($listbox;$1)
> C_BOOLEAN($mouse_in_listbox;$0)
> $listbox:=$1
> 
> C_BOOLEAN($mouse_in_listbox)
> GET MOUSE($mouseX;$mouseY;$mouseButton)
> OBJECT GET COORDINATES(*;$listbox;$l;$t;$r;$b)
> 
> If ($mouseX>=$l) & ($mouseX<=$r) & ($mouseY>=$t) & ($mouseY<=$b)
>   $mouse_in_listbox:=True
> Else 
>   $mouse_in_listbox:=False
> End if 
> 
> $0:=$mouse_in_listbox
> 
> 
> 
> 
>> -Oorspronkelijk bericht-
>> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
>> Verzonden: vrijdag 5 januari 2018 10:06
>> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
>> Onderwerp: RE: On Column Resize event
>> 
>> Hi Chip, Miyako,
>> 
>> @Chip :
>> Thanks, this is a nice tip!
>> But don't you agree it should be easier, and 4D should have thought 
>> about this,
>> and implement it another way?
>> 
>> @Miyako :
>> I know there is a new auto-resize feature, but this works not as how 
>> we want it
>> In fact we have implemented an auto-resize feature ourselves, and this is
>> exactly why we have a problem now When a user resizes a column we
>> determine the ratio's of the column widths (We do this in the "On Column
>> Resize" event) When resizing the listbox (by resizing the window for 
>> example)
>> in the "On Resize" event we set the widths proportionally based on 
>> the ratio's
>> calculated earlier
>> 
>> Gr,
>> 
>> Piotr
>> 
>>> -Oorspronkelijk bericht-
>>> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
>>> Verzonden: donderdag 4 januari 2018 18:22
>>> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
>>> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
>>> Onderwerp: Re: On Column Resize event
>>> 
>>> Piotr,
>>> 'On Timer' can be used to limit execution of the On Column Resize event.
>>> I have seen a similar problem with other resizing situations.
>>> 
>>> Basically - you start a timer for a .5 second or so, then On timer
>>> executes the code.
>>> This reduces the number of times the code runs.
>>> 
>>> For differentiating between manual resizing of a column vs auto
>>> resizing via a window resize, you could try setting a flag. Set the
>>> flag in 'On Mouse Enter', and clearing it in 'On Mouse Leave', in the
>>> context of the listbox. Then in the code for resizing if the flag is
>>> set the user has the mouse in the listbox and is resizing manually. 
>>> If not, then
>> the user is resizing the window.
>>> 
>>> Chip
>>> On Thu, 4 Jan 2018 17:13:23 +, Piotr Chabot Stadhouders via
>>> 4D_Tech
>>> wrote:
>>>> Hi,
>>>> 
>>>> In 4D v16 there is a new feature so an "On Column Resize" event is
>>>> triggered "live" during resizing of a listbox:
>>>> https://blog.4d.com/execute-action-upon-listbox-column-resizing/
>>>> 
>>>> I have a lot of code behind that event in our application that now
>>>> is executed too many times, so I don't like this at all. I have to
>>>> eliminate this code, because it is based on the idea a user resizes
>>>> the column.
>>>> 
>>>> Apart from this fact, there is something else :
>>>> When setting the Horizontal sizing option of the listbox to grow,
>>>> the listbox grows when resizing the window, and the last column of
>>>> the listbox is also resized. This is common beheviour What I don't
>>>> like is that then the "On Column Resize" event also is fired, so now
>>>> when resizing the window, the code behind the event is executed many
>>>> 

RE: On Column Resize event

2018-01-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Based on the tip op Chip (sounds nice), I have created a function that can be 
used in the "On Column Resize" event:


C_TEXT($listbox;$1)
C_BOOLEAN($mouse_in_listbox;$0)
$listbox:=$1

C_BOOLEAN($mouse_in_listbox)
GET MOUSE($mouseX;$mouseY;$mouseButton)
OBJECT GET COORDINATES(*;$listbox;$l;$t;$r;$b)

If ($mouseX>=$l) & ($mouseX<=$r) & ($mouseY>=$t) & ($mouseY<=$b)
$mouse_in_listbox:=True
Else 
$mouse_in_listbox:=False
End if 

$0:=$mouse_in_listbox




> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> Verzonden: vrijdag 5 januari 2018 10:06
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: RE: On Column Resize event
> 
> Hi Chip, Miyako,
> 
> @Chip :
> Thanks, this is a nice tip!
> But don't you agree it should be easier, and 4D should have thought about 
> this,
> and implement it another way?
> 
> @Miyako :
> I know there is a new auto-resize feature, but this works not as how we want 
> it
> In fact we have implemented an auto-resize feature ourselves, and this is
> exactly why we have a problem now When a user resizes a column we
> determine the ratio's of the column widths (We do this in the "On Column
> Resize" event) When resizing the listbox (by resizing the window for example)
> in the "On Resize" event we set the widths proportionally based on the ratio's
> calculated earlier
> 
> Gr,
> 
> Piotr
> 
> > -Oorspronkelijk bericht-
> > Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> > Verzonden: donderdag 4 januari 2018 18:22
> > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> > Onderwerp: Re: On Column Resize event
> >
> > Piotr,
> > 'On Timer' can be used to limit execution of the On Column Resize event.
> > I have seen a similar problem with other resizing situations.
> >
> > Basically - you start a timer for a .5 second or so, then On timer
> > executes the code.
> > This reduces the number of times the code runs.
> >
> > For differentiating between manual resizing of a column vs auto
> > resizing via a window resize, you could try setting a flag. Set the
> > flag in 'On Mouse Enter', and clearing it in 'On Mouse Leave', in the
> > context of the listbox. Then in the code for resizing if the flag is
> > set the user has the mouse in the listbox and is resizing manually. If not, 
> > then
> the user is resizing the window.
> >
> > Chip
> > On Thu, 4 Jan 2018 17:13:23 +, Piotr Chabot Stadhouders via
> > 4D_Tech
> > wrote:
> > > Hi,
> > >
> > > In 4D v16 there is a new feature so an "On Column Resize" event is
> > > triggered "live" during resizing of a listbox:
> > > https://blog.4d.com/execute-action-upon-listbox-column-resizing/
> > >
> > > I have a lot of code behind that event in our application that now
> > > is executed too many times, so I don't like this at all. I have to
> > > eliminate this code, because it is based on the idea a user resizes
> > > the column.
> > >
> > > Apart from this fact, there is something else :
> > > When setting the Horizontal sizing option of the listbox to grow,
> > > the listbox grows when resizing the window, and the last column of
> > > the listbox is also resized. This is common beheviour What I don't
> > > like is that then the "On Column Resize" event also is fired, so now
> > > when resizing the window, the code behind the event is executed many
> > > times.
> > > What I don't understand is how I can know if the event is triggered
> > > by a user resizing the column, or if it is triggered by something
> > > else (in this case resizing the window)
> > >
> > > Does anybody know of a way to detect this?
> > >
> > > Gr,
> > >
> > > Piotr
> > >
> > >
> >
> 
> > **
> > > 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
> > >
> >
> 
> > **
> > ---
> > Gas is for washing parts
> > Alcohol is for drinkin'
> > Nitromethane is for racing
> 

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

RE: On Column Resize event

2018-01-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip, Miyako,

@Chip :
Thanks, this is a nice tip!
But don't you agree it should be easier, and 4D should have thought about this, 
and implement it another way?

@Miyako :
I know there is a new auto-resize feature, but this works not as how we want it
In fact we have implemented an auto-resize feature ourselves, and this is 
exactly why we have a problem now
When a user resizes a column we determine the ratio's of the column widths (We 
do this in the "On Column Resize" event)
When resizing the listbox (by resizing the window for example) in the "On 
Resize" event we set the widths proportionally based on the ratio's calculated 
earlier

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: donderdag 4 januari 2018 18:22
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: Re: On Column Resize event
> 
> Piotr,
> 'On Timer' can be used to limit execution of the On Column Resize event.
> I have seen a similar problem with other resizing situations.
> 
> Basically - you start a timer for a .5 second or so, then On timer executes 
> the
> code.
> This reduces the number of times the code runs.
> 
> For differentiating between manual resizing of a column vs auto resizing via a
> window resize, you could try setting a flag. Set the flag in 'On Mouse Enter',
> and clearing it in 'On Mouse Leave', in the context of the listbox. Then in 
> the
> code for resizing if the flag is set the user has the mouse in the listbox 
> and is
> resizing manually. If not, then the user is resizing the window.
> 
> Chip
> On Thu, 4 Jan 2018 17:13:23 +0000, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> > Hi,
> >
> > In 4D v16 there is a new feature so an "On Column Resize" event is
> > triggered "live" during resizing of a listbox:
> > https://blog.4d.com/execute-action-upon-listbox-column-resizing/
> >
> > I have a lot of code behind that event in our application that now is
> > executed too many times, so I don't like this at all. I have to
> > eliminate this code, because it is based on the idea a user resizes
> > the column.
> >
> > Apart from this fact, there is something else :
> > When setting the Horizontal sizing option of the listbox to grow, the
> > listbox grows when resizing the window, and the last column of the
> > listbox is also resized. This is common beheviour
> > What I don't like is that then the "On Column Resize" event also is
> > fired, so now when resizing the window, the code behind the event is
> > executed many times.
> > What I don't understand is how I can know if the event is triggered
> > by a user resizing the column, or if it is triggered by something
> > else (in this case resizing the window)
> >
> > Does anybody know of a way to detect this?
> >
> > Gr,
> >
> > Piotr
> >
> >
> 
> **
> > 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
> >
> 
> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing

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

Re: On Column Resize event

2018-01-04 Thread Keisuke Miyako via 4D_Tech
if what you want is equal distribution of growth,
then there is another v16 feature that does that:

https://blog.4d.com/listbox-columns-auto-resizing/

> 2018/01/05 2:13、Piotr Chabot Stadhouders via 4D_Tech <4d_tech@lists.4d.com> 
> のメール:
>
> When setting the Horizontal sizing option of the listbox to grow, the listbox 
> grows when resizing the window, and the last column of the listbox is also 
> resized. This is common beheviour
> What I don't like is that then the "On Column Resize" event also is fired, so 
> now when resizing the window, the code behind the event is executed many 
> times.




**
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: On Column Resize event

2018-01-04 Thread Chip Scheide via 4D_Tech
Piotr,
'On Timer' can be used to limit execution of the On Column Resize event.
I have seen a similar problem with other resizing situations.

Basically - you start a timer for a .5 second or so, then On timer 
executes the code.
This reduces the number of times the code runs.

For differentiating between manual resizing of a column vs auto 
resizing via a window resize, you could try setting a flag. Set the 
flag in 'On Mouse Enter', and clearing it in 'On Mouse Leave', in the 
context of the listbox. Then in the code for resizing if the flag is 
set the user has the mouse in the listbox and is resizing manually. If 
not, then the user is resizing the window.

Chip
On Thu, 4 Jan 2018 17:13:23 +, Piotr Chabot Stadhouders via 4D_Tech 
wrote:
> Hi,
> 
> In 4D v16 there is a new feature so an "On Column Resize" event is 
> triggered "live" during resizing of a listbox:
> https://blog.4d.com/execute-action-upon-listbox-column-resizing/
> 
> I have a lot of code behind that event in our application that now is 
> executed too many times, so I don't like this at all. I have to 
> eliminate this code, because it is based on the idea a user resizes 
> the column.
> 
> Apart from this fact, there is something else :
> When setting the Horizontal sizing option of the listbox to grow, the 
> listbox grows when resizing the window, and the last column of the 
> listbox is also resized. This is common beheviour
> What I don't like is that then the "On Column Resize" event also is 
> fired, so now when resizing the window, the code behind the event is 
> executed many times.
> What I don't understand is how I can know if the event is triggered 
> by a user resizing the column, or if it is triggered by something 
> else (in this case resizing the window)
> 
> Does anybody know of a way to detect this?
> 
> Gr,
> 
> Piotr
> 
> **
> 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
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

On Column Resize event

2018-01-04 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

In 4D v16 there is a new feature so an "On Column Resize" event is triggered 
"live" during resizing of a listbox:
https://blog.4d.com/execute-action-upon-listbox-column-resizing/

I have a lot of code behind that event in our application that now is executed 
too many times, so I don't like this at all. I have to eliminate this code, 
because it is based on the idea a user resizes the column.

Apart from this fact, there is something else :
When setting the Horizontal sizing option of the listbox to grow, the listbox 
grows when resizing the window, and the last column of the listbox is also 
resized. This is common beheviour
What I don't like is that then the "On Column Resize" event also is fired, so 
now when resizing the window, the code behind the event is executed many times.
What I don't understand is how I can know if the event is triggered by a user 
resizing the column, or if it is triggered by something else (in this case 
resizing the window)

Does anybody know of a way to detect this?

Gr,

Piotr

**
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: Live "On Column Resize" event

2017-02-09 Thread Spencer Hinsdale
+1  As OP mentioned this feature is much nicer with multiple list boxes you'd 
like to keep in sync

> On Feb 9, 2017, at 10:29 AM, Cannon Smith  
> wrote:
> 
> I love this feature. [snip]
> 
> 
>> On Feb 9, 2017, at 11:09 AM, Chip Scheide <4d_o...@pghrepository.org> wrote:
>> 
>> this behavior caused me no end of problems with window resizing.
>> personally I do not see the benefit. [snip]

**
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: Live "On Column Resize" event

2017-02-09 Thread Nigel Greenlee
Tim

That sounds like a bug that 4D have introduced-have you reported it to them? 
There used to be a nasty killer if you put a trace in a form resize event 
-probably from a similar way of handling the call to how they are now handling 
the on column resize-it should only really actually be an on column resize when 
you mouse up. 

have you tried using the mouse state?

Get mouse($mousex;$mousey;$mousebutton)
if($Mousebutton=0), //mouse up-if mouse is down we are still resizing 
do stuff
end if



 I use an on column resize event on my forms and hope this is resolved before i 
start working with V16!

Nigel Greenlee


> On 8 Feb 2017, at 20:04, Tilman Haerdle <tilman.haer...@extragroup.de> wrote:
> 
> With 4D v16.0 the event "On Column Resize" fires live during resize of 
> listbox columns.
> 
> This has severe effects on methods who do stuff after resizing a column. If 
> the method takes to long irt is invoked again while it is still running which 
> results sooner or later in a stack overflow and subsequently a crash.
> 
> I'd wish there was a "On After Column Resize" event for methods who take 
> place after the fact and not during the resize action.
> 
> Any strategies to cope with the current implementation in v16?
> 
> Cheers,
> Tilman Haerdle
> 
> extragroup GmbH
> Pottkamp 19
> 48149 Münster
> Germany
> 
> Mobil: +49 178 721 5210 (Skype: TilmanHaerdle)
> Fax: +49 251 39089-10
> WWW: http://www.extragroup.de
> Email: tilman.haer...@extragroup.de
> 
> Geschäftsführer: Lars Busch
> Registergericht: Amtsgericht Münster / HRB: 5624 Steuer Nr.: 337/5903/0421 - 
> UstID: DE 204607841
> 
> Vectorworks interiorcad - profacto
> 
> 
> **
> 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
> **

**
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: Live "On Column Resize" event

2017-02-09 Thread Tilman Haerdle
Thank you all for your suggestions, the flag came to mind, too. That's a 
feasible way to go.

Our current solution was to not act until form unload which is in our use case 
OK as we just store the status of the listbox.

Still I'm not really happy about this change because one way or another you 
have to touch many places in the code if you didn't handle the event completely 
generically.

Regards,
Tilman

> Am 08.02.2017 um 21:42 schrieb Chuck Miller <cjmil...@informed-solutions.com>:
> 
> Yeh what we used to do was to set a boolean to false and then when code runs 
> set to true. Only run code if boolean is false. We had the same type of 
> problems in really old versions of ALP
> 
> Regards
> 
> Chuck
> 
> Chuck Miller Voice: (617) 739-0306
> Informed Solutions, Inc. Fax: (617) 232-1064   
> mailto:cjmillerinformed-solutions.com 
> Brookline, MA 02446 USA Registered 4D Developer
>   Providers of 4D and Sybase connectivity
>  http://www.informed-solutions.com  
> 
> This message and any attached documents contain information which may be 
> confidential, subject to privilege or exempt from disclosure under applicable 
> law.  These materials are intended only for the use of the intended 
> recipient. If you are not the intended recipient of this transmission, you 
> are hereby notified that any distribution, disclosure, printing, copying, 
> storage, modification or the taking of any action in reliance upon this 
> transmission is strictly prohibited.  Delivery of this message to any person 
> other than the intended recipient shall not compromise or waive such 
> confidentiality, privilege or exemption from disclosure as to this 
> communication. 
> 
>> On Feb 8, 2017, at 3:04 PM, Tilman Haerdle <tilman.haer...@extragroup.de> 
>> wrote:
>> 
>> With 4D v16.0 the event "On Column Resize" fires live during resize of 
>> listbox columns.
>> 
>> This has severe effects on methods who do stuff after resizing a column. If 
>> the method takes to long irt is invoked again while it is still running 
>> which results sooner or later in a stack overflow and subsequently a crash.
>> 
>> I'd wish there was a "On After Column Resize" event for methods who take 
>> place after the fact and not during the resize action.
>> 
>> Any strategies to cope with the current implementation in v16?
> 
> **
> 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
> **

**
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: Live "On Column Resize" event

2017-02-08 Thread Chuck Miller
Yeh what we used to do was to set a boolean to false and then when code runs 
set to true. Only run code if boolean is false. We had the same type of 
problems in really old versions of ALP

Regards

Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Feb 8, 2017, at 3:04 PM, Tilman Haerdle <tilman.haer...@extragroup.de> 
> wrote:
> 
> With 4D v16.0 the event "On Column Resize" fires live during resize of 
> listbox columns.
> 
> This has severe effects on methods who do stuff after resizing a column. If 
> the method takes to long irt is invoked again while it is still running which 
> results sooner or later in a stack overflow and subsequently a crash.
> 
> I'd wish there was a "On After Column Resize" event for methods who take 
> place after the fact and not during the resize action.
> 
> Any strategies to cope with the current implementation in v16?

**
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: Live "On Column Resize" event

2017-02-08 Thread Timothy Penner
Couldn't you write the code so that it runs only if a flag is not set, then set 
the flag upon starting the operation and clear it when done, then the 
subsequent calls would see that the flag is already set so they don’t do 
anything...?

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

Re: Live "On Column Resize" event

2017-02-08 Thread Chip Scheide
on timer?

set a timer event (10 ticks?) when the On Column resize occurs
WHen the timer 'times out' apply the actions you want as you can 
conceder the resize event to be complete.

Alternatively - an event handler turned on when resize fires first time 
to track mouse down, and then on mouse up do actions and clear event 
handler.

On Wed, 8 Feb 2017 20:04:22 +, Tilman Haerdle wrote:
> With 4D v16.0 the event "On Column Resize" fires live during resize 
> of listbox columns.
> 
> This has severe effects on methods who do stuff after resizing a 
> column. If the method takes to long irt is invoked again while it is 
> still running which results sooner or later in a stack overflow and 
> subsequently a crash.
> 
> I'd wish there was a "On After Column Resize" event for methods who 
> take place after the fact and not during the resize action.
> 
> Any strategies to cope with the current implementation in v16?
> 
> Cheers,
> Tilman Haerdle
> 
> extragroup GmbH
> Pottkamp 19
> 48149 Münster
> Germany
> 
> Mobil: +49 178 721 5210 (Skype: TilmanHaerdle)
> Fax: +49 251 39089-10
> WWW: http://www.extragroup.de
> Email: tilman.haer...@extragroup.de
> 
> Geschäftsführer: Lars Busch
> Registergericht: Amtsgericht Münster / HRB: 5624 Steuer Nr.: 
> 337/5903/0421 - UstID: DE 204607841
> 
> Vectorworks interiorcad - profacto
> 
> 
> **
> 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
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Live "On Column Resize" event

2017-02-08 Thread Tilman Haerdle
With 4D v16.0 the event "On Column Resize" fires live during resize of listbox 
columns.

This has severe effects on methods who do stuff after resizing a column. If the 
method takes to long irt is invoked again while it is still running which 
results sooner or later in a stack overflow and subsequently a crash.

I'd wish there was a "On After Column Resize" event for methods who take place 
after the fact and not during the resize action.

Any strategies to cope with the current implementation in v16?

Cheers,
Tilman Haerdle

extragroup GmbH
Pottkamp 19
48149 Münster
Germany

Mobil: +49 178 721 5210 (Skype: TilmanHaerdle)
Fax: +49 251 39089-10
WWW: http://www.extragroup.de
Email: tilman.haer...@extragroup.de

Geschäftsführer: Lars Busch
Registergericht: Amtsgericht Münster / HRB: 5624 Steuer Nr.: 337/5903/0421 - 
UstID: DE 204607841

Vectorworks interiorcad - profacto


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