CMD-. doesn't stop procedure

Right from the first time I turned it on, Pan X hasn’t responded to CMD-. keystrokes. Any ideas as to what might cause that? It’s presumably yet another symptom of whatever keeps bugging my iMac despite half a dozen clean installs and I’m still looking for clues.

Command-Period is not currently implemented in Panorama X. So that has nothing to do with your computer.

What is the recommended way to stop a procedure while it is running?

The only way to do it is to force quit Panorama.

Panorama X 10.2 has a new feature that allows you to specify a maximum runtime for looping code, it will automatically stop the code if the loop runs beyond that. Here is the help page for this (of course this won’t help you until the new release comes out).

Force Quit? Not for me. lol I don’t like those things.

I’ve found that if I play with the menus, or open a Help window, or such, that that interruption does cause my Loop to halt. I have 20K records that I’m doing calcs on and after a period of time (perhaps 15 minutes) I get bored and want to get back to work, so I interrupt it. I’ll start it up again on the un-calc’d records but no Force Quits for me. :wink:

Have you found a work around for stopping a procedure? Like a info(click) or anything else.

Not a work around, a new feature in Panorama X 10.2. Use shift-command-escape.

If you haven’t already, you’ll need to upgrade to the 10.2 public beta to use this.

Shift command escape will not stop a procedure

| dave
December 2 |

  • | - |

Not a work around, a feature. Use shift-command-escape.

ProVUE Development

Preventing Endless Loops

Panorama X: Setting up a timeout limit to prevent endless loops.

Jim Rea added the line above to my post, but after the emails went out. If you have only seen my post in your email, you won’t have seen that line.

This is the version I am using

85f7466ab0c6529791be9df51e9fb57b3225461e

This is the code

case info(“trigger”) = “Button.TimeToStart”
;********************************** Time Before Shoot “time” is stored in the Clock field prior to count down
Clock = TimeBeforeShoot * 60
;********************************** Opens the Count down screen to count down
setwindowrectangle rectanglesize(80,152,763,1123),“NoPalette NoHarzScroll NoVertScroll”
openform “BeforeStart”
ElapsedTime = now()
;********************************** Give me one second before counting
loop
if now() > ElapsedTime
ElapsedTime = now()
Clock = Clock - 1
endif
until Clock = 0
closewindow
;********************************** Opens the Sound file for buzzers and give me 5 blasts
ct = 5
loop
ElapsedTime = now()
loop until ElapsedTime + 2 < now()
;********************************** Opens the Sound file for buzzers
openanything “”,“Stop.mp3”
ct = ct - 1
until ct=0
bringpanoramaforward
hideotherapplications
; Message “Click on Okay”

;replace message statement with bringpanaramaforward when availble next update

stop

Information

Fields in the data base are: TimeBeforeShoot, Clock
Form BeforeStart has a view to the database field Clock
Procedure counts down displaying the count down number
I want to stop it from counting so I can start another procedure or just reset the time to another value.

Shift-Command-esc does not stop it

Option-Command-esc calls the force quit but I lose panorama and have to restart

You should rewrite this program using timers. Then you could simply have a button to stop the timer, and Panorama could even be doing other things while the counter is running.

I found the problem and now Shift Command esc will stop a procedure

You can also automatically disable aborts for all procedures in a particular database. Simply use the File>Database Options>General panel to enable the Prevent early abort of procedures in this database. option. ProVUE uses this option in all of Panorama’s libraries, because it’s important that the library code not be aborted. (Even when this option is used, you can still use the enableabort statement to temporarily allow loops to be aborted.)

Kim Petersen and Sandra Wilson

Shift command escape will not stop a procedure

| dave
December 2 |

  • | - |

Not a work around, a feature. Use shift-command-escape.

ProVUE Development

Preventing Endless Loops

Panorama X: Setting up a timeout limit to prevent endless loops.

The Shift-Command-Escape is not working for me in an Endless Loop situation. Neither is a timeout of 25 seconds.

Perhaps the Prevent early abort of procedures in this database option is enabled (in the File>Database Options dialog).

Interesting. Yes, the ‘Prevent early abort’ option was enabled in most every database that I looked at. Is this option supposed to be set on by default? I was not aware of this setting. I’d like to have it off by default. Can I do that?

It’s off by default when a new database is created, but it is on by default for any database created with earlier versions of Panorama X.

When you abort a procedure, the procedure doesn’t finish as intended by the procedure author. This could be disastrous if a task is half finished. Since in the past there was no option to abort a procedure, procedure authors could rely on the fact that the code would not abort early. This default setting maintains that behavior for existing databases.

If you do want to be able to abort, you can explicitly uncheck this option and accept the risk of unfinished code in your existing database. If you have procedures that need to be protected so that they can’t abort halfway through, this can be done explicitly with the disableabort statement.

A lot of thought was put into how to safely allow procedures to be halted midstream. You can read the details here.

For me it is being turned on by default with new databases.

How are you creating a new database? I checked yesterday, and just checked again, the option was turned off when I used

  • File>New>New Empty Database
  • File>New>New Database from Template
  • File>New>New Database from Text File

And when I do File/New/New Empty Database, it comes up checked. And other very recent dbs are also checked.
10.2.0.b25

This is the code that I used to make Shift-Command-Escape work

enableabort

loop
if now() > ElapsedTime
ElapsedTime = now()
Clock = Clock - 1
If Clock < WarningTime+1 beep endif
endif
until Clock = 0

disableabort