Dominex Active Member Licensed User Longtime User Jan 30, 2013 #1 It would be very very handy to have also CallSub4 because it is be essential for passing data of touch events (Action, X, Y). Code: Copy CallSub4 (Component As Object, Sub As String, Argument1 As Object, Argument2 As Object, Argument3 As Object) As String CallSub4("Main","Activity_Touch",Action,X,Y)
It would be very very handy to have also CallSub4 because it is be essential for passing data of touch events (Action, X, Y). Code: Copy CallSub4 (Component As Object, Sub As String, Argument1 As Object, Argument2 As Object, Argument3 As Object) As String CallSub4("Main","Activity_Touch",Action,X,Y)
Informatix Expert Licensed User Longtime User Jan 30, 2013 #2 Dominex said: It would be very very handy to have also CallSub4 because it is be essential for passing data of touch events (Action, X, Y). Code: Copy CallSub4 (Component As Object, Sub As String, Argument1 As Object, Argument2 As Object, Argument3 As Object) As String CallSub4("Main","Activity_Touch",Action,X,Y) Click to expand... Use my library CallSubExtended provided with ULV. You're not limited by the number of arguments.
Dominex said: It would be very very handy to have also CallSub4 because it is be essential for passing data of touch events (Action, X, Y). Code: Copy CallSub4 (Component As Object, Sub As String, Argument1 As Object, Argument2 As Object, Argument3 As Object) As String CallSub4("Main","Activity_Touch",Action,X,Y) Click to expand... Use my library CallSubExtended provided with ULV. You're not limited by the number of arguments.
Dominex Active Member Licensed User Longtime User Jan 30, 2013 #3 Informatix said: Use my library CallSubExtended provided with ULV. You're not limited by the number of arguments. Click to expand... Very interesting thank you, but I find exactly where search this ULV library? :sign0188:
Informatix said: Use my library CallSubExtended provided with ULV. You're not limited by the number of arguments. Click to expand... Very interesting thank you, but I find exactly where search this ULV library? :sign0188:
Informatix Expert Licensed User Longtime User Jan 30, 2013 #4 Dominex said: Very interesting thank you, but I find exactly where search this ULV library? :sign0188: Click to expand... Sorry, I misread a column in my licence table. You're not an ULV customer. :signOops:
Dominex said: Very interesting thank you, but I find exactly where search this ULV library? :sign0188: Click to expand... Sorry, I misread a column in my licence table. You're not an ULV customer. :signOops:
E Eduard Active Member Licensed User Longtime User Jan 30, 2013 #5 As a workaround you could make a class than can hold 4 arguments You can then pass this class (with callsub2).
As a workaround you could make a class than can hold 4 arguments You can then pass this class (with callsub2).
Dominex Active Member Licensed User Longtime User Jan 30, 2013 #6 Informatix said: Sorry, I misread a column in my licence table. You're not an ULV customer. :signOops: Click to expand... No problem.
Informatix said: Sorry, I misread a column in my licence table. You're not an ULV customer. :signOops: Click to expand... No problem.
Dominex Active Member Licensed User Longtime User Jan 30, 2013 #7 Eduard said: As a workaround you could make a class than can hold 4 arguments You can then pass this class (with callsub2). Click to expand... Thanks for the idea, but I did not understand how to put it into practice. Pass a class? Can you do?
Eduard said: As a workaround you could make a class than can hold 4 arguments You can then pass this class (with callsub2). Click to expand... Thanks for the idea, but I did not understand how to put it into practice. Pass a class? Can you do?
mc73 Well-Known Member Licensed User Longtime User Jan 30, 2013 #8 As a workaround, you can send a combined string and regex.split it to get the arguments.
Dominex Active Member Licensed User Longtime User Jan 30, 2013 #9 mc73 said: As a workaround, you can send a combined string and regex.split it to get the arguments. Click to expand... I tried but I can not make it work. :BangHead:
mc73 said: As a workaround, you can send a combined string and regex.split it to get the arguments. Click to expand... I tried but I can not make it work. :BangHead:
P Penko Active Member Licensed User Longtime User Jan 30, 2013 #10 I made a small example for you. I hope I have correctly understood your problem. What I am demonstrating is the use of classes as data containers. This ensures you flexibility by adding more items to the class in the feature. You will see two buttons - the first uses CallSub2 and calls a method within the very same Activity1. The second button benefits from the CallSubDelayed2 command and opens Activity2 by calling its method customLoader2. Both return the same message box information. Attachments CallSubSample.zip CallSubSample.zip 8.6 KB · Views: 497
I made a small example for you. I hope I have correctly understood your problem. What I am demonstrating is the use of classes as data containers. This ensures you flexibility by adding more items to the class in the feature. You will see two buttons - the first uses CallSub2 and calls a method within the very same Activity1. The second button benefits from the CallSubDelayed2 command and opens Activity2 by calling its method customLoader2. Both return the same message box information.
Dominex Active Member Licensed User Longtime User Jan 31, 2013 #11 Penko said: I made a small example for you. I hope I have correctly understood your problem. What I am demonstrating is the use of classes as data containers. This ensures you flexibility by adding more items to the class in the feature. You will see two buttons - the first uses CallSub2 and calls a method within the very same Activity1. The second button benefits from the CallSubDelayed2 command and opens Activity2 by calling its method customLoader2. Both return the same message box information. Click to expand... Thank you for your example, but it is not what I need. I need a way to call a sub with three arguments, I want called "Activity_Touch".
Penko said: I made a small example for you. I hope I have correctly understood your problem. What I am demonstrating is the use of classes as data containers. This ensures you flexibility by adding more items to the class in the feature. You will see two buttons - the first uses CallSub2 and calls a method within the very same Activity1. The second button benefits from the CallSubDelayed2 command and opens Activity2 by calling its method customLoader2. Both return the same message box information. Click to expand... Thank you for your example, but it is not what I need. I need a way to call a sub with three arguments, I want called "Activity_Touch".
E Eduard Active Member Licensed User Longtime User Feb 1, 2013 #12 Code: Copy 'Class module ArgumentsContainer Sub Class_Globals Public argument1 As Object Public argument2 As Object Public argument3 As Object Public argument4 As Object Public argument5 As Object End Sub Code: Copy Dim argc as ArgumentsContainer argc.initialize argc.argument1="one" argc.argument2="two" argc.argument3="three" argc.argument4="four" callsub2(Main,"function_name",argc) note that any of the argments kan be an argumentscontainer as well.... the example of Penko is exactly what I mean. Code: Copy Sub function_name(argc as ArgumentsContainer) dim x as string x=argc.argument4 msgbox(x,"this is argument4) end sub Last edited: Feb 1, 2013
Code: Copy 'Class module ArgumentsContainer Sub Class_Globals Public argument1 As Object Public argument2 As Object Public argument3 As Object Public argument4 As Object Public argument5 As Object End Sub Code: Copy Dim argc as ArgumentsContainer argc.initialize argc.argument1="one" argc.argument2="two" argc.argument3="three" argc.argument4="four" callsub2(Main,"function_name",argc) note that any of the argments kan be an argumentscontainer as well.... the example of Penko is exactly what I mean. Code: Copy Sub function_name(argc as ArgumentsContainer) dim x as string x=argc.argument4 msgbox(x,"this is argument4) end sub
Informatix Expert Licensed User Longtime User Feb 1, 2013 #13 Eduard said: Code: Copy 'Class module ArgumentsContainer Sub Class_Globals Public argument1 As Object Public argument2 As Object Public argument3 As Object Public argument4 As Object Public argument5 As Object End Sub Code: Copy Dim argc as ArgumentsContainer argc.initialize argc.argument1="one" argc.argument2="two" argc.argument3="three" argc.argument4="four" callsub2(Main,"function_name",argc) note that any of the argments kan be an argumentscontainer as well.... the example of Penko is exactly what I mean. Click to expand... A type is more appropriate than a class. Type typArg(Arg1 As Object, Arg2 As Object, ...) (in Process_Globals) Dim MyArgs As typArg MyArgs.Initialize MyArgs.Arg1 = ... MyArgs.Arg2 = ... CallSub2(Activity, "function_name", MyArgs)
Eduard said: Code: Copy 'Class module ArgumentsContainer Sub Class_Globals Public argument1 As Object Public argument2 As Object Public argument3 As Object Public argument4 As Object Public argument5 As Object End Sub Code: Copy Dim argc as ArgumentsContainer argc.initialize argc.argument1="one" argc.argument2="two" argc.argument3="three" argc.argument4="four" callsub2(Main,"function_name",argc) note that any of the argments kan be an argumentscontainer as well.... the example of Penko is exactly what I mean. Click to expand... A type is more appropriate than a class. Type typArg(Arg1 As Object, Arg2 As Object, ...) (in Process_Globals) Dim MyArgs As typArg MyArgs.Initialize MyArgs.Arg1 = ... MyArgs.Arg2 = ... CallSub2(Activity, "function_name", MyArgs)
E Eduard Active Member Licensed User Longtime User Feb 1, 2013 #14 Dominex said: Thank you for your example, but it is not what I need. I need a way to call a sub with three arguments, I want called "Activity_Touch". Click to expand... use an extra sub Code: Copy Sub function_name(argc as argumentscontainer) activity_touch(argc.argument1,arc.argument2,argc.argument3,argc.argument4) end sub But I see your point...CallSub4 would benefit in your case Last edited: Feb 1, 2013
Dominex said: Thank you for your example, but it is not what I need. I need a way to call a sub with three arguments, I want called "Activity_Touch". Click to expand... use an extra sub Code: Copy Sub function_name(argc as argumentscontainer) activity_touch(argc.argument1,arc.argument2,argc.argument3,argc.argument4) end sub But I see your point...CallSub4 would benefit in your case
Dominex Active Member Licensed User Longtime User Feb 1, 2013 #15 Eduard said: use an extra sub Code: Copy Sub function_name(argc as argumentscontainer) activity_touch(argc.argument1,arc.argument2,argc.argument3,argc.argument4) end sub But I see your point...CallSub4 would benefit in your case Click to expand... I need CallSub4 why should I put it in a class / library and avoid adding specific code in Activity. Thanks anyway for your ideas.
Eduard said: use an extra sub Code: Copy Sub function_name(argc as argumentscontainer) activity_touch(argc.argument1,arc.argument2,argc.argument3,argc.argument4) end sub But I see your point...CallSub4 would benefit in your case Click to expand... I need CallSub4 why should I put it in a class / library and avoid adding specific code in Activity. Thanks anyway for your ideas.