Jump to content

jpscharf

Newbies
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jpscharf

  • Rank
    newbie

FileMaker Experience

  • Skill Level
    Intermediate
  • FM Application
    17

Platform Environment

  • OS Platform
    Mac
  • OS Version
    High Sierra

FileMaker Partner

  • Certification
    11
    12
    13
    14
    15
    16
    17
  • Membership
    FileMaker TechNet
  1. I am having the same problem. FMPA11, Mac OS X 10.8.4
  2. The issue was with Default Folder, updating to version 4.4.4 resolves the issue.
  3. To help determine the cause I did some additional testing: Windows XP - no problems Mac OS X 10.5 - no problems Mac OS X 10.6 - no problems Mac OS X 10.7 - crashes every time. Tested FileDialog in the Groovy console (1.8.1). I had the script run the code four times consecutively and no crash. So the issue seems to be with either the the version of Groovy the plugin uses (1.7.6) or the plugin itself. /* Purpose: Asks a user to select a file to open. Returns: File Path Name: HIDRAOpenFileDialog ( saveTitle ; defaultDirectory ) Parameters: ( openTitle ) text ( defaultDirectory ) filepath Dependencies: NONE 2011-09-01 JPS, Created. NOTES: NONE */ import java.awt.*; import javax.swing.JOptionPane; String openTitle = "Hello World!"; String defaultDirectory = "/Users/jpscharf/Desktop/"; String title = openTitle; FileDialog openDialog = new FileDialog(JOptionPane.getRootFrame(),title, FileDialog.LOAD); openDialog.setDirectory(defaultDirectory); openDialog.show(); if (openDialog.getFile() != null) { //selectedFile = fmpro.convertPathToFileMaker(openDialog.getDirectory() + openDialog.getFile()) selectedFile = openDialog.getDirectory() + openDialog.getFile(); //return selectedFile; } else { //return false; } openDialog.setDirectory(defaultDirectory); openDialog.show(); if (openDialog.getFile() != null) { //selectedFile = fmpro.convertPathToFileMaker(openDialog.getDirectory() + openDialog.getFile()) selectedFile = openDialog.getDirectory() + openDialog.getFile(); //return selectedFile; } else { //return false; } openDialog.setDirectory(defaultDirectory); openDialog.show(); if (openDialog.getFile() != null) { //selectedFile = fmpro.convertPathToFileMaker(openDialog.getDirectory() + openDialog.getFile()) selectedFile = openDialog.getDirectory() + openDialog.getFile(); //return selectedFile; } else { //return false; } openDialog.setDirectory(defaultDirectory); openDialog.show(); if (openDialog.getFile() != null) { //selectedFile = fmpro.convertPathToFileMaker(openDialog.getDirectory() + openDialog.getFile()) selectedFile = openDialog.getDirectory() + openDialog.getFile(); //return selectedFile; } else { //return false; }
  4. I have two function (GUI) in ScriptMaster Advanced, each show their own dialog (Save and Open), but if they are run in the same script (or subscript) they crash FileMaker, it does not matter whether they are registered with ScriptMaster or are from custom plugin. Also, if the same function is called in the same script (or subscript) FileMaker crashes. Here is the code for the two functions: /* Purpose: Asks a user to select a file to open. Returns: File Path Name: HIDRAOpenFileDialog ( saveTitle ; defaultDirectory ) Parameters: ( openTitle ) text ( defaultDirectory ) filepath Dependencies: NONE 2011-09-01 JPS, Created. NOTES: NONE */ import java.awt.*; import javax.swing.JOptionPane; String title = openTitle; FileDialog openDialog = new FileDialog(JOptionPane.getRootFrame(),title, FileDialog.LOAD); openDialog.setDirectory(defaultDirectory); openDialog.show(); if (openDialog.getFile() != null) { selectedFile = fmpro.convertPathToFileMaker(openDialog.getDirectory() + openDialog.getFile()) openDialog = null; return selectedFile; } else { openDialog = null; return false; } /* Purpose: Asks a user for a save location and filename. Returns: File Path Name: HIDRASaveFileDialog ( saveTitle ; defaultDirectory ; defaultFileName ) Parameters: ( saveTitle ) text ( defaultDirectory ) filepath ( defaultFileName ) text Dependencies: NONE 2011-09-01 JPS, Created. NOTES: NONE */ import java.awt.*; import javax.swing.JOptionPane; String title = saveTitle; FileDialog saveDialog = new FileDialog(JOptionPane.getRootFrame(),title, FileDialog.SAVE); saveDialog.setDirectory(defaultDirectory); saveDialog.setFile(defaultFileName); saveDialog.show(); if (saveDialog.getFile() != null) { selectedFile = fmpro.convertPathToFileMaker(saveDialog.getDirectory() + saveDialog.getFile()) saveDialog = null; return selectedFile; } else { saveDialog = null; return false; }
×
×
  • Create New...

Important Information

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