Quit Command Bug

Quit command is not functioning correctly when any .pandb files have been modified. It only works when no changes have been made or when the “Quit Panorama X” is triggered from the menu bar (Command-Q).
If the “Ask to keep changes when closing documents” option is disabled in the System Settings, the quit command does nothing at all.
If the “Ask to keep changes when closing documents” option is enabled, the quit command opens a dialog, as expected, with three buttons: Save, Revert Changes, and Cancel. However, none of these buttons can be clicked, and the only option available is to force quit.

Sorry, looks like that is an Apple bug that I can do nothing about. You’ll have to use the menu bar to quit.

For anyone else following along, @epansoft means the quit statement. He’s trying to write a procedure that will cause Panorama to quit.

Partially solved the problem: The quit statement will work if executed after all open files are closed using closedatabase, closefile, or revert. However, revert seems to work with simple files only. Is this a known bug?
A special hidden procedure …CloseDatabase in Pan 6 is triggered even when Quit command is selected from the Panorama menu. Does Pan X have a similar feature?
Also, it would be great if the ‘formCLOSE:’ form event procedure could function similarly to the ‘.CloseWindow’ procedure in Pan 6.

Revert is implemented as a single line of code in Panorama which calls the Apple API to revert the document. If it doesn’t work, that’s on Apple.

No, because Apple’s NSDocument API does not provide the ability to perform this sort of operation when a file is closed.

Sorry, again, Apple’s API’s do not allow for this behavior.

Panorama X can do many things that earlier versions of Panorama could never dream of. But on the other hand, there are a few things that Panorama X cannot do that were possible before. It’s clear that some of you assume that these dropped capabilities are because:

  1. Jim forgot that these capabilities existed, or:
  2. Jim didn’t forget, but he is lazy.

Neither of these are true. In the 14 years since development of Panorama X began, every capability of Panorama 6 has been examined and analyzed from every angle. The vast majority of these capabilities have been implemented in Panorama X. Some capabilities, however, are very tightly tied to the operating system. Fundamentally, macOS (i.e. OS X) is is based on a completely different architecture from the earlier MacOS system that existed from 1984 and extended thru the “Carbon” system that was finally discontinued when OS X 10.15 Catalina was released. Some capabilities of earlier versions of Panorama are just not possible any more on the modern macOS architecture (called AppKit).

At this point, if Panorama X doesn’t have a capability that Panorama 6 had, that means it will never have that capability. Well, except in the unlikely case that Apple extends AppKit to enable one of these capabilities, but Apple isn’t really working on AppKit any more. So never. But I can assure you that time has been spent on every one of these dropped capabilities to evaluate whether or not they possibly could be implemented in an AppKit world.

Perhaps one or two of you think I’m wrong, that I just haven’t tried hard enough, if I kept at it, I could figure out how to make AppKit do these things. If you feel that way, I urge you to sign up for an Apple Developer account, it’s only $99/year. Fire up Xcode and get coding. It’s fun and easy! :100:

By the way, I know that most of you don’t think I’m wrong about this - and thank you for your support over these many years. I hope you get a laugh out of the previous paragraph.

1 Like

I have known Jim Rea for 40 years. I didn’t know he knew that lazy was a word. 90% of the times I called him, he was sitting at his computer. Even late at night. Jim is the most dedicated developer I’ve know and this forum illustrates it perfectly.

2 Likes

It certainly does.