Skip 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.

Plugin function not working in mac runtime

Featured Replies

Hi forum

I'm using this function to generate a thumbnail:

ImageThumbFromURL( Substitute( $Pfad ; "\\"; "\\\\"); 140 )

This works perfectly well no matter whether $Pfad is a URL or a local path in Windows runtimes, in Filemaker Advanced on Windows an on Mac 10.6 and 10.7

The same code executed in a runtime on Mac generates nothing but the text "ERROR" in the thumbnail field. The plugin ist loaded and visible in the list of plugins.

Any ideas?

Is this a module you wrote yourself? If you can reproduce the error and send us a bug report we can take a look and see if we can identify the issue.

  • Author

Hi Brent

I try to produce the report on the mac tomorrow. The function I use is this, I found it somewhere in the forums:

RegisterGroovy( "ImageThumbFromURL( url ; maxpixels )" ; "import javax.imageio.ImageIO¶

import java.awt.image.BufferedImage¶

import java.awt.geom.AffineTransform¶

import java.awt.image.AffineTransformOp¶

BufferedImage img¶

if (url.indexOf("://") != -1) {¶

img = ImageIO.read(new URL(url))¶

} else {¶

img = ImageIO.read(new File(url))¶

Integer maxWH = img.getWidth()¶

if (img.getHeight() > maxWH){¶

maxWH = img.getHeight()¶

Double thumbscale = Double.parseDouble(maxpixels) / maxWH ¶

AffineTransform transform = AffineTransform.getScaleInstance(thumbscale, thumbscale)¶

AffineTransformOp op = new AffineTransformOp(transform,null)¶

BufferedImage scaledImage = op.filter(img, null)¶

return scaledImage" )

"ERROR" means Java throws an exception.

WIth the function SMLastError you can get more details about this exception. Just put a "Show Custom Dialog" script step after your function call that shows SMLastError.

  • Author

WIth the function SMLastError you can get more details about this exception. Just put a "Show Custom Dialog" script step after your function call that shows SMLastError.

I made a mistake here, it doesnt work with the full version either. SMLastError is "javax.imageio.IIOException: can't read input file" with $Path reading like "MacDisk:library:test.jpg". I guess I have to transforme the path first?

  • Author

Problem solved, with a path like /Volumes/MacDisk/Library/test.jpg everything is fine

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.