Hi,
I have this snippet of code (that works on B4A) where I get a field from a database (and I know it's a string) and I want to assign it to the element of the array "celle" (as you can see "tipo" is also a string).
I try to get the element using this syntax but it gives a very long and windy error..
further down I found the following in the full error message...
I have this snippet of code (that works on B4A) where I get a field from a database (and I know it's a string) and I want to assign it to the element of the array "celle" (as you can see "tipo" is also a string).
I try to get the element using this syntax but it gives a very long and windy error..
B4X:
B4i version: 2.51
Parsing code. (0.02s)
Compiling code. (0.10s)
Compiling layouts code. (0.01s)
Compiling debugger engine code. (1.29s)
Building Xcode project (0.01s)
Sending data to remote compiler. Error
B4i line: 163
celle(x, y).tipo = ResultSet.GetString(\
expected expression
further down I found the following in the full error message...
B4X:
b4i_crossword.m:1600:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo = [_resultset GetString:@"tipo"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1600:12: error: missing '[' at start of message send expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo = [_resultset GetString:@"tipo"];
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1600:49: error: expected ']'
B4X:
Out: Build settings from command line:
ARCHS = arm64
CODE_SIGN_IDENTITY = iPhone
CONFIGURATION_BUILD_DIR = /Users/administrator/Documents/UploadedProjects/<user id>/Payload
OTHER_CODE_SIGN_FLAGS = --keychain <user id>
PRODUCT_NAME = Crosswords
PROVISIONING_PROFILE = a31cfff2*************
=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===
Check dependencies
Write auxiliary files
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-all-non-framework-target-headers.hmap
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords.hmap
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-project-headers.hmap
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-generated-files.hmap
/bin/mkdir -p /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/Crosswords.LinkFileList
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-own-target-headers.hmap
write-file /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-all-target-headers.hmap
Create product structure
/bin/mkdir -p /Users/administrator/Documents/UploadedProjects/<user id>/Payload/Crosswords.app
ProcessInfoPlistFile Payload/Crosswords.app/Info.plist B4iProject/B4iProject-Info.plist
cd /Users/administrator/Documents/UploadedProjects/<user id>
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility /Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/B4iProject-Info.plist -genpkginfo /Users/administrator/Documents/UploadedProjects/<user id>/Payload/Crosswords.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -o /Users/administrator/Documents/UploadedProjects/<user id>/Payload/Crosswords.app/Info.plist
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.o B4iProject/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/administrator/Documents/UploadedProjects/<user id>
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/lj/wrbzzxds6b53f88_rx3x7c800000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -fvisibility=hidden -Wno-sign-conversion -iquote /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-generated-files.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-own-target-headers.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-all-target-headers.hmap -iquote /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-project-headers.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/Payload/include -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/administrator/Documents/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.d --serialize-diagnostics /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.dia -c /Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/main.m -o /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.o
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_crossword.o B4iProject/b4i_crossword.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/administrator/Documents/UploadedProjects/<user id>
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/lj/wrbzzxds6b53f88_rx3x7c800000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -fvisibility=hidden -Wno-sign-conversion -iquote /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-generated-files.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-own-target-headers.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-all-target-headers.hmap -iquote /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-project-headers.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/Payload/include -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/administrator/Documents/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_crossword.d --serialize-diagnostics /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_crossword.dia -c /Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m -o /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_crossword.o
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1600:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo = [_resultset GetString:@"tipo"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1600:12: error: missing '[' at start of message send expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo = [_resultset GetString:@"tipo"];
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1600:49: error: expected ']'
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo = [_resultset GetString:@"tipo"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1600:11: note: to match this '['
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo = [_resultset GetString:@"tipo"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1603:15: error: expected expression
if ([((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo isEqual:@"normal"]) {
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1603:17: error: missing '[' at start of message send expression
if ([((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo isEqual:@"normal"]) {
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1603:54: error: expected ']'
if ([((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo isEqual:@"normal"]) {
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1603:16: note: to match this '['
if ([((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).tipo isEqual:@"normal"]) {
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1606:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).hClue = [_resultset GetString:@"hClue"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1606:12: error: missing '[' at start of message send expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).hClue = [_resultset GetString:@"hClue"];
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1606:49: error: expected ']'
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).hClue = [_resultset GetString:@"hClue"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1606:11: note: to match this '['
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).hClue = [_resultset GetString:@"hClue"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1609:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).vClue = [_resultset GetString:@"vClue"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1609:12: error: missing '[' at start of message send expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).vClue = [_resultset GetString:@"vClue"];
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1609:49: error: expected ']'
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).vClue = [_resultset GetString:@"vClue"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1609:11: note: to match this '['
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).vClue = [_resultset GetString:@"vClue"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1612:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).solution = [_resultset GetString:@"solution"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1612:12: error: missing '[' at start of message send expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).solution = [_resultset GetString:@"solution"];
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1612:49: error: expected ']'
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).solution = [_resultset GetString:@"solution"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1612:11: note: to match this '['
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).solution = [_resultset GetString:@"solution"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1615:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).pencil = [_resultset GetString:@"pencil"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1615:12: error: missing '[' at start of message send expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).pencil = [_resultset GetString:@"pencil"];
^
[
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1615:49: error: expected ']'
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).pencil = [_resultset GetString:@"pencil"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1615:11: note: to match this '['
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).pencil = [_resultset GetString:@"pencil"];
^
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_crossword.m:1618:10: error: expected expression
((_cella*)[self._celle getObject:@[@(_x),@(_y)]]).userInput = [_resultset GetString:@"userInput"];
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.o B4iProject/b4i_httpjob.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/administrator/Documents/UploadedProjects/<user id>
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/lj/wrbzzxds6b53f88_rx3x7c800000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -fvisibility=hidden -Wno-sign-conversion -iquote /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-generated-files.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-own-target-headers.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-all-target-headers.hmap -iquote /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Crosswords-project-headers.hmap -I/Users/administrator/Documents/UploadedProjects/<user id>/Payload/include -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/administrator/Documents/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.d --serialize-diagnostics /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.dia -c /Users/administrator/Documents/UploadedProjects/<user id>/B4iProject/b4i_httpjob.m -o /Users/administrator/Documents/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.o
[...]
Error: ** BUILD FAILED **
[CODE]
Any idea on how to sort it out?
Thanks! :)