Reply to topic  [ 10 posts ] 
enabling glossaries 
Author Message

Joined: 2007-03-28 07:30:34
Posts: 139
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


2011-02-05 08:54:57
Profile

Joined: 2008-05-17 04:02:32
Posts: 400
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?


2011-02-06 04:57:44
Profile

Joined: 2007-03-28 07:30:34
Posts: 139
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


2011-02-06 08:35:59
Profile

Joined: 2008-05-17 04:02:32
Posts: 400
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.


2011-02-06 09:10:30
Profile

Joined: 2007-03-28 07:30:34
Posts: 139
[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.


2011-02-06 09:31:05
Profile

Joined: 2008-05-17 04:02:32
Posts: 400
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


2011-02-06 09:45:33
Profile

Joined: 2007-03-28 07:30:34
Posts: 139
$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? ;)


2011-02-06 09:53:48
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2011-02-10 10:06:24
Profile WWW

Joined: 2007-03-28 07:30:34
Posts: 139
[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.


2011-02-10 11:25:42
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2011-02-10 11:42:49
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software