[Lazarus] Sparta Form Designer change

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
I noticed hnb checked in quite a few changes to the sparta docked form designer yesterday.

Is this the majority of the changes coming for sparta? I was going to do some testing on it, but I want to wait until the bulk of the new changes, which I hear are coming, have been checked in.

Oh, and a small summary of what's changed would be appreciated.

Let me know. Thanks.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Okay, I was a little fast on the submit with my last message. I checked with the bug tracker and I can see the sparta related issues to test.

Thanks for the fixes and kudos. Your work is very much appreciated!

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
2017-07-19 9:05 GMT+02:00 Anthony Walter via Lazarus <[hidden email]>:
Okay, I was a little fast on the submit with my last message. I checked with the bug tracker and I can see the sparta related issues to test.

Thanks for the fixes and kudos. Your work is very much appreciated!

Is to early to say "thanks" ;) we need more tests. For now I know from Juha Manninen that Sparta for Qt under Linux is broken :\ 

--
Best regards,
Maciej Izak

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
I don't use for qt lcl widget set, but I can test under window, linux gtk2, and mac carbon.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
2017-07-19 9:26 GMT+02:00 Anthony Walter via Lazarus <[hidden email]>:
I don't use for qt lcl widget set, but I can test under window, linux gtk2, and mac carbon.

would be great!

--
Best regards,
Maciej Izak

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Wed, Jul 19, 2017 at 10:11 AM, Maciej Izak via Lazarus
<[hidden email]> wrote:
> For now I know from Juha Manninen that
> Sparta for Qt under Linux is broken :\

I tested a little more.
Sparta form designer is broken for both GTK2 and QT.
I used FPC trunk but I guess it makes no difference. Manjaro Linux + KDE.

With an empty form the designer just does nothing. It does not react
to mouse clicks even when a component from palette is selected. The
component remains selected in palette.

Then I tested with a form with many components.
With GTK2 the designer stays empty. The IDE still works otherwise.
With QT the IDE freezes. An empty editor shows an hourglass. The
process must be killed.

What more, testing an empty form with QT, the designer shows up
initially when Lazarus starts. Normally the editor is shown initially.
I remember a similar bug was fixed a long time ago (> a year).

Juha
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
I tested on windows a few hours ago and noticed a few things. The biggest problem is that even without sparta installed, inherited forms is no longer working in trunk revisions. 

In fact when I try to register and then create an inherited form using the "File > New..." dialog, the lazarus IDE crashes. I am using code which worked on lazarus a few months back. I will investigate further before filing a bug.

Also, on windows the sparta form design on resize shows the color green in any area that is freshly revealed. I assume that was left in there for testing reasons and is not some strange unexpected behavior.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Okay I've tested on windows it it works great, but not at all on gtk2 linux. I created a test project for inherited forms, because it might not be so straight forward for some of you test. I attached the test project to issue 29615

Here is a page with a video screen capture of the docked form designer working with inherited forms on windows:


Unfortunately I think the sparta docked form editor is currently not working on all other platforms.

Here is a link to the original issue with its status reverted back to "assigned".


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
If it wasn't clear, here are the EXAMPLE units which define and register an inheritable form.

Example note form:


The logic of the registration code:



Usage:

procedure Register;
begin
  RegisterForm(TDockNoteForm, 'Note Form', 'A form to take notes', 'DockNoteFrm');
end;


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Okay I tested on OSX. The sparta docked form designer mostly works. Notable problems on OSX are:

1) Forms appear at runtime without a border. This can be fixed by setting the BorderStyle at runtime to bsSingle or bsSizeable.

Note setting the BorderStyle at design time causes the border to be disabled at runtime, meaning buttons in the caption area are disabled and do not respond to mouse events.

2) Forms are green. I searched the sparta forms files and found the clGreen used as the color of a few items. I switched them to clBtnFace and the look normal again. I assume the green color is/was for testing. It's no problem to fix.

3) Not much of a big deal, but resizing the designer seems a bit laggy, especially when you release the mouse. It takes a second for the designer to refresh when this happens. again not a big deal but it would be nice if it felt a bit snappier.

