Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-25 Thread fredvs
Hello Martin.

I did play with lock()/unlock in uos but still those underrun errors.

There is something that I do not catch.

So I came back with {.$DEFINE mse} (that uses classical fpc thread +
queue()) and all synchros are ok without any error underrun message.

Also no more scratch when opening file dialog or switching from
float<>docked.

For the moment I will use fpc-threads but if somebody can make work
msethread synchro in uos, it would be a pleasure to use it instead.

Thans.

Fre;D 



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-25 Thread Martin Schreiber
On Monday 25 September 2017 18:14:51 Martin Schreiber wrote:

> You also can use .asyncevent() in order to send and
> .onasyncevent in order to receive an event or
> .postcomponentevent() to send and overriding
> .componentevent() to receive. I'll probably add
> tform.oncomponentevent for convenience.
>
Done, an example is here:

https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/thread/componentevent

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] strumpract (was Artifacts in form scrolling (was tdirdropdownedit with statfile))

2017-09-25 Thread Martin Schreiber
On Monday 25 September 2017 14:33:52 fredvs wrote:
> >  height := emptyheight;  //basedock is still big -> mainfo has
> > scrollbar(s) width := fowidth;
>
> Huh, it is already there in code and did not help without "timerwait
> workaround".
>
>  (see line 401 of procedure tmainfo.onfloatall(const sender: TObject) -->
> main.pas).
>
I wrote:

> You probably should adjust the size of basedock too.

that means set the size of the basdock widget *and* the size of the form.
Currently the code is:
"
 height := emptyheight;
 width := fowidth;
"
which sets the size of the form -> there will be scrollbars if basedock is too 
big. I meant set the size of basedock too, somethin like:
"
 basedock.size:= 
 height := emptyheight;
 width := fowidth;
"

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-25 Thread Martin Schreiber
On Monday 25 September 2017 14:24:17 fredvs wrote:
> > This night will be a merciless test, StrumPract will be the dj all night.
>
> Hello Martin.
>
> OK, the night was white.
>
> Strumpact did his DJ job perfectly, no crash, no pause.
>
Congrats!

> The only detail is when a thread is synchronizing graphic of a other form
> (not the parent form of the thread).
>
> It produce some underrun of the external thread.  The result is some
> "scratch" in sound.
> (I did add a checkbox to disable view meter in Commander form.  If enabled
> ---> underrun.)
>
How do you do that? application.lock()/unlock()? That will wait until the main 
thread is in idle state (same as "synchronize()")

An alternative is application.postevent() which does not wait.
You also can use .asyncevent() in order to send and 
.onasyncevent in order to receive an event or 
.postcomponentevent() to send and overriding 
.componentevent() to receive. I'll probably add 
tform.oncomponentevent for convenience.

Another option is application.queueasynccall() which internally also uses 
event objects.

> But maybe it is not a good idea to synchronize things of a other form than
> parent-thread form.
>
There is no "parent-thread" for a form, there is solely a single main thread 
with a single main event loop which runs the GUI code for all forms.

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-25 Thread Martin Schreiber
On Monday 25 September 2017 23:59:49 fredvs wrote:
> Hello Martin.
>
> I did play with lock()/unlock in uos but still those underrun errors.
>
> There is something that I do not catch.
>
As I wrote before, application.lock() waits until the main thread is idle and 
then runs in context of calling thread.

> So I came back with {.$DEFINE mse} (that uses classical fpc thread +
> queue()) and all synchros are ok without any error underrun message.
>
There is application.queueasynccall() which does not wait and runs in main 
thread context or use tmsecomponent.postcomponentevent() in order to 
asynchronousely send data to a component. An example is here:
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/thread/componentevent

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] strumpract (was Artifacts in form scrolling (was tdirdropdownedit with statfile))

2017-09-25 Thread fredvs
> which sets the size of the form -> there will be scrollbars if basedock is
too 
> big. I meant set the size of basedock too, somethin like: 

> basedock.size:=  
> height := emptyheight; 
>  width := fowidth; 

Ha, ok, you mean to add the code of "TimerWait Workaround" ?

;-)

Ok, many thanks.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-25 Thread fredvs
> How do you do that? application.lock()/unlock()?

Maybe. I have to check uos code.
It uses {$DEFINE mse} and so uses msethreads and
application.lock()/unlock().
Maybe there are not placed on the right place...

application.lock()/unlock() is not used in Strumpact forms.

> An alternative is...
Ha, ok I will explore it.

> Another option...
Yep, I will explore it too.

Many thanks.

Fre;D






--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


[MSEide-MSEgui-talk] About MSE TFilelistview.

2017-09-25 Thread fredvs
About TFilelistview

Hello.

In filelist.opions you may sort the filelist by name, time, size...

Perfect.

But is it possible to have a filelist with those data too in extra columns? 

Or maybe only the name can be displayed.

Is it possible to apply a filter?
What would be the syntax to assign as filter, for example: '*.you, *.she,
*.me' ?

Thanks.

Fre;D





--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Application paused if no mouse event.

2017-09-25 Thread fredvs
> This night will be a merciless test, StrumPract will be the dj all night.

Hello Martin.

OK, the night was white.

Strumpact did his DJ job perfectly, no crash, no pause.

The only detail is when a thread is synchronizing graphic of a other form
(not the parent form of the thread).

It produce some underrun of the external thread.  The result is some
"scratch" in sound.
(I did add a checkbox to disable view meter in Commander form.  If enabled
---> underrun.)

But maybe it is not a good idea to synchronize things of a other form than
parent-thread form.

See picture:
 

Thanks.

Fre:D




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] strumpract (was Artifacts in form scrolling (was tdirdropdownedit with statfile))

2017-09-25 Thread fredvs




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] strumpract (was Artifacts in form scrolling (was tdirdropdownedit with statfile))

2017-09-25 Thread fredvs
>  height := emptyheight;  //basedock is still big -> mainfo has scrollbar(s) 
>  width := fowidth;   

Huh, it is already there in code and did not help without "timerwait
workaround".

 (see line 401 of procedure tmainfo.onfloatall(const sender: TObject) -->
main.pas).

PS: It is not important.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk