enabling glossaries

Get help using and writing Nisus Writer Pro macros.
Post Reply
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

enabling glossaries

Post by credneb »

I have a group of macros for manipulating glossary files, particularly adding entries without going to the preference pane and adding them manually.

They use a common procedure that presents a list of glossaries and automatically selects the one corresponding to the current job while letting me select a different glossary if needed. Works like a charm.

The only unsatisfying issue was that to enable a glossary, you still had to go to the preference pane and manually check the box. But I could still automatically add entries, which included saving the edited glossary file, of course, to a glossary file that was *not* enabled.

At some point some time ago, I noticed that this situation changed. Making and saving a change to an un-enabled glossary file changed the status of that glossary to enable -- the abbreviations expanded and the enable box was checked in the preference pane.

Yesterday, Nisus quit enabling the un-enabled glossary file when a change was made and the file saved.

I quit and rebooted several times with the same result.

Being able to enable a glossary file by simply saving a change to it is a great time saver.

Any idea what happened? (using Pro 1.4.1)

Cliff
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: enabling glossaries

Post by Kino »

credneb wrote:At some point some time ago, I noticed that this situation changed. Making and saving a change to an un-enabled glossary file changed the status of that glossary to enable -- the abbreviations expanded and the enable box was checked in the preference pane.
According to my simple testing, a glossary file seems to be automatically enabled only when it is saved with a new name. How does your macro(s) save it?
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

Re: enabling glossaries

Post by credneb »

The macro doesn't save it. I save the glossary file manually with cmd-S.

The glossary file in this case is typically one that I've moved (and possibly renamed) at the Finder level into the glossary folder while or before Nisus is running (it doesn't matter which). In Nisus, I then run my macro, and edit and save the file. It was this step that didn't, then did, and now again doesn't, enable the glossary.

I've never renamed a glossary file while editing it, so the renaming step seems irrelevant to the above behavior.

Cliff Bender
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: enabling glossaries

Post by Kino »

credneb wrote:The glossary file in this case is typically one that I've moved (and possibly renamed) at the Finder level into the glossary folder while or before Nisus is running (it doesn't matter which).
From a computer program’s point of view, that has exactly the same effect as saving a file with another name. NWP is watching Glossaries folder and enables all glossary files which are not in the list of disabled glossaries.

Edit: I was wrong. NWP does not always watch Glossaries folder. However, it looks at it when starting up and Save As seems to make NWP aware of changes in the folder.
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

Re: enabling glossaries

Post by credneb »

[quote]From a computer program’s point of view, that has exactly the same effect as saving a file with another name. NWP is watching Glossaries folder and enables all glossary files which are not in the list of disabled glossaries[/quote]

It seems to be a bit more complicated than that, perhaps involving the timing when Nisus updates its internal lists.

With Nisus running, I just moved a glossary into the gloss folder. Open the pref pane and the glossary is not included in the list.
If I open the file with the macro, and make and save a change, the file is enabled and appears in the pref pane.
Then go to the pref pane and disable the glossary.
Now open it again with the macro (or probably even from cmd-O) and save a change. The file is now not re-enabled.

It was before.
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: enabling glossaries

Post by Kino »

I think it is not so meaningful to discuss the conditions under which NWP updates the list of glossaries. Wouldn’t it be better for you to send a feedback requesting them to add something like these instead? ;-)

   $array = Glossary Names # filenames without extension
   $array = Enabled Glossary Names
   Enable Glossary name
   Disable Glossary name
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

Re: enabling glossaries

Post by credneb »

$array = Glossary Names # filenames without extension
$array = Enabled Glossary Names
Enable Glossary name
Disable Glossary name

I suppose that would be a good idea. But it still doesn't answer the original question.

Martin, can we request these commands? ;)
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: enabling glossaries

Post by martin »

Any changes to the way and frequency with which NWP reloads glossaries are happenstance; you should't rely upon it. And personally I don't feel that making a change to a glossary file should automatically enable it. Perhaps that behavior worked nicely for you and your macro, but it doesn't seem very user friendly to me. A change in enabled/disabled should only occur when the user adjusts the checkmark in the preferences.

Thanks for your suggestion regarding the new macro commands. I'll file it as a feature request.
credneb
Posts: 187
Joined: 2007-03-28 07:30:34

Re: enabling glossaries

Post by credneb »

[quote="martin"]A change in enabled/disabled should only occur when the user adjusts the checkmark in the preferences.[/quote]

User-friendliness opinions aside, the change in enabled/disabled does NOT occur *only* when the user checks the checkmark -- which was the source of my question.

With Nisus running, move a glossary file into the Glossary folder.
-> the glossary will not show up in the preference pane and is not enabled.

Open the glossary, make a change, save it, and close the glossary.
-> The glossary is enabled. Go to the pref pane and Nisus has added it to the list and enabled that glossary -- without the user checking the check box.

This seems counter to what "should only occur" and is repeatable.

The other behavior I described is no longer repeatable, hence my question.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: enabling glossaries

Post by martin »

Ah, I see what you are saying. Well yes, new glossary files that have just been discovered will be enabled by default. This is also desired/natural I think.

I'm not exactly sure what triggers NWP to discover new glossaries, but saving an open glossary file will always do the trick, since NWP needs to reload/rebuild the glossary contents.
Post Reply