Skip to content

Commit 14f28fe

Browse files
committed
[[ ExternalsApiV5 ]] Tweaked Post/Send test to work on Android and Desktop.
1 parent 4a19c36 commit 14f28fe

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

revtestexternal/revtestexternal.lcidl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ use objc on mac,ios
3131

3232
command revTestExternalTestWait
3333

34-
command revTestExternalTestPost
35-
3634
command revTestExternalTestArrays
3735

36+
command revTestExternalTestPostAndSend
37+
3838
use none on linux, windows, android
3939
use objc on mac, ios
4040

41-
command revTestExternalTestObjcArrays
41+
/*command revTestExternalTestObjcArrays
4242
in array as objc-array
4343
return objc-array
4444

4545
command revTestExternalTestObjcDictionaries
4646
in dict as objc-dictionary
47-
return objc-dictionary
47+
return objc-dictionary*/
4848

4949
use none on mac, linux, windows, android, ios
5050
use java on android
@@ -55,5 +55,3 @@ tail command revTestExternalAndroidButtonDestroy
5555
function revTestExternalRunActivity return c-string
5656

5757
command revTestExternalRunOnSystemThread
58-
59-
command revTestExternalObjectPostAndSend
70 Bytes
Binary file not shown.

revtestexternal/src/revtestexternal.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,23 @@ void revTestExternalTestWait(void)
122122
LCContextExecute("answer \"Done!\"", 0);
123123
}
124124

125-
void revTestExternalTestPost(void)
126-
{
127-
}
128125

129126
void revTestExternalTestArrays(void)
130127
{
131128
}
132129

133130
#ifndef __ANDROID__
131+
void revTestExternalTestPostAndSend(void)
132+
{
133+
LCObjectRef t_target;
134+
LCContextMe(&t_target);
135+
136+
LCObjectPost(t_target, "handlePost", "");
137+
LCObjectSend(t_target, "handleSend", "");
138+
139+
LCObjectRelease(t_target);
140+
}
141+
134142
void revTestExternalAndroidButtonCreate(void)
135143
{
136144
}

revtestexternal/src/revtestexternal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void onCancel(DialogInterface p_dialog)
107107
t_wait . Release();
108108
}
109109

110-
public static void revTestExternalObjectPostAndSend()
110+
public static void revTestExternalTestPostAndSend()
111111
{
112112
LC.Object t_target;
113113
t_target = LC.ContextMe();

0 commit comments

Comments
 (0)