Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I am distributing a catalog of university courses on CD-ROM. Users can use the runtime solution on the CD to browse, search, and sort. But I also have a feature where they can add courses to a "collection" (like a shopping cart, but without any transactions). I've set up appropriate privileges for this field. This "flags" the course record. Obviously, they can't do that while running from the CD because they can't modify the "flag" field if the solution is on read-only media.

So I would like to be able to detect at startup if they're on a non-writable volume (the CD). I can't figure out how. I've tried writing a random record in the open script. It gives the error that the file is not modifiable. But when I try to capture that error, it responds with code "0" - no problem.

Any ideas how I can tell if the runtime is on a read-only volume so I can instruct the user to copy it to HD?

Maybe you're not capturing the error immediately, because Get(LastError) should return 6 (File is read-only).

  • Author
  • Newbies

Thanks. These are the first lines of the "open" script:

Set Field [ courses_syllabi0708::MyCollection; "1" ]

Commit Records/Requests [ No dialog ]

Show Custom Dialog [ Title: "Error"; Message: Get ( LastError ); Buttons: “OK” ]

I'm using the dialog just to see what the error code is so I can program to it.

It always gives me "0" even on CD.

You need a Set Error Capture [On] step at the top. This will capture errors for the duration of the script.

Then I would capture the error after EACH script step into a variable:

Set Variable[ $error ; Get(LastError) ]

Then I would fire up the debugger and the data viewer and watch $error as the script runs. (Custom dialog is fine if you don't have FM Advanced, but since you do, might as well use it.)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.