GEDitCOM Editor - Templates

28 views
Skip to first unread message

David

unread,
Jun 30, 2024, 11:22:48 AM6/30/24
to GEDitCOM II Discussions
Started with New Browser Style > New Record Editing > Template opened to a blank Panel > unable to add any text. Tried with other Template types and had the same result. A bug or a permissions issue or user error?
Fixed by activating 'Show Tab Bar' then closing Tab Bar - Panel now takes focus and allows text entry.

Dave

John Nairn

unread,
Jun 30, 2024, 12:35:57 PM6/30/24
to geditcom-ii-discussions@googlegroups.com geditcom-ii-discussions@googlegroups.com
I am not sure of your steps, but my try did not have any issues. Here is what I did. Let me know if you meant something different:

1. Choose New->User Browser Style in the File menu. This command creates a new Browser Style file
2. Choose “New Record Editing…” in the Template menu. This brings up a panel to enter just a single tag. I entered “INDI” and “INDI Record Editing” was added to the “Record Editing” section of the browser style and that blank template opened in the right side of the window
3. I clicked in the right side and typed some text and it worked as expected.

Interesting about effect of “Show Tab Bar”. The GEDitCOM Editor does not implement tab bars so that command is something MacOS inserts into the Window menu (I am not sure how MacOS even knows which menu is the “Window” menu because no setting specifies that). The only commands I put in that menu are Minimize, Zoom, and Bring All to Front (MacOS might go by these commands because changing the menu title did not change it). MacOS adds (and implements) all other commands. That means neither Show nor Hide tab bars invokes anything in GEDitCOM Editor code. It looks like the tab bar just puts the name of each window in a “tab bar,” but does not combine windows. I would probably have to implement some additional methods to support tab bars. That might be worthwhile, but is not there now.

John

--
You received this message because you are subscribed to the Google Groups "GEDitCOM II Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geditcom-ii-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geditcom-ii-discussions/35c63ac9-c371-4308-85db-958a34298c11n%40googlegroups.com.

David

unread,
Jul 1, 2024, 3:00:43 AM7/1/24
to GEDitCOM II Discussions
The only change  to your outline is that there was no Tab Bar in the new window:

No Tab Bar.png

Add the Tab Bar and this:

Tab Bar.png

Can be repeated. Take an existing Browser Style > NO Tab Bar > Add a new empty template Record or Tag etc > Pane does not have focus. Add the Tab Bar and text entry is OK.



David

unread,
Jul 1, 2024, 3:07:56 AM7/1/24
to GEDitCOM II Discussions
I should have added that Show Tab Bar should NOT be selected before opening the Browser Style. If the Tab Bar is open when the Browser Style opens i.e. focus in the editing pane then closing the Tab Bar does not drop focus!

John Nairn

unread,
Jul 1, 2024, 1:33:32 PM7/1/24
to geditcom-ii-discussions@googlegroups.com geditcom-ii-discussions@googlegroups.com
I still don’t see any issues with focus of template editing. Is there anything making it hard to create and edit templates?

I see these things. Start with new browser style and an Apple Tab bar (showing “Untitled” in the tab bar)

1. Create record editing template (with any tag) - it is created, the “Record Editing” template expands and is selected in blue. I can click in the edit pane on the right and start editing the text. While editing, an insertion bar flashes and selection on the right turns gray.

2. While editing the new template, I created another template. A new one is created in the “Record Editing” section and is selected but focus remains in the text pane so new template is selected and gray and insertion bar is flashing.

I repeated after hiding tab bar or toggling the tab bar and each had effects that I expected.

In MacOS programming, each window as a “first responder” which is an interface element that gets first crack at events. All responders typically (although not allows) have two states - a “focus” state to indicated when they are the current responder and a second state when not in focus (by either switching to another responder in the same window or clicking on a different window). The window for editing a Browser Style as two responders:

1. Index window on the left where focus means current selection in the index is highlighted and blue (this color can change with system settings and light or dark mode) while lost focus means selection is gray (again color may change with system settings).
2. The right panel. That panel can have different types of Browser Style elements, but for “Record Editing” templates it is a text editing field where focus means key strokes go there and is indicated by flashing insertion bar (or selected text in blue). Lost focus will stop the insertion bar (or change selected text to be gray).

As far as I can tell, this focus is working correctly with or without the tab bar and after toggling the tab bar. It seems that the tab bar is not a responder (it is like  button that can be click, but does not take focus), which means it should not change focus between other two responders. The two possible states with the window is active are:

1. Index has focus - selection is blue and key strokes go to that index. I don’t use key strokes in the index window, but they do some things. Up and down cursor is useful to scroll the selections. Letters try to select alphabetically. A tab key lets you edit the name and tabbing again switches focus to the text editing field.

2. Text editing pane has focus - selection on left is gray, key strokes do text editing, and insertion bar flashes.

Your two images showed these two states working correctly? According to MacOS rules, neither creating a new template nor toggling the tab bar should change first responder (the user does that whenever possible, unless coding needs to take over from some reason). If index has focus, it retains focus and the new template is selected in blue. If the editing pane has focus, it retains focus and ready to edit the new template (now selected in gray in the index). Whichever one has focus while toggling the tab bar, it should retain that focus.

I mentioned before, I have no coding in GEDitCOM Editor to deal with the tab bar, but I found it has much functionality. If you active the tab bar you can at least (and maybe more) do the following:

1. Click the “+” icon on the right to create a new Browser Style in a new tab pane in that window. So if above test created “Untitled”, the “+” icon will create “Untitled 2” in a new pane in that window. It gets a little confusing because GEDitCOM Editing can create Browser Styles or Extensions. It “+” icon seems to duplicate what ever is in the current window. But if you put Browser Styles and Extensions in the same window, the “+” icon creates one of them, but I can’t figure out how it decides.
2. If you have a Browser Style or Extension open in another window and it has a tab bar, you can click on its tab bar and drag to tab bar in another window and it will move to that window’s tab bar.
3. You can drag a tab pane out of any window to move it to its own window.
4. “x” on any tab is same as document close command.

The only thing missing is that normal methods to create and open new Browser Styles or Extensions always create a new window. An application setting might have a preference to open new documents in pane in of existing window rather than in new windows. Personally I am used to separate windows, but maybe not everyone.

John

David

unread,
Jul 2, 2024, 2:54:51 AM7/2/24
to GEDitCOM II Discussions
Tab Bar Closed - Problem - Open GEDitCOM Editor > add a new Template > the user cannot enter text in the Edit Pane.

I can see why this happens and how using the Tab Bar is a benefit. An Editor should edit without these focus issues. It is an Apple problem. For my purposes I have activated Show Tab Bar and this persists as GEDitCOM Editor is opened and closed fixing the focus issue.

Reply all
Reply to author
Forward
0 new messages