Related, on OSX the cursor crSizeNWSE doesn't exist and instead reverts to crSizeWE. I suggest using an ${ifdef darwin} and revert to the four directional arrow crSizeAll when sizing from the lower right corner in unit:

./mdi/source/sparta_basicresizeframe.pas

Other than that, it looks good on both OSX and Windows. Let me know if you want my OSX patches.




--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
New issue related to sparta on all platforms:


Deleting TMainMenu crashes Lazarus.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
2017-07-19 16:09 GMT+02:00 Anthony Walter via Lazarus <[hidden email]>:

Also, on windows the sparta form design on resize shows the color green in any area that is freshly revealed. I assume that was left in there for testing reasons and is not some strange unexpected behavior.

This one is a part of new non finished yet feature :). Thanks for many info - very valuable info. I will try to fix few problems in weekend.


--
Best regards,
Maciej Izak

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Maciej,

Thanks for the work on this. I fixed a few problems on OSX (I haven't send patches) and it's working great other than that TMainMenu.

I will put together a few actually useful forms that can registered, just to demonstrate how and why anyone might use them. Maybe I'll sumbit them to bug tracker and they can be included in either packages or examples.

Also, I further generalized a RegisterForm procedure and think it should be added to the IDEIntf. To that end I created this routine.

procedure RegisterForm(const Package: string; FormClass: TCustomFormClass; const Category, Caption, Description, Units: string);

Issue with patch:


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
2017-07-19 15:10 GMT+02:00 Juha Manninen via Lazarus <[hidden email]>:
Sparta form designer is broken for both GTK2 and QT.
... 
With GTK2 the designer stays empty. The IDE still works otherwise.
With QT the IDE freezes. An empty editor shows an hourglass. The

Sparta should works now with GTK2 (tested with Debian 9) - Anthony did the trick and I have fixed other bugs. Now I need to hunt QT :P. New GTK2 test is welcome! :)

--
Best regards,
Maciej Izak

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Thanks, tests and working great on win, mac, and gtk2 linux. I suspect maybe it works on qt linux as well.

BorderStyle and BorderIcons work as well. Good job and thank you :)

Please set these issues to resolved and i will close:

032183
032171
032170
029615

Note: I will be filing two more issues that are effecting gtk2 at least:

1) Default event creation is not working and you cannot delete controls using the Delete keyboard key. I suspect these two issues are caused by the same problem so I will file as one issue.

2) TMainMenu can be removed, but it no longer shows menu items in the designer at the top of the form. This is because pFakeMenu is parented to pBG which is now set hide itself.

Probably a better solution than hiding pBG (sorry about my fix) would be to ensure it's ALWAYS in behind in z-order of pClient. This is something I tried but could not get working. There was always some something triggering pBG to be back on top of pClient which I couldn't isolate.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
A serious issue with QT: When opening an existing form with controls,
the IDE still freezes. Memory overflow, core dump is created.

A minor issue with QT: The designer tab is opened initially when the
IDE is started. The editor tab should be opened.
I remember a similar problem was fixed a long time ago but I am not sure.

Juha
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Juha,

Thanks. I will install Qt and compile a second copy of lazarus to test this issue.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
Juha, I just tested on Qt4 (I haven't tested Qt5 yet) and the sparta form designer is working great with the latest svn trunk, with one outstanding problem:

TMainMenu is not working correctly with the Qt4 widget set. video

In the video linked above the crash occurs when the TMenuMenu is selected and I press the delete key. Not the designer is glitched during the menu editing, adding extra space above the design time menus. That is probably related to the issue. 

I filed a bug for Qt TMainMenu crash: 32206

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
On Wed, Jul 26, 2017 at 9:53 AM, Anthony Walter via Lazarus
<[hidden email]> wrote:
> Juha, I just tested on Qt4 (I haven't tested Qt5 yet) and the sparta form
> designer is working great with the latest svn trunk, ...

Did you try opening an existing project with a form + some components on it?
I works for me, too, when starting with an empty form.
Even then double-click for default action does not work.

Juha
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Sparta Form Designer change

Free Pascal - Lazarus mailing list
No I didn't try that, but I did right now. It locked up my linux. I couldn't even switch to another tty. I'll look into it and possibly file a bug. Thanks.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
12
Loading...