Recent

Author Topic: The "Enable DWARF" dialog - before starting the debugger.  (Read 9325 times)

zamtmn

  • Hero Member
  • *****
  • Posts: 594
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #45 on: September 20, 2022, 12:25:26 pm »
Arioch
Show how these dialogs will look in other widgesets. I'm afraid we will have a bad surprise((

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #46 on: September 20, 2022, 01:05:29 pm »
Arioch
Show how these dialogs will look in other widgesets. I'm afraid we will have a bad surprise((

i can not - https://forum.lazarus.freepascal.org/index.php/topic,60531.msg453747.html#msg453747

also, ATM i am more inclined to recall the TTaskDialog idea and rather do separately with short-term custom window for FPDebug immediate need and slow long term enhancement of TaskDialog for the "greater good"

wp

  • Hero Member
  • *****
  • Posts: 11910
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #47 on: September 20, 2022, 03:46:49 pm »
Show how these dialogs will look in other widgesets. I'm afraid we will have a bad surprise((
Played with the LCL TaskDialog and tried to create an adapted version of the screenshot in reply #27. Here's my result for Win11, Linux-Mint-gtk2, mac Mojave, and for comparison Delphi XE 10.4 (on Win 11). They are all pretty much the same (except for Delphi which does not have the option tdiQuestion for the FooterIcon). (The order of the OK and Cancel buttons (or all buttons?) should be reworked in the non-Windows version of the LCL Taskdialog).
« Last Edit: September 20, 2022, 03:49:58 pm by wp »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #48 on: September 20, 2022, 05:23:23 pm »
also, ATM i am more inclined to recall the TTaskDialog idea and rather do separately with short-term custom window for FPDebug immediate need and slow long term enhancement of TaskDialog for the "greater good"

Sorry, but no.


I made a clear statement what will be accepted

So to remove any doubt:

This https://forum.lazarus.freepascal.org/index.php/topic,60624.msg454194.html#msg454194
=> radio + one embedded "link button" for "run without dbg"

With the addition that one radio must be preselected.

The link to become a help button.

Is 100% ok.

I will merge/apply this.
No backsies on this.

As mentioned all captions must be initialized from resource strings (IIRC unit LazarusIdeStringConst)



I also stand by my prior word, that for this one patch/merge-request I will accept it against fixes branch, if it can be cherry picked to main without major merge conflicts. (tree conflicts/ chunks of more than a dozen lines conflicting)
It will very most likely only appear in the main branch.

I am happy to assist further with the help system, or the new debugger procedure, as soon as I see a first patch against actual IDE code (I.e. not just the form, but IDE code actually creating/calling that form.)

Re-reading it: "The link to become a help button." refers to the "<a>" embedded link in the text.

I further stated:
2. No, like i said, fixing design first. I do not want to make elaborate work only for it to be discarded and said to be not-Lazarish. One time is enough. Agreement on design first, implementing later.
Ok, then simply set the first radio to be the default.




It seems the main missing issue is, that no one checked yet what will happen on other OS.

On the last point: If any part is not possible, leave it out for now. I have concrete ideas (based on the LCL TaskDialog) how to solve them. But I will not go there, before I do have code that can be successfully applied to the IDE.

For now (more than) enough options were explored: It is "whatever of the above is possible with the existing LCL TaskDialog" as first step.





Tested under Linux. Mostly ok.
Only the buttons (if tfUseCommandLinks*) is set,  will always be above the radios.



That might mean to defer the Help button => but the initial goal to reduce the width would be reached.
Also: a run without debug.

And even if the pre-select is not smart to begin, that will be easy to add, and help the user with the choice.


If a help button has to be deferred it goes into stage 2.


Arioch

  • Sr. Member
  • ****
  • Posts: 421

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #50 on: September 20, 2022, 05:43:10 pm »
I patched LCL to never use native API, even on Windows. I confirm the reversed opsitioning of command buttns vs radiobutotns.

https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=60652.0;attach=50880;image

The event hack to prevent closing on Hepl button works, so given this is pure-LCL button should work on every platform.

But the non-implementaiton of "command hints" (lesser, secondary button caption), makes warning user about non-closing behavior of Help impossible.
« Last Edit: September 20, 2022, 05:45:26 pm by Arioch »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #51 on: September 20, 2022, 05:53:40 pm »
As I said, I have ideas how to resolve that. But I wont bother writing them up, until I have code that runs in the IDE for those parts that do work (I.e just the radios...)

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #52 on: September 20, 2022, 06:06:05 pm »
Can you fix the radiobuttons vs common buttons placement ?

needs just swapping two if-blocks around.

can you apply to both main and Fixes_2_2 ?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #53 on: September 20, 2022, 06:16:40 pm »
It's based on one of the flags (use...links).

Can be done. Once their is a need. I.e. once there is code.

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #54 on: September 20, 2022, 06:19:45 pm »
That being said,

1)  would you prefer

a) no push-button for Help at all (no help function at all)
b) Help Button 

2) positioning of buttons, horizontal or vertical ?

3) if vertical - with "arrow" pictures or without? I found no way to make pictures different.
IMHO "arrow" on help button reinforces wrong impression

4) if vertical, should "help" be the last (bottom) one, or go between radio-buttons and "run with no debug" ?

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #55 on: September 20, 2022, 06:23:54 pm »
It's based on one of the flags (use...links).

Can be done. Once their is a need. I.e. once there is code.

Guess you missed the point.

Compare three pictures, focus on radiobuttons and "big buttons". Which are top and which are below

Windows native (on the right) - https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=60624.0;attach=50866;image
Current LCL - https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=60624.0;attach=50882;image
After the patch - https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=60624.0;attach=50884;image

The implementation was wrong, flags don't fix it, only the patch (trivial, swapping two code blocks)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #56 on: September 20, 2022, 06:43:51 pm »
Once their is a need. I.e. once there is code.

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #57 on: September 20, 2022, 07:07:01 pm »
oookay, then i go with the 1st variant, horizontal small buttons

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #58 on: September 20, 2022, 07:28:32 pm »
oookay, then i go with the 1st variant, horizontal small buttons
Ok

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Re: The "Enable DWARF" dialog - before starting the debugger.
« Reply #59 on: September 20, 2022, 07:29:02 pm »
There is a "help system" in the IDE, and a file with all the links in the docs folder.
The help button has to use that existing system.

ide\codetemplatesdlg.pas
LazarusHelp.ShowHelpForIDEControl(Self);

This won't do....
There is no any control to call the help over.

The original code was
Code: Pascal  [Select][+][-]
  1.       case IDEQuestionDialog(lisEnableOptionDwarf,
  2.           Format(lisTheProjectDoesNotUseDwarf, [DebugClass.Caption]),
  3.           mtConfirmation, [1 {mrOk}, lisEnableOptionDwarf2Sets,
  4.                            12, lisEnableOptionDwarf2,
  5.                            13, lisEnableOptionDwarf3,
  6.                            mrCancel])
  7.  

Here is one more parameter const HelpKeyword: string = '') - unused

All the calls in D:\fpcupdeluxe\lazarus_deb\ide\main.pp also lack this parameter.  And rightfully so....

Code: Pascal  [Select][+][-]
  1. function QuestionDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType;
  2.   Buttons: array of const; const HelpKeyword: string): TModalResult;
  3. begin
  4.   // TODO: handle HelpKeyword
  5.   Result := QuestionDlg(aCaption, aMsg, DlgType, Buttons, 0);
  6. end;

Basically, you just do not have it in IDE Help system to call help over some (potentially extensible) string ID


Can you debug CallStackDialog and find how it does open WWW wiki window?
Is there at  least some semi-official semi-unified way or a total ad hoc ?

 

TinyPortal © 2005-2018