Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - Cmd-N fails to open a new window
Cmd-N fails to open a new window
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NeoOffice Forum Index -> NeoOffice Beta Releases
View previous topic :: View next topic  
Author Message
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Mon Aug 06, 2012 7:01 am    Post subject: Cmd-N fails to open a new window Reply with quote

In very specific circumstances and on only one of my machines Cmd-N does not open a new window.

Steps to reproduce:
- Launch NeoOffice, a new writer document opens
- Create a second Writer document with Cmd-N
- Minimise the new document using the yellow titlebar button
- Close the first window with Cmd-W
- Type Cmd-N
- Nothing happens
- Looking at the File::New menu shows no keyboard shortcut.

However the following steps work.

- Launch NeoOffice, a new writer document opens
- Close this document with Cmd-W
- Create a new spreadsheet using File::New::Spreadsheet
- Create a second spreadsheet document with Cmd-N
- Minimise the new document using the yellow titlebar button
- Close the first window with Cmd-W
- Type Cmd-N
- A new spreadsheet opens
- Looking at the File::New menu shows Cmd-N next to Spreadsheet

Things I have done to resolve/research the problem.

1. Created a new user

In a new user account NeoOffice behaves as expected with Cmd-N appearing next to Text Document in the File::New menu when the front most document is a writer document.

2. Deleted user preferences.

In my main account I have moved the NeoOffice-3.0 folder out of ~/Library/Preferences to the desktop while NeoOffice was not running. When next launching NeoOffice a new NeoOffice-3.0 folder is created. However the problem still persists.

3. Changed the setting of "Enable access for assistive devices"

This setting in Apple's System Preferences::Universal Access pane seems to have no effect on the problem.

4. Changed the system language.

As my old Preferences folder contains folder pertaining to en-US and en-GB I tried changing the system language to English from British English, trashing the preferences and re-launch NeoOffice, sadly to no avail.

What next?

