Error on first new file (language issue)

Everything related to our flagship word processor.
lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Error on first new file (language issue)

Post by lyndondrake » 2016-10-27 01:30:18

I have a customised keyboard setup to help with transliteration, so in Nisus Writer Pro preferences my English (British) language is set to use the "ABC - Ext plus" keyboard layout. I do not have the British or US keyboard layouts in my System Preferences list of input sources.

Whenever Nisus Writer Pro starts up, it displays the following error message:

https://www.dropbox.com/s/jbh3ldab1dmf8 ... 1.png?dl=0

It also loses my setting for the keyboard to associate with "English (British)", changing it from "ABC - Ext plus" to "Greek - polytonic":

https://www.dropbox.com/s/h88y68mdh721j ... 5.png?dl=0

This is kind of annoying. I can change the settings to the correct ones, and those settings persist for as long as Nisus is running, but something obviously happens during startup to lose the settings and (presumably) guess at the correct keyboard to use for British English instead of just using the one I specified in the settings.

User avatar
Hamid
Posts: 734
Joined: 2007-01-17 03:25:42

Re: Error on first new file (language issue)

Post by Hamid » 2016-10-27 07:52:23

It seems that before you customised your keyboard setup, the Nisus New File template was set to open with the British keyboard layout. Then, from the System Preferences> Keyboard>Input Sources, you removed the British keyboard layout. This is why every time you create a new document, you get the message ‘Unable to switch to the "British" keyboard layout’.

This should fix the problem: In NWP Preferences>Nisus New File, tab to Advanced and press the “Open for Editing...” button to open the Nisus New File template. From the menubar select the "ABC - Ext plus" keyboard layout, type any word, and save the file; then delete what you typed, save the file again and close it.

lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Re: Error on first new file (language issue)

Post by lyndondrake » 2016-10-27 07:57:58

That sounds like a good idea, but unfortunately it doesn't work :-(

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Error on first new file (language issue)

Post by martin » 2016-10-27 13:36:51

Hamid's suggestion to check the language of your new file template was a good one, too bad it didn't resolve your problems.

It sounds like you understand the difference between languages and keyboard layouts, but I'd like to be absolutely sure on that, since it's a common point of confusion. Languages in Nisus Writer work like formatting, in that you apply languages to bits of text in your document– just like fonts. The applied language in turn can control the keyboard layout. That is, if you are working on some text with the Spanish language applied, Nisus Writer can automatically switch to a Spanish keyboard layout. For those who want to read more on this, please see our FAQs on the difference between languages and keyboards and how to write in different languages.

With that explanation, are you absolutely sure your documents don't have any unexpected languages applied to their text? Even if your system hasn't been configured to show the British or US keyboard layouts, Nisus Writer may still try to activate them, if you are working in text with an English language applied. Please double check the language in Nisus Writer, eg: in the Language palette, toolbar item, etc.
It also loses my setting for the keyboard to associate with "English (British)", changing it from "ABC - Ext plus" to "Greek - polytonic"
That should not happen. Are you having trouble with any other preferences in Nisus Writer? For example, if you change the language's spelling dictionary, is that setting also lost after relaunching the app?

User avatar
phspaelti
Posts: 956
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Error on first new file (language issue)

Post by phspaelti » 2016-10-27 22:34:50

If you enable the British Keyboard (at least just for a test), but keep the Nisus English language chosen keyboard setting as "ABC - Ext plus" does Nisus keep it or drop it?
philip

lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Re: Error on first new file (language issue)

Post by lyndondrake » 2016-10-27 22:36:30

Here's the document that appears when I start Nisus (i.e. blank new document):

https://www.dropbox.com/s/54x2aj7qp99yg ... 9.png?dl=0

and here's the template doc opened for editing:

https://www.dropbox.com/s/pnhr06uejda80 ... 2.png?dl=0

Looks OK to me?

And I think I do understand the language/keyboard distinction, but of course if I don't understand then I might well be making an unwitting mistake! Happy to provide any logging or so on that might help if you like?

lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Re: Error on first new file (language issue)

