[MSEide-MSEgui-talk] MSE and docking.

classic Classic list List threaded Threaded
107 messages Options
1234 ... 6
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] MSE and docking.

fredvs
Hello Martin.

I have some trouble with myform.dragdock.dockto().

Sometimes the forms are not sized as wanted (see video).

https://sites.google.com/site/fredvsbinaries/mse_dock2.mp4

Here code of menu item "Dock" --->

--------------------------------
procedure tmainfo.ondockall(const sender: TObject);
var
x : integer;
apos: pointty;

begin
application.lock();

width := 458 ;

drumsfo.height := 238;
drumsfo.width := 458;

guitarsfo.height := 74;
guitarsfo.width := 458;

songplayerfo.height := 114;
songplayerfo.width := 458;

recorderfo.height := 114;
recorderfo.width := 458;

drumsfo.activate;
guitarsfo.activate;
songplayerfo.activate;
recorderfo.activate;

height := 26 ;
apos.x := 0 ;
apos.y := 10 ;
drumsfo.dragdock.dockto(mainfo.basedock.dragdock,apos);
apos.y := drumsfo.height + 20;

guitarsfo.dragdock.dockto(mainfo.basedock.dragdock,apos);
apos.y := drumsfo.height + guitarsfo.height + 20;

songplayerfo.dragdock.dockto(mainfo.basedock.dragdock,apos);
apos.y := drumsfo.height + guitarsfo.height + songplayerfo.height + 20 ;

recorderfo.dragdock.dockto(mainfo.basedock.dragdock,apos);

height := height + 2;
activate;
application.unlock();
end;
-------------------------------------------------------------

Here code of forms.ondock() --->

procedure myform.ondockplay(const sender: TObject);
begin
mainfo.height := mainfo.height + myform.height;
end;

-------------------------------------------------

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

mse
Administrator
On Friday 08 September 2017 15:21:42 fredvs wrote:
> Hello Martin.
>
> I have some trouble with myform.dragdock.dockto().
>
> Sometimes the forms are not sized as wanted (see video).
>
> https://sites.google.com/site/fredvsbinaries/mse_dock2.mp4
>
The size of the main form must be adjusted to the minimal sizes of the docked
forms. I'll take a look.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
> The size of the main form must be adjusted to the minimal sizes of the
docked forms.

Huh, it seems to be.

> I'll take a look.

OK, thanks.

Other thing.

I was successfully able to translate PThread.h into pascal dynamic loading
header: --->

https://github.com/fredvs/dynx

It works perfectly for fpGUI (with MSE, I have to adapt code, but sure you
will do it better than me ;-)).

So the question:

Do you thing it could be possible to also dynamic load libdl.so (the library
for dynamically load libraries) ?
I did the translation of dl.h  into pascal dynamic loading header but was
not able to do it work.

But maybe it is normal that it does not work because libdl.so needs ...
libdl.so to dynamic load it self.
And so maybe the only working way is to do static linking for libdl.so.

(Once again, something difficult to explain, I hope you did understand).

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

mse
Administrator
On Friday 08 September 2017 19:39:42 fredvs wrote:

>
> So the question:
>
> Do you thing it could be possible to also dynamic load libdl.so (the
> library for dynamically load libraries) ?
> I did the translation of dl.h  into pascal dynamic loading header but was
> not able to do it work.
>
> But maybe it is normal that it does not work because libdl.so needs ...
> libdl.so to dynamic load it self.
> And so maybe the only working way is to do static linking for libdl.so.
>
Probably. libdl AFAIK is a special thing anyway:
http://www.unix.com/man-page/All/3lib/libdl/

I don't think that the basic libraries which are needed in order to run any
MSEgui application (libc, libm, libpthread, libX11...) should be loaded by  
dlopen()/dlsym(). I exclusively use dlopen()/dlsym() for libraries which are
not mandatory.
Free Pascal should allow to define the SONAME source in binding unit - using
dlopen()/dlsym() instead is a hack IMHO.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
> Probably. libdl AFAIK is a special thing anyway:

Yes, libdl should stay static.

> I don't think that the basic libraries which are needed in order to run
> any
> MSEgui application (libc, libm, libpthread, libX11...) should be loaded by
> dlopen()/dlsym().

Ha, ok.
What could be the problems ?
( I have try with fpGUI and the loading of application is indeed faster with
dlopen()/dlsym() ).
---> https://github.com/fredvs/uidesigner_ext

> Free Pascal should allow to define the SONAME source in binding unit.

Good luck to explain it to them  ;-)

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

mse
Administrator
In reply to this post by mse
On Friday 08 September 2017 19:14:14 Martin Schreiber wrote:
>
> The size of the main form must be adjusted to the minimal sizes of the
> docked forms. I'll take a look.
>
Please take the attached patch for inspiration. I hat to remove onkeydown,
onkeyup and onmouseevent in songplayer.mfm because of incompatibility.
Please remember
https://www.mail-archive.com/mseide-msegui-talk%40lists.sourceforge.net/msg11181.html
https://www.mail-archive.com/mseide-msegui-talk%40lists.sourceforge.net/msg11185.html

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

