AnsweredAssumed Answered

Issue/Bug in the .sdef file (Mac OS version only)

Question asked by user28732 on Aug 15, 2018
Latest reply on Aug 27, 2018 by TSGal

Product and version:

FileMaker Pro Advanced 17.0.2.205

 

OS and version:

macOS High Sierra - Version 10.13.6(17G65)

 

Hardware:

MacBook Pro (13-inch, 2016)

 

Description:

Issue/Bug in the .sdef file (The AppleScript dictionary) (Mac OS version only)

 

The .sdef FILE which is located in:

/Applications/FileMaker Pro 17Advanced/FileMaker Pro Advanced.app/Contents/Resources/fmpro.sdef

 

BUG1:

fmpro.sdef line 276:

            <enumerator name="write/delete" code="0x00000018" description="Create/Delete access"/>

    conflict with line 273, I think it is typo, it should be:

            <enumerator name="create/delete" code="0x00000018" description="Create/Delete access"/>

 

BUG2:

fmpro.sdef line 131 - 134:

 

the type is incorrect:

             <property name="current layout" code="pCLY" type="specifier" description="The current layout"/>

             <property name="current record" code="pCRW" type="specifier" description="The current record"/>

             <property name="current table" code="pCTB" type="specifier" description="The current table"/>

             <property name="current cell" code="pCCL" type="specifier" description="The current cell"/>

 

It should be:

            <property name="current layout" code="pCLY" type="layout" description="The current layout"/>

            <property name="current record" code="pCRW" type="record" description="The current record"/>

             <property name="current table" code="pCTB" type="table" description="The current table"/>

             <property name="current cell" code="pCCL" type="cell" description="The current cell"/>

 

I use Apple's ScriptingBridge Framework to access FileMaker. these lines cause problem.

 

properties ("current layout", "current record", "current table", "current cell") need precise type.

 

It cause ScriptingBridge Framework dynamic generate the object by Access the FileMaker Scripting interface, which is defined by the fmpro.sdef.

 

ScriptingBridge will fail without precise type.  (but AppleScript can still work.)

 

How to replicate:

 

Step 1. unzip the FM_sdef_issue.zip (attachment):

Step 2.  open the file: FM_sdef_issue/Inventory.fmp12.

Step 3: Use Xcode to compile the FileMakerBridge Project.

     In the Xcode Run the Test "FileMakerBridgeTests", the test "testIssue2" at line 41 will fail.

 

Now, replace the file:

/Applications/FileMaker Pro 17Advanced/FileMaker Pro Advanced.app/Contents/Resources/fmpro.sdef

With my fix:

FM_sdef_issue/fix/fmpro.sdef

 

Close the FileMaker Application, and open it again, The FileMaker's scripting dictionary is changed to my fix.

 

re-run the test "FileMakerBridgeTests", you will see the test "testIssue2" passed.

 

ISSUE3:

 

     In the Xcode Run the Test "FileMakerBridgeTests", the test "testIssue3" at line 95 will fail.

 

the properties of "name", "version" and "frontmost" is unusable, I don't know why.

 

Thanks and best regards,

 

Alex Qin

Attachments

Outcomes