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.

Function IDs in 24U's Plugin Template

Featured Replies

I have found the 24U plugin template to be quite useful in porting a plugin that was originally built for Windows, but one issue I've come across is that the function IDs need to match the existing Windows version instead of working sequentially.

In an attempt to make this happen, I added a `#define` for each of the plugin functions in FMTConfig.h, such as:

#define FUNCTION_1_ID             15007

Then I changed the lines in FMTemplate.cpp to read like this:

err = RegisterExternalFunction( FUNCTION_1_ID, FUNCTION_1_PARAMS, regFunction1Flags, FUNCTION_1_C_NAME );
...
UnRegisterExternalFunction( FUNCTION_1_ID );
....
(void) fmx::ExprEnv::UnRegisterExternalFunction(*pluginID, FUNCTION_26_ID );

One function, the second one, retains the default ID, so it reads

#define FUNCTION_2_ID             2

Anyone familiar with the template has probably already guessed what has happened. That second function is the only one that is useable in FileMaker. The rest of the functions have blank lines in the function list of the calculation dialog box.

I think this is related to the myplc.c and 24u_plist_compiler.sh files, but can't quite figure out what needs to be changed. I *think* I might need to edit FMTemplate.plc, but that doesn't seem right, since it hasn't been edited to this point and only includes the strings generation code for the first 10 functions (there are 26 functions at this point).

Just to try it out, I attempted to directly edit the strings file after the plugin was built, but this didn't help, or more properly, I wasn't sure what edits to make.

So, if I *need* to have my first function have a function ID of 15007 instead of 1, what else do I need to change?

Thanks,
Chuck

Edited by Chuck

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.