Custom toolbar update?

When changing the Toolbar on a form Pan X changes every toolbar on every form in all databases. Is the ability to change just individual forms on the horizon?

This will most likely never happen. For that to happen, Apple would have to make a huge change to the NSToolBar class, and I don’t see them doing that. They are not really making big changes in AppKit these days.

For those of you that aren’t Cocoa programmers, let me try to explain that another way. The Panorama X toolbar is implemented using Apple’s standard code for toolbars, the same code used by almost every other macOS application – Pages, KeyNote, Safari, etc. Using standard Apple code whenever possible was a top priority for Panorama X, as I’ve discussed on many other posts on this forum. Apples toolbar code requires that all windows of the same type have the same toolbar configuration. So all data sheet windows must have the same tools, all procedure editor windows must have the same tools, etc.

I think it would be awesome if this could be customized the way you are suggesting, but not so awesome that I think it is worth abandoning Apple’s standard tool bar code and rolling my own, which is sure to cause all sorts of problems, especially in future releases of macOS. If Apple ever allows this type of customization Panorama would definitely adopt it, but I think that is super unlikely. I’m pretty sure Apple considers toolbars to be a “finished” section of the operating system.


AppKit allows just one toolbar per window type. However it does allow user customization of those toolbars and provides a manual user interface for that. Possible tool choices vary among apps so the list of possible tools for each window type must provided by the app. The customization interface specifies which tool choices are active and their positions. Could that customization be accessed programmatically? If so something analogous to PanX’s custom menus in conceivable. If not directly accessible via PanX’s own code, might it be accessed indirectly via an AppleScript or a shell script?

The wide scope of any changes would complicate procedurally driven toolbar changes. But, if such were possible, form code triggered by activation of individual form windows might simulate the, to some here, “good old days” of OS9 and earlier in toolbar customization. Personally, I don’t need this and wouldn’t push to prioritize it. But if enough others pushed it might be considered.

Yes, I think so. But that wouldn’t address the issue of wanting to have different tools in different windows. I believe that is what Leo is wanting.

I think, it would indeed address Leo’s issue, because he would be able to change the toolset on the fly when opening a form window. It is clear, the setting would affect all form windows, but he could adjust the toolbar setting instantly when a certain form is opened — if it would be possible to change the tool set programmatically.

The ability to change individual forms would be handy but it’s by no means on my MUST HAVE list. That being said I can see the benefits of John’s workaround to modify the toolbar on an active window. Speaking of active windows… what i would really like to see is the option (perhaps set in a preferences panel) to automatically close the active window when opening a new one. Or perhaps a new menu item in the VIEW menu that does this, maybe by holding down the OPTION key? I sometimes have 6 or more windows open when modifying my databases to Pan X and it can get confusing!

Here is a Hotkey that will close the previous window when activated. Open the View Organizer wizard from the View menu. From the Library menu choose the “Open YourName’s Custom Statements…” item. This will open that file to a “Custom Statements” procedure with only comments about how to enter custom statements. Now, while in this database, create a new procedure named .InitializeFunctions and enter this Hotkey code:

definehotkeys "Global", "CONTROL-1", |||
let winList=arraystrip(arrayfilter(info("windows"),¶,
    {?(import() contains "Panorama Help","",import())}),¶)
window array(winList,2,¶)

Save the file. Now every time you start Panorama X that Hotkey will be created and ready for your use. The Hotkey will close the previous window except it ignores the Panorama Help window so that if it is the second window it will close the third open window instead. I have the Hotkey set to control-1 but you can change that to suit your preference.

OMG Gary! Something really bad happened here. I did as you say but now when I open a database I get an error message from the initialize procedure, then Pan X says my account is not paid (which it is of course) AND there is no view menu.

How the dickens do I get back out of this?

I have no idea how what I suggested could possibly account for the current behavior. I suggest you go to the finder and navigate to the ~/Library/Application Support/PanoramaX/Libraries folder and find the “Your Name’s Custom Statements.pand” file and delete it. There may be another copy at the ~/Library/Application Support/PanoramaX level which should not have the alterations you made. If that doesn’t solve the problem you might try reinstalling Panorama.

I honestly think you might have inadvertently done something other than what I originally suggested. I guess I should be less forthcoming with some of my more technical suggestions in the future.

Man this became a real mess. I deleted that file so now Pan X starts up OK but was still telling me I need to make a payment. I logged back in and all seems OK now. Man, scared the hell out of me.

Something in that procedure did this, I suggest Jim take a look and see what’s up, maybe a bug or whatever.

Gary’s procedure looks fine to me (or at least I should say that there’s nothing there that would affect the login information, I didn’t test the functionality). I agree with Gary that something else must have happened at the same time to cause your Panorama preferences to disappear.

Your Panorama preferences may have gotten corrupted somehow. It sounds like maybe not, since logging on worked fine, but if you want to be extra careful you might want to delete your Panorama preferences using these steps.

• If it is open, Quit from Panorama X
• Open a new window in the Finder
• Choose “Go To Folder” from the “Go” menu
• Enter ~/Library/Preferences/ and press the “Go” button
• Find the file “com.provue.PanoramaX.plist” and move it to the trash
• Relauch Panorama X (this will automatically create new, default preferences)
• Log into your Panorama account

If you’ve set up any options in the Panorama X preferences window, you will need to set them up again.