ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing for iOS (iPhone / iPad)
  • Overview
  • How to?
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
A global procedure in WLanguage can be directly called from the code of a global procedure in Objective-C .
How to?
To call a WLanguage procedure from the code of a global procedure in Objective-C:
  1. Type the code of the WLanguage procedure. The WLanguage procedure must comply with some rules:
    • It must have a valid name in Objective-C.
    • The parameters of the WLangage procedure as well as the return value must be typed with the supported types: Boolean, integer, real, string, buffer, etc..
    • The "ObjC" attribute must be added to the WLanguage procedure.
  2. Then simply call the procedure from the Objective-C code.


Example: Procedure for adding 1 to the specified number:
  • WLanguage code:
    PROCEDURE nWL_AjouteUn(n is an integer), ObjC: integer
    RETURN n+1
  • Objective-C code:
    int nObjC_ResultInt(int i)
    {
    return nWL_AddOne(i);
    }


Example: Procedure for displaying a text:
  • WLanguage code:
    PROCEDURE MyProcedure(psMessage is TO string), ObjC: string
    resend psMessage
  • Objective-C code:
    void ios_Call_Proc()
    {
    MyProcedure(@"My text");
    }
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help