layout.patch.7z (151K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

Graeme Geldenhuys
In reply to this post by mse
On 2017-09-08 19:18, Martin Schreiber wrote:
> Free Pascal should allow to define the SONAME source in binding unit - using
> dlopen()/dlsym() instead is a hack IMHO.

I think so too. I source of the problem is FPC, and that is where the
fix should go.

I do applaud Fred for his efforts and energy to come up with something
that solves his problem though.

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Hello Graeme.

For me the most important is that we are not in trouble ;-)

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
In reply to this post by mse
> Please take the attached patch for inspiration.

Wow, thanks Martin.
Will test it tonight.

Write you later.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
In reply to this post by mse
Hello Martin.

Here what I did:

Copy layout.patch in /strumpract.

Then in console:

# cd strumpract
# git apply --stat layout.patch
  ---> 12 files changed, 7642 insertions(+), 7505 deletions(-)
# git apply --check layout.patch
  ---> OK, no error.
# git am --signoff < layout.patch
  ---> Patch does not have a valid e-mail address.

;-(

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Ooops, sorry for previous mail:

That worked: ---->

# git apply layout.patch.

Wow, you worked a lot !

Ha, it seems to need last MSE commit.

OK, I update MSE and test your patch.

Write you later.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Re.re hello Martin.

Ok, tested the patch.

Perfect for docking/floating/show/hide forms.

Many thanks,

The only thing is that now playing a file with the Song Player crash the
application.

I will check with previous code what could cause this (tomorrow).

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Re-re-re hello Martin.

OK, capito, the crash was because I used the debugger (it is to hard for him
to deal with audio programs with lot of dsp).

Without debugger --> works like charm.

Many thanks.

I will use your tips for the next piece of StrumPract: the recorder.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

mse
Administrator
On Sunday 10 September 2017 02:51:36 fredvs wrote:

> Re-re-re hello Martin.
>
> OK, capito, the crash was because I used the debugger (it is to hard for
> him to deal with audio programs with lot of dsp).
>
> Without debugger --> works like charm.
>
> Many thanks.
>
> I will use your tips for the next piece of StrumPract: the recorder.
>
Please remember:

> I had to remove onkeydown,
> onkeyup and onmouseevent in songplayer.mfm because of incompatibility.
> Please remember
>
https://www.mail-archive.com/mseide-msegui-talk%40lists.sourceforge.net/msg11181.html
>
https://www.mail-archive.com/mseide-msegui-talk%40lists.sourceforge.net/msg11185.html

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Hello Martin.

OK, I committed your changes (+ proto of recorder-not-working-yet), many
thanks.

There is a problem with "Float all".
When a song is playing (with Song Player) and if menu "Float" is clicked,
the song becomes bad.

But the problem is that it does not appends every time.

Maybe something must be done in  "Float"-menu method, it is like after
"Float"-menu click some free memory is loosed.

It appends with my netbook Linux Mint 64.  Not try yet with RPi.

I will try to change code but maybe you have a idea.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Re-hello Martin.

The first time you load StrumPract (when there is no status.sta) --->
docking is perfect.

See picture msedock_ok.
<http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/msedock_ok.jpg>

But once you close the application (and so a status.sta is created) and
reload it, docking is no more ok.
See picture msedock_notok
<http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/msedock_notok.jpg>

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Re-re hello Martin.

About problem of previous mail (load strumpract with a status.sta), it
appends not every times .

Now, after reboot, it is ok every time.  So sorry for the noise (but maybe
you are a idea why sometimes it appends).

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
Re-re-re hello Martin.

Aaargh, I monopolize you forum, sorry.

About problem of previous mail (load strumpract with a status.sta).

After some more test, no good news.  It still appends, even after reboot,
let say 1 times on 3.

To resume if open strumpract and close it, and reopen it, 1 time on 3, the
docking is not ok.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

mse
Administrator
On Sunday 10 September 2017 14:28:23 fredvs wrote:

> Re-re-re hello Martin.
>
> Aaargh, I monopolize you forum, sorry.
>
> About problem of previous mail (load strumpract with a status.sta).
>
> After some more test, no good news.  It still appends, even after reboot,
> let say 1 times on 3.
>
> To resume if open strumpract and close it, and reopen it, 1 time on 3, the
> docking is not ok.
>
Why do you store layout information in statfile although you set the position,
size and dock parent in code? Please clear the statfile property of the forms
other than mainfo.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] MSE and docking.

fredvs
> Why do you store layout information in statfile although you set the
position,
> size and dock parent in code?

I was thinking to keep all infos like checkbox.state, volume, paterns,
history, etc... via the statfile.

> Please clear the statfile property of the forms other than mainfo.

OK, but then I will loose infos like checkbox.state, volume, paterns,
history, etc...

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
1234 ... 6