Have I missed some other NeoOffice settings file?
My old settings folder contains files such as the one attached (from ~/Library/Preferences/NeoOffice-3.0/User/config/soffice.cfg/global/accelerator/en-GB, but no such files exist in the newly create NeoOffice-3.0 folder.

Are there any other sensible trouble shooting steps I can take?

Thanks.

Andy
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11882
Location: California, USA

PostPosted: Mon Aug 06, 2012 7:20 am    Post subject: Reply with quote

I appreciate your list of all of the detailed troubleshooting steps that you did. That helps narrow down the possible causes significantly.

Since this problem only occurs for one user, but not a new user, on your machine and disabling Universal Access has no effect, can you tell us if there is a NeoOffice-2.2 folder in your ~/Library/Preferences folder? I ask this because when you deleted your NeoOffice-3.0 folder, any user preferences will be imported from your NeoOffice-2.2 folder if it exists.

If a NeoOffice-2.2 folder exists, can you quit NeoOffice, move both the NeoOffice-2.2 and NeoOffice-3.0 folders out of the ~/Library/Preferences folder, and relaunch NeoOffice?

Patrick
Back to top
View user's profile Send private message Visit poster's website
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Mon Aug 06, 2012 7:34 am    Post subject: Reply with quote

Yes there was a NeoOffice-2.2 folder there. I moved them both and re-started. The problem persists.

I attach (this time) one of the files I meant to attach before, it would appear to have come accross from NeoOffice 2.2, but is maybe a red herring as even without these files in the new preferences folder the problem remains.

My next thought is that it is a conflict with a login item. However when I deleted com.apple.loginitems.plist and ....plist.lockfile and log out and in again all the same login items launched. I'll try deleting them manually from the System Preferences app and try again.

Andy
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11882
Location: California, USA

PostPosted: Mon Aug 06, 2012 7:45 am    Post subject: Reply with quote

amayze wrote:
I attach (this time) one of the files I meant to attach before, it would appear to have come accross from NeoOffice 2.2, but is maybe a red herring as even without these files in the new preferences folder the problem remains.


Your current.xml is identical mine so we can conclude that yours has no customizations in it.

amayze wrote:
My next thought is that it is a conflict with a login item. However when I deleted com.apple.loginitems.plist and ....plist.lockfile and log out and in again all the same login items launched. I'll try deleting them manually from the System Preferences app and try again.


You can also try quitting NeoOffice, delete the ~/Library/Preferences/org.neooffice.NeoOffice.* files, and relaunch NeoOffice. These files are where Mac OS X writes preferences for native dialogs and other native user interface items that NeoOffice uses so maybe those files are causing a conflict?

Patrick
Back to top
View user's profile Send private message Visit poster's website
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Mon Aug 06, 2012 8:02 am    Post subject: Reply with quote

That's got it!! Thanks!

- Deleted all the org.neooffice.* files in ~/Library/Preferences
- Moved out the NeoOffice-3.0 folder from the same places
- Started NeoOffice.
- Cmd-N now works in the situation described above and the shortcut appears next to Text Document in File::New when appropriate.

Then I:

- Quit NeoOffice
- Moved back the original NeoOffice-3.0 folder.
- Launched NeoOffice
- Cmd-N still works as expected.

A very odd problem. Thanks for pointing me in the right direction to fix it.

I've attached the two .plist files in case there is anything in them that is helpful to you, Patrick.

Thanks again.

Andy
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11882
Location: California, USA

PostPosted: Mon Aug 06, 2012 8:18 am    Post subject: Reply with quote

amayze wrote:
I've attached the two .plist files in case there is anything in them that is helpful to you, Patrick.


I noticed that one of your .plist files had iMediaBrowser settings so I opened the Media Browser by selecting the Tools :: Add-Ons :: Show Media Browser menu.

When I use your steps with the Media Browser window is open, the menubar becomes empty. Is that what you were seeing?

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11882
Location: California, USA

PostPosted: Mon Aug 06, 2012 9:32 am    Post subject: Reply with quote

FYI. I think that I have fixed the empty menubar bug when the iMediaBrowser window is open in the following test patch:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.3_Beta_2-Patch-0-Test-12-Intel.dmg

Patrick
Back to top
View user's profile Send private message Visit poster's website
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Mon Aug 06, 2012 12:42 pm    Post subject: Reply with quote

I've installed NeoOffice 3.3 Beta 2 Patch 0 Test 12.

I've worked out the problem I was having with Cmd-N.

At some point in the past I had set up Cmd-Opt-1 as a Shortcut for "Text Document" in NeoOffice using System Preferences:: Keyboard::Keyboard Shortcuts::Application Shortcuts. This allowed me to open a new document when only the NeoOffice menu was showing, but I'd pretty much forgotten about it.

In the course of troubling shooting I did check the above preference and there was no reference to NeoOffice in that window. I've upgraded the OS at least once if not twice or three times since I set that preference (ie from OS X 10.6 at least, but possibly 10.5 or 10.4), so maybe the OS has lost track of it.

It was only when I glanced through the org.neoffice.NeoOffice.plist file that I noticed this entry:

Code:
   <key>NSUserKeyEquivalents</key>
   <dict>
      <key>Text Document</key>
      <string>@~1</string>
   </dict>

I can now recreate the Cmd-N problem at home by adding Cmd-Opt-1 as the shortcut for "Text Document" using system preferences and confirm that doing so adds the above entry to org.neoffice.NeoOffice.plist.

Removing the shortcut immediately removes the entry from the .plist file and resolves the problem without requiring to restart NeoOffice.

I don't know if this problem now counts as user stupidity rather than a bug! Not for me to decide!! Smile

Thanks for your patience, Patrick.

Yours,

Andy
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11882
Location: California, USA

PostPosted: Mon Aug 06, 2012 1:04 pm    Post subject: Reply with quote

amayze wrote:
I can now recreate the Cmd-N problem at home by adding Cmd-Opt-1 as the shortcut for "Text Document" using system preferences and confirm that doing so adds the above entry to org.neoffice.NeoOffice.plist.


What is happening is that when you assign a key shortcut in the System Preference application's Keyboard options, that key shortcut will reject any request by the application itself to set a key shortcut. As a result, you see no key shortcut for the File :: New :: Text Document menu.

In some cases Command-N will still work in spite of Mac OS X's rejection of the NeoOffice code's attempt to set that menu to have the Command-N shortcut. The reason is that no other menu item in the menus has Command-N so those key events get routed to the unminimized, focus window as regular key events.

The NeoOffice code is able to handle such key events the same as menu item selection events. However, if there are no unminimized windows, Mac OS X will give up and beep.

Hope that explains what you are seeing.

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Aug 06, 2012 1:12 pm    Post subject: Reply with quote

amayze wrote:
I can now recreate the Cmd-N problem at home by adding Cmd-Opt-1 as the shortcut for "Text Document" using system preferences and confirm that doing so adds the above entry to org.neoffice.NeoOffice.plist.

That's unfortunate; we've been suggesting/using that method ever since NeoOffice got native menus to provide a shortcut for opening the various document types.

Over the last several major NeoOffice+Mac OS X releases, those shortcuts have been assigned by the OS to the items in the NeoOffice: New menu, but it seems like now with the latest code+OS, they're overwriting the (changes-with-active-NeoOffice-component) Cmd-N shortcut in File: New… Sad

Edit: Patrick posted while I was writing this; looks like there is nothing that can be done Sad

Edit 2: I've updated the NeoWiki article with a note about this.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11882
Location: California, USA

PostPosted: Mon Aug 06, 2012 1:26 pm    Post subject: Reply with quote

sardisson wrote:
That's unfortunate; we've been suggesting/using that method ever since NeoOffice got native menus to provide a shortcut for opening the various document types.


Note that whatever key shortcut you assign in the System Preference application's Keyboard panel will work. Apple just allow you to have 2 key shortcuts assigned to a single menu item anymore.

In amayze's case, Command-Option-1 would also trigger the File :: New :: Text Document menu. He had just forgotten that he had set such a custom key shortcut.

Patrick
Back to top
View user's profile Send private message Visit poster's website
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Mon Aug 06, 2012 2:51 pm    Post subject: Reply with quote

It wasn't just me that had forgotten! It seems that part of The OS had too, but not all of it.

What added to the confusion is that as well as not allowing more than one shortcut for a menu item OS X only seems to display the shortcut next to the first match. So any shortcuts for creating new documents show up only under NeoOffice::New and not File::New.

You live and learn!

Andy
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Aug 06, 2012 7:48 pm    Post subject: Reply with quote

pluby wrote:
[Note that whatever key shortcut you assign in the System Preference application's Keyboard panel will work. [...]

In amayze's case, Command-Option-1 would also trigger the File :: New :: Text Document menu.

Right, I specified in the note that assigning (alternate) shortucts to those menu items will (only) break the "component-specific/moveable" Cmd-N shortcut.

amayze wrote:
It wasn't just me that had forgotten! It seems that part of The OS had too, but not all of it.

Yeah, that's been a bug in the OS since at least 10.3 Razz It's also documented in the wiki, FWIW.

amayze wrote:
What added to the confusion is that as well as not allowing more than one shortcut for a menu item OS X only seems to display the shortcut next to the first match. So any shortcuts for creating new documents show up only under NeoOffice::New and not File::New.

That's also a long-time annoyance, though in Apple's defense I don't think most normal Cocoa apps put the same menu item in multiple menus (or have two identically-named items in different menus that do different things! which I've also seen in apps "ported" from other OSes) Neutral

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    NeoOffice Forum Index -> NeoOffice Beta Releases All times are GMT - 7 Hours
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds