Forum > macOS / Mac OS X

[SOLVED] NSDictionary error incompatible type for arg1

(1/1)

josh:
https://wiki.freepascal.org/Mac_Show_Application_Title,_Version,_and_Company

Following the above article to create an about box; and at the line
dict := NSDictionary.alloc.initWithObjectsAndKeys(Val1, Key1, Val2, Key2, Val3, Key3, Val4, Key4, Val5, Key5, Nil);
I get error at Val1 : Incompatible type for arg no.1 got "nsstring" expected "id"

What have I done wrong, could not find other examples

Jonas Maebe:
Try adding {$modeswitch objectivec2} at the top of your program (but below any {$mode xxx} directives).

josh:
Thanks that solved the problem.

Navigation

[0] Message Index

Go to full version