Hide statement not hiding

I have a procedure that does a lot of work in the datasheet. I takes about a minute and a half to run. I am using Hide and Show but the datasheet does not seem to be hiding at all.
For the 90 seconds I get to watch it plod along filling various fields with data and moving around.
Isn’t the “Hide” supposed to stop the data sheet from redrawing everything?

You should be using the currently recommended noshow and endnoshow instead of hide and show.

I guess I should have also noted the additional use of the showpage statement to be used with the noshow and endnoshow statements.

noshow

//your processing code

showpage
endnoshow

Gary is correct that since the noshow statement was introduced, we strongly urged avoiding the hide statement. However, in Panorama X the hide statement actually does exactly the same thing as the noshow statement, so it doesn’t really matter which one you use. Neither one stops all display. I would think that it would not show filling of fields, but it definitely will still show moving around to different fields. If you don’t want to show that, best to close the data sheet and use an empty form window.

I’m confused about this (what else is new?)… I used to have a simple Hide This Window and Show All Windows utilities. Working in a number of related files, but I don’t want to see some of them all the time, so a quick COMMAND-8 hid the window and a COMMAND-4 showed all currently open windows. I’m not getting the new world of show/noshow.

That’s a different subject. The Hide command didn’t hide the window, it hid the activity that was going on while a procedure was running. It would make some procedures run faster, because the window wasn’t being redrawn every time something changed. A Show command would force a redraw, showing the end result of those changes.

NoShow produces results that are similar to, but not identical, to Hide, and it does it in a way that’s less likely to cause a crash.

All I know is that <Window “Hide This Window”> worked to hide the window. It did the same thing as clicking the orange dot. Not a major operation, but it was convenient. And then <Window “Show All Windows”> brought all running Pan windows out of hiding. If that can’t be done now, so be it. Help said noshow is the same as hide, and it may be a different subject, but when it said it is the same as hide, I had a momentary glimmer of hope. Won’t happen again.

You’re referring to built-in commands under the Windows menu of Panorama (6). They are different than the paired hide (at least roughly the same as noshow) and show commands present in the Panorama programming languages of each Pan6 and PanX. I don’t believe the Pan6 offered programmatic access to them and PanX offers neither direct menu access nor direct programmatic access to them. Moreover, a quick test of several newer apps (and those still using Pan6 likely use few, if any, other apps as old) showed no others offering those commands. They do offer under the “app” menu, as do both Pan6 and PanX, options to hide its windows or show its windows. But other than that all or nothing option, and listings of open windows at each app’s Window menus and dock icons, window management via menus, once common IIRC, no longer is. I suspect Apple has deprecated them; they may even have been part of the Carbon framework in which case they’d be gone in Catalina.

However, you could emulate their behavior by writing some procedures and even assign your old hot keys to them. I don’t know whether you can procedurally send individual windows to the dock or call them back from the dock. I don’t spot hooks for either in PanX’s language; maybe such is possible via shellscripts or applescripts. But you can certainly close or open windows programmatically. And you can move their window positions outside your desktop rectangle and thus out of view, and move them back at will. Your code would need to do some bookkeeping as to the current definition of ‘all’ and ‘other.’ Help and the video series would show you the mechanics required. I wouldn’t suggest it as a beginner’s project, but it is possible.

Don’t give up hope. Many in this forum are loathe to admit anything is impossible to do with either PanX or its predecessor. Even when something initially seems impossible here clever workarounds have appeared. Although the details of Pan6 and PanX solutions may vary. Willingness to learn and to learn different ways of doing things is helpful, but without that you’d only scrape the surface of what’s possible with either.

When converting my pile of Pan6 files to PanX I tried to do as much as I then understood to all my conversions in parallel, skipping over what I didn’t yet understand. While implementing what I understood I often had insights arise to solve other problems. Meanwhile I kept using the Pan6 files until their replacements were ready. It kept me busy and happily making progress, doing stuff that needed to be done in any case. When I finally ran out of self solutions the problem stack was much less daunting. Some problems resulted from not yet implemented features or unfixed bugs. Those have come a long way since PanX’s initial release. The biggest missing piece is doubtless Server, which I’d never used so don’t miss personally. But enough here obviously do miss it to justify Jim’s concentration on getting it done the past several months. I received help personally for some by Jim and several users in this forum for what I couldn’t solve myself. Trying to follow as much of other users problems and suggested solutions in this forum has also added to my knowledge.

Here is a Hotkey to send the current Panorama X window to the dock (miniaturized):

definehotkeys "Global", "COMMAND-8", 
	|||applescript {tell application "PanoramaX"
	set miniaturized of window 1 to true
end tell}|||

Here is a Hotkey to bring back all Panorama X windows from the dock:

definehotkeys "Global", "COMMAND-4",
	|||applescript {tell application "PanoramaX"
	set miniaturized of every window to false
end tell}|||

I have one final update on this subject. After nosing around in Panorama X’s AppleScript library I found a way to actually hide the windows rather than minimizing them to the dock. I offer three Hotkeys that Hide Other Windows (command-5), Hide This Window (command-8) and Show All Windows (command-4). This code can be run from an .Initialize procedure in one of your databases or entered into the .InitializeFunctions procedure of your custom statements library file. You can search this form for directions on how to do that. The benefit of the later method is that the Hotkeys will be created automatically whenever Panorama X starts up.

Here is the procedure code:

// SHOW ALL WINDOWS – comand-4      
definehotkeys "Global", "COMMAND-4", ||||    rememberwindow
    applescript |||tell application "PanoramaX"
            set visible of every window to true
            try
                set visible of window "RagelUnicode" to false
            end try
        end tell|||
    originalwindow||||

// HIDE OTHER WINDOWS – command-5
definehotkeys "Global", "COMMAND-5", |||| let windowList=arrayrange(info("windows"),2,-1,cr())
    arrayfilter windowList, windowList, cr(), 
        ?(import() beginswith "Panorama Help","",quoted(import()))
    windowList=replace(arraystrip(windowList,cr()),cr(),", ")
    applescript |||tell application "PanoramaX"
        set windowList to {^«windowList»^}
        repeat with aWindow in windowList
            set visible of window named aWindow to false
        end repeat
        end tell||| ||||

//HIDE THIS WINDOW – comand-8    
definehotkeys "Global", "COMMAND-8", ||| let thisWindow=quoted(info("windowname"))
    applescript {tell application "PanoramaX"
    	set visible of window ^«thisWindow»^ to false
    end tell}|||

Notice that pipes are used for the codes with both three pipes and four pipes involved. All the pipes are needed because the AppleScript has most of the other quote characters already embedded. All windows that are hidden when saved will not be hidden when the file is reopened.

1 Like