This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
Hi
I just implemented iOS FFI and its working great.
Now need to call a javascript function that is written in kony from a iOS class in that FFI.
I tried to use CallBack.h, but I am not sure, I am using it as in correct way.
I have two functions
function A()
{
//Creates an object of class 'LaunchObjectObject'
var LaunchObjectObjectObject = new TestObjectPassing.LaunchObjectObject();
//Invokes method 'callObjectClass' on the object
LaunchObjectObjectObject.callObjectClass(/**Function*/ B);
}
function B(test)
{
frmStationInformation.lblStationName.text = test;
frmStationInformation.show();
}
the A() is used for loading a iOS native view in kony and
LaunchObjectObjectObject.callObjectClass(/**Function*/ B);
this code is used to load the native view. Along that I pass the callback method B()
Is this correct? (when passing a callback method, we have to specify only the function name like 'B' or function name with parenthesis like 'B()'? )
the B() loads a kony form
then in ios onclick action of a button i used this code
CallBack *objcallback = [[CallBack alloc] initWithCallBackObject:self.objCallback];
[objcallback executeWithArguments:[NSArray arrayWithObjects:@"", nil] spawn:true];
is it correct ?
if not please help me with the correct scenario.
Thanks