Page 1 of 1

Drawer Focus Problems: Navigator & Styles

Posted: 2007-07-14 10:18:18
by rcgordon
I've run into two separate but perhaps related issues.

1) When I select a bookmark (or multiples) in the Navigator drawer, selection the bookmarked text, Copy and Cut are disabled in the Edit menu. Even if I then close the Navigator, Copy and Cut remain disabled. If I do this from a macro:

Select Bookmark "Whatever"

... Copy and Cut are enabled, as I believe they should be.

2) In style sheet mode, the following macro ...

Style Sheet #Switch into style sheet mode
Select All #Select all styles in Doc
Copy #Ultimately to paste into another document and add styles to it.

... fails because Select All will not select all styles in the document, as it will if the focus is placed on the left pane by clicking into it first.

So what is the best method to automate importing styles to another document which does not have those styles?

Posted: 2007-07-16 10:40:48
by Derick
Hey
I've run into the style issue as well - or a related one, related to the same underlying need to import styles - details here: http://www.nisus.com/forum/viewtopic.ph ... 223610b38b

Derick

Posted: 2007-07-16 11:15:15
by rcgordon
Thanks for the cross-reference, Derick.

So then, to continue the dialog in the Beta forum, concerning the question "Why not just use a .dot file with the existing styles?"

First of all, I do have a Nisus New File.dot that has the desired styles, but consider this scenario:

I open a text file from another program into NWP, and the resulting untitled document contains no styles. That leaves me with the choice of copying the text out of that document into a new Nisus document or importing styles into the original document.

They are both doable, but the second option is broken by the problem that is the focus of this thread.

Default styles

Posted: 2007-07-16 12:02:34
by Hamid
rcgordon wrote:I open a text file from another program into NWP, and the resulting untitled document contains no styles.
You can open a new file in NWP and then drag-and-drop the icon of the text file from another program on to NWP's new file and save it. The saved file will contain your default styles.

If you prefer a macro, you can try Nobumi's Import_default_styles macro:

http://tinyurl.com/2kvdqu

Posted: 2007-07-16 12:52:50
by rcgordon
Hamid,

I just tried the script you referenced, but my test showed that that no defined colors survive the import -- they all come in as black.

Posted: 2007-07-16 12:57:04
by Hamid
What is file format of the original that you want to covert?

Posted: 2007-07-16 13:22:01
by rcgordon
Hamid, there's really no problem with the format. It's a text file generated by a custom Word macro with the extension .xtg. NWP questions the ,xtg extension, but opens it fine as text.

I can really do all that I need to do by hand. I'm just trying to complete a Nisus macro to handle it automatically from start to finish, and that's where my problem is now.

Not serious, but it would not be a problem at all if NWP recognized that text was selected and allowed a copy, as it should. I think failure to do so is a bug.

Re: Drawer Focus Problems: Navigator & Styles

Posted: 2007-07-16 16:26:56
by martin
rcgordon wrote:1) When I select a bookmark (or multiples) in the Navigator drawer, selection the bookmarked text, Copy and Cut are disabled in the Edit menu.
You can move the focus to the main document area by pressing the Enter key (or using the menu Edit > Find > Scroll to Selection).

Re: Drawer Focus Problems: Navigator & Styles

Posted: 2007-07-18 11:16:36
by Hamid
martin wrote:You can move the focus to the main document area by pressing the Enter key (or using the menu Edit > Find > Scroll to Selection).
Or you can double-click the bookmark.