Add each method manually using a delegate into a dictionary, where the key is the id integer (or string based name) and the value is the Delegate method (AddressOf calculationMethod for example)
Or simply use XojoScript and exectue the methods from their string based names, you add the actual methods to the XojoScript.Context ( = a class instance that has those methods)
or if you only have 2 methods, a simple select case to choose one method or the other based on an integer stored in the database …
use xojoscript if you really need the name of the method, and if it can change in the future.
I did not mention that it’s an iOS project. I can’t seem to find the XojoScript class there. Is it even available with iOS projects? The documentation does not mention anything about iOS in particular.
We use the same principle to handle paths (Request.Path as Key) in Xojo Web they forward their paths directly to the correct method whithout having to filter everthing out. It’s faster and more dynamic (e.g. you can just remove a key/value dictionary item an it will show a 404…