ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing for iOS (iPhone / iPad)
  • Overview
  • How to?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 directly 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 WLanguage procedure and the return value must be supported types: boolean, integer, real, string, buffer.
    • 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_AddOne(n is int), ObjC: int
    RESULT n+1
  • Objective-C code:
    int nObjC_ResultInt(int i)
    {
    return nWL_AddOne(i);
    }


Example: Procedure for displaying text:
  • WLanguage code:
    PROCEDURE MyProcedure(psMessage is string), ObjC: string
    RETURN 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: 01/29/2024

Send a report | Local help