Post by lyndondrake » 2016-10-27 22:39:22

@phspaelti

Good idea. If the British keyboard is in the System Preferences list of input sources, I get no error. And Nisus switches to that keyboard when it starts up.

I'd have to say, it does look like there's something hard-coded? Or at least stuck in the preferences and not visible to me to alter?

lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Re: Error on first new file (language issue)

Post by lyndondrake » 2016-10-27 22:42:10

And final bit for the mo: with that suggestion, Nisus still loses my keyboard preference every restart. So it forces the British language option (and my Transliteration language) to use the British keyboard, no matter what I have set myself (what I set works as long as I don't restart Nisus, so it's a preferences saving issue). I actually wonder if I should set up a completely new language with British English etc and delete the supplied one from the list.

User avatar
phspaelti
Posts: 956
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Error on first new file (language issue)

Post by phspaelti » 2016-10-27 22:58:49

lyndondrake wrote: If the British keyboard is in the System Preferences list of input sources, I get no error. And Nisus switches to that keyboard when it starts up.
So in other words it seems to be dropping the chosen keyboard from one restart to the next. Which is presumably why it keeps asking for the British keyboard on restart.
philip

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Error on first new file (language issue)

Post by martin » 2016-10-28 09:49:19

Can you please check if any other settings are lost after quitting and relaunching Nisus Writer? I want to narrow this problem down, and see if the issue affects all your language preferences or just the keyboard layout. Please try adjusting some setting(s) for the language (eg: spelling dictionary) and see if the change is retained after restarting Nisus Writer.

lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Re: Error on first new file (language issue)

Post by lyndondrake » 2016-10-28 11:06:00

I can change the spelling dictionary and other settings (tried it for British English and for one other) and those changes are retained correctly.

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Error on first new file (language issue)

Post by martin » 2016-10-28 11:33:29

Thanks for checking that. Since the problem only seems to affect the keyboard layout, I might guess the problem is caused by your custom keyboard layout. Would you be able to provide the aforementioned "ABC - Ext plus" layout to me somehow? You could post it online or send it via email to:
Image

lyndondrake
Posts: 16
Joined: 2016-10-23 23:53:01

Re: Error on first new file (language issue)

Post by lyndondrake » 2016-10-28 11:48:00

In your email

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Error on first new file (language issue)

Post by martin » 2016-10-28 12:43:32

Thank you for sending in your keyboard layout. I've had a look and the problem is somewhat technical.

First, some background: whenever Nisus Writer tries to switch the keyboard layout for you, it must ask the system (OSX / macOS) to make the switch. To do that Nisus Writer uses a property of each keyboard layout called its identifier. Each identifier is unique among all keyboard layouts.

Your keyboard layout's unique identifier is "org.sil.ukelele.keyboardlayout.abcextplus.abc-extplus". When Nisus Writer relaunches after being quit, it asks the system for information on the keyboard layout with that identifier. Unfortunately the system replies that it doesn't recognize the given identifier, and thus Nisus Writer can't activate the keyboard. I do see the system includes your keyboard layout among the list of all keyboard layouts. So, instead of relying on the system to identify your keyboard, Nisus Writer could look through all keyboards and make the choice itself. I'll file this as something we should change, to sidestep whatever issue is preventing the system from identifying your layout.

In the meantime, maybe there is some way around this problem, by adjusting the options/methods used in Ukelele to create the keyboard layout in the first place? I don't know much about the process, but I do know that other Nisus users have mentioned using Ukelele. Maybe someone else has some advice?

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Error on first new file (language issue)

Post by martin » 2016-10-28 12:48:12

One random idea: can you use options in Ukelele so your keyboard layout's identifier doesn't include that dash? Maybe the system doesn't like that character, or otherwise requires that the final two segments of the identifier are a match.

In other words, change the identifier from:
org.sil.ukelele.keyboardlayout.abcextplus.abc-extplus

To:
org.sil.ukelele.keyboardlayout.abcextplus.abcextplus

I have no idea if this will help, it's just a shot in the dark.

Post Reply