radstudio logo

Error Incompatible type TWideStringList under XCode

If your trying to use a TStringList in your IOS Xe2 Firemonkey application you will probably encounter the following errors when compiling under Xcode.

Show Plain Text
Text code
  1. Error: Incompatible types: got "TStringList" expected "TWideStringList"
  2.  
Show Plain Text
Text code
  1. Error: Incompatible type for arg no. 4: Got "TWideStringList", expected "TStrings"

The problem relates to the TStringList defaulting to a TWideStringList rather that the IOS compatible version, to fix this use the Classes class as follows :-

Show Plain Text
Delphi code
  1. var
  2.    lines: Classes.TStringList;
  3. ...
  4.    lines := Classes.TStringList.Create();
  5. ...

0 Responses to “Error Incompatible type TWideStringList under XCode”

Sorry, comments have been closed for this post.
(default) 11 queries took 1 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1DESCRIBE `posts`17170
2DESCRIBE `comments`11110
3DESCRIBE `tags`220
4DESCRIBE `categories`221
5DESCRIBE `posts_tags`220
6DESCRIBE `categories_posts`220
7SELECT `Post`.`id`, `Post`.`url`, `Post`.`title`, `Post`.`icon`, `Post`.`metadesc`, `Post`.`metakeys`, `Post`.`categories`, `Post`.`tease`, `Post`.`body`, `Post`.`private_body`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`allow_comments`, `Post`.`tags`, `Post`.`hitcount`, `Post`.`hitcount_rss` FROM `posts` AS `Post` WHERE `Post`.`url` = 'error-incompatible-type-twidestringlist-under-xcode' LIMIT 1110
8SELECT `Comment`.`id`, `Comment`.`post_id`, `Comment`.`body`, `Comment`.`author`, `Comment`.`url`, `Comment`.`email`, `Comment`.`ip`, `Comment`.`status`, `Comment`.`junk_score`, `Comment`.`created`, `Comment`.`modified` FROM `comments` AS `Comment` WHERE `Comment`.`status` = 2 AND `Comment`.`post_id` = (87) 000
9SELECT `Tag`.`id`, `Tag`.`tag`, `PostsTag`.`post_id`, `PostsTag`.`tag_id` FROM `tags` AS `Tag` JOIN `posts_tags` AS `PostsTag` ON (`PostsTag`.`post_id` = 87 AND `PostsTag`.`tag_id` = `Tag`.`id`) 770
10SELECT `Category`.`id`, `Category`.`category`, `CategoriesPost`.`post_id`, `CategoriesPost`.`category_id` FROM `categories` AS `Category` JOIN `categories_posts` AS `CategoriesPost` ON (`CategoriesPost`.`post_id` = 87 AND `CategoriesPost`.`category_id` = `Category`.`id`) 000
11UPDATE `posts` AS `Post` SET `Post`.`hitcount` = Post.hitcount + 1 WHERE `Post`.`id` = 8710