ttscoff / nv

MultiMarkdown version of Notational Velocity with Markdown editing features and preview
http://brettterpstra.com/projects/nvalt
BSD 3-Clause "New" or "Revised" License
1.77k stars 197 forks source link

nvALT launches with window hidden from url scheme #195

Open anatomatic opened 11 years ago

anatomatic commented 11 years ago

2.2b (111) fixed the "No Window on Launch Bug" for me (Issue #162), with one exception, launching from the url scheme nvalt://find/*.

2.2b (111) running on OSX 10.8.4

rjames86 commented 11 years ago

Just going to add my voice here as well.

I've actually tried using both nvalt://find/* and nvalt://URI-escaped-title and I will still get the no window on launch.

I currently have a file in my plain text folder called 'update vacabot.txt'. I'm running the following command in terminal:

open nvalt://update%20vacabot

Console is giving the following exception:

9/7/13 8:40:30.363 AM nvALT[48843]: -[NSCFConstantString host]: unrecognized selector sent to instance 0x7fff7259dfa0 9/7/13 8:40:30.364 AM nvALT[48843]: -[NSCFConstantString host]: unrecognized selector sent to instance 0x7fff7259dfa0 9/7/13 8:40:30.365 AM nvALT[48843]: ( 0 CoreFoundation 0x00007fff8797cb06 exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff86ce53f0 objc_exception_throw + 43 2 CoreFoundation 0x00007fff87a1340a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186 3 CoreFoundation 0x00007fff8796b02e __forwarding + 414 4 CoreFoundation 0x00007fff8796ae18 _CF_forwarding_prep_0 + 232 5 nvALT 0x0000000100072c44 nvALT + 470084 6 nvALT 0x0000000100014fd7 nvALT + 85975 7 CoreFoundation 0x00007fff8792eeda _CFXNotificationPost + 2554 8 Foundation 0x00007fff871087b6 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 9 AppKit 0x00007fff849ee52d -[NSApplication _postDidFinishNotification] + 292 10 AppKit 0x00007fff849ee266 -[NSApplication _sendFinishLaunchingNotification] + 216 11 AppKit 0x00007fff849e7943 _DPSNextEvent + 1725 12 AppKit 0x00007fff849e6df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 13 AppKit 0x00007fff849de1a3 -[NSApplication run] + 517 14 AppKit 0x00007fff84982bd6 NSApplicationMain + 869 15 nvALT 0x000000010000a4f8 nvALT + 42232 16 ??? 0x0000000000000002 0x0 + 2 ) 9/7/13 8:40:30.369 AM nvALT[48843]: finished: '/var/folders/sd/63smbh016d929c_zp797tb8m0000gp/T/NVPlainTextEditingSpace'

anatomatic commented 10 years ago

I'm not an Objective-C coder by any means, but if anyone can point me to the relevant lines of code, I'd be happy to investigate.

anatomatic commented 9 years ago

If anyone is still out there, I discovered a "no duh" workaround. In any script that opens nvAlt through the url scheme, add a line with launch application "nvALT" before open nvalt://find/. The bug only effects launching nvALT from the url scheme, if nvALT is already open, no problems.

iandol commented 7 years ago

This is still very broken. If you keep NVAlt open (either in the dock or menu bar mode) but with the window closed when not in use, the using applescript to activate or even launch does not show the window as it should, and therefore the URI fails to work. This breaks all workflows that involve e.g. Quicksilver or Alfred unless you never close the NVAlt window...