issue-#163 Adding 'Decimal' Tabs to Rulers

Merged to the master branch

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Robert » Sun Jul 02, 2017 11:06 am

Josef Templ wrote:Undo support has been added now.

Thats working nicely.

You haven't addressed my trivial comments from my previous post. Actually there are several non-bold RETURNs and HALTs in these files. Although it is not strictly part of the issue I would be tempted, when working on a file, to correct safe formatting errors.

I haven't tested the rtf stuff; I'll wait to look at the diffs.
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Josef Templ » Sun Jul 02, 2017 4:38 pm

Robert wrote:
Josef Templ wrote:Undo support has been added now.

Thats working nicely.

You haven't addressed my trivial comments from my previous post. Actually there are several non-bold RETURNs and HALTs in these files. Although it is not strictly part of the issue I would be tempted, when working on a file, to correct safe formatting errors.

I haven't tested the rtf stuff; I'll wait to look at the diffs.


Sorry, I have overlooked that. It is now bolded.

In general, I think, the "bolding" is intended only for non-local control flow,
i.e. only for RETURN that is not at the end of a function or procedure.
Anyway, it is all bolded now.

When bolding, I noticed that after Find I need to press Ctrl-b twice to get it to bold font.
This is surprising because usually it is set to bold at the first Ctrl-b click.
This is the same behavior as in 1.7 and 1.6. Very strange.

here are the diffs:
https://redmine.blackboxframework.org/projects/blackbox/repository/revisions/b297f7bcd41c570495366f9dd13cdc874da85503/diff?utf8=%E2%9C%93&rev_to=649de72bb6b0d89cd7148b80afca01185b3dad16&type=sbs

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Josef Templ » Sun Jul 02, 2017 8:13 pm

Robert wrote:I have tested build 891 - looking excellent to me.

The details of the implementation are beyond what I can understand (without spending a LOT of time), but some trivial comments are:
- In module TextRulers the type definition of TabDialogHook should be bold.
- In OpenTabDlg are both IFs necessary, or could the second one be an ELSE?
- In NewTabDialogHook the RETURN should be bold.
- Still no Button to open Text/Docu/Rulers.odc.


TabDialogHook is for the extension interface only and I was looking into Services where the hook is also not in bold.
But this seems to be an exception. Maybe it should be bold.

In OpenTabDlg both IFs are necessary, I think.

Docu has not been added yet, so there is also no Help button. Will be added when the features are stable.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Robert » Sun Jul 02, 2017 9:04 pm

Robert wrote:- In OpenTabDlg are both IFs necessary, or could the second one be an ELSE?.

Josef Templ wrote:In OpenTabDlg both IFs are necessary, I think.

Code: Select all
PROCEDURE OpenTabDlg(r: Ruler; tabIndex: INTEGER);
      VAR tc: Kernel.Module;
   BEGIN
      IF tabDialogHook = NIL THEN tc := Kernel.ThisMod("TextCmds") END;
      IF tabDialogHook # NIL THEN tabDialogHook.Open(r, tabIndex) END
   END OpenTabDlg

So calling Kernel.ThisMod can have the side effect of changing tabDialogHook from NIL to non-NIL?, or am I missing something?
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Josef Templ » Mon Jul 03, 2017 7:25 am

Are we still misunderstanding each other? Are you saying this is not equivalent?
Code: Select all
PROCEDURE OpenTabDlg(r: Ruler; tabIndex: INTEGER);
      VAR tc: Kernel.Module;
   BEGIN
      IF tabDialogHook = NIL THEN tc := Kernel.ThisMod("TextCmds")
                             ELSE tabDialogHook.Open(r, tabIndex) END
   END OpenTabDlg

Anyway it is completely unimportant - I don't want to discuss it much more!
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Robert » Mon Jul 03, 2017 7:57 am

The previous post says it was from Josef, but actually I wrote it. Ivan made me a board administrator (which I use to move topics to "Resolved" etc) and I seem to have accidently abused my power. Sorry.
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Josef Templ » Mon Jul 03, 2017 8:33 am

Robert wrote:
Robert wrote:- In OpenTabDlg are both IFs necessary, or could the second one be an ELSE?.

Josef Templ wrote:In OpenTabDlg both IFs are necessary, I think.

Code: Select all
PROCEDURE OpenTabDlg(r: Ruler; tabIndex: INTEGER);
      VAR tc: Kernel.Module;
   BEGIN
      IF tabDialogHook = NIL THEN tc := Kernel.ThisMod("TextCmds") END;
      IF tabDialogHook # NIL THEN tabDialogHook.Open(r, tabIndex) END
   END OpenTabDlg

So calling Kernel.ThisMod can have the side effect of changing tabDialogHook from NIL to non-NIL?, or am I missing something?


I thought I had already responded to this but the posting does not show up. Anyway here is it again:

Under a normal BB startup sequence TextCmds would be loaded anyway and tabDialogHook is already set.
Under a non-standard startup sequence (application specific, for whatever reason different, e.g. different menu bar)
TextCmds may not have been loaded yet and therefore there is an attempt to load it.
This sets tabDialogHook if the attempt is successful.
Opening the tab dialog must be done in any case if tabDialogHook is set. This is a separate step
following the optional loading step.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Josef Templ » Mon Jul 03, 2017 10:49 pm

I have added a Help button and updated the docu.

The Help button opens a new Text/Docu/Tab.odc file
very much like for the Edit->Preferences dialog.
A separate document per dialog looks more systematic to me
and avoids to clutter the other docu files.

See the diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=6976eed47e621ee071aa1fdca8bcf0adeb4f3cf0&rev_to=b297f7bcd41c570495366f9dd13cdc874da85503.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Robert » Tue Jul 04, 2017 8:18 am

Josef Templ wrote:I have added a Help button and updated the docu.

I think we are very close to a good result here.

1 - Why is TextCmds.tabulator.radixChar a string rather than a single CHAR?

2 - Regarding the Help button my suggestion was to add convenient access to the existing documentation (for the existing facilities). You have added convenient access to new documentation for the new facilities.
Thats obviously good, but can't we have both? I suggest adding the line (folded!)
(Further information on using TextRulers is available <StdCmds.OpenBrowser('Text/Docu/User-Man','Text User Manual');StdLinks.ShowTarget('Text Rulers')>here<>.)

to both Text/Docu/Rulers & Text/Docu/Tab.
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#163 Adding 'Decimal' Tabs to Rulers

Postby Josef Templ » Tue Jul 04, 2017 12:19 pm

Robert wrote:
Josef Templ wrote:I have added a Help button and updated the docu.

I think we are very close to a good result here.

1 - Why is TextCmds.tabulator.radixChar a string rather than a single CHAR?

2 - Regarding the Help button my suggestion was to add convenient access to the existing documentation (for the existing facilities). You have added convenient access to new documentation for the new facilities.
Thats obviously good, but can't we have both? I suggest adding the line (folded!)
(Further information on using TextRulers is available <StdCmds.OpenBrowser('Text/Docu/User-Man','Text User Manual');StdLinks.ShowTarget('Text Rulers')>here<>.)

to both Text/Docu/Rulers & Text/Docu/Tab.


@1: it is not possible to link to a CHAR, only ARRAY OF CHAR works.

@2: I have added the suggested links. See diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=77211574c7d9a05502603baedbb43aa44c37cd42&rev_to=6976eed47e621ee071aa1fdca8bcf0adeb4f3cf0.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

PreviousNext

Return to Resolved (Features)

Who is online

Users browsing this forum: No registered users and 1 guest

cron