{"id":791,"date":"2011-09-15T09:25:12","date_gmt":"2011-09-14T21:25:12","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=791"},"modified":"2011-09-15T09:32:30","modified_gmt":"2011-09-14T21:32:30","slug":"why-does-my-osx-firemonkey-app-think-it-is-a-console-app","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/791\/","title":{"rendered":"Why Does My OSX FireMonkey App Think It Is a Console App ?"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">minute]<\/span><\/span><p>Because <strong>System.IsConsole<\/strong> is hardwired to <strong>TRUE<\/strong> on MAC OS:<\/p>\n<p><!--more--><\/p>\n<pre class=\"brush: delphi; title: ; notranslate\" title=\"\">\r\n{$IFDEF MACOS}\r\n  FileAccessRights := S_IRUSR or S_IWUSR or S_IRGRP or S_IWGRP or S_IROTH or S_IWOTH;\r\n  Test8086 := 2;\r\n  IsConsole := True;\r\n\/\/  FindResourceCache.ModuleHandle := LongWord(-1);\r\n{$ENDIF MACOS}\r\n<\/pre>\n<p>This is actually also the case for <strong>$ifdef LINUX<\/strong>, but nobody is likely to notice that, at least not just yet.  \ud83d\ude42<\/p>\n<p>But it caused me no end of confusion when my FireMonkey app behaved one way on Windows and a completely different way on OSX.<\/p>\n<p>Is there a rational explanation for this hard-wiring ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">minute]<\/span><\/span>Because System.IsConsole is hardwired to TRUE on MAC OS:<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,143],"tags":[94,135,138,136],"class_list":["post-791","post","type-post","status-publish","format-standard","hentry","category-delphi","category-xe2-delphi","tag-cross-platform","tag-firemonkey","tag-osx","tag-xe2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-cL","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=791"}],"version-history":[{"count":3,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/791\/revisions"}],"predecessor-version":[{"id":794,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/791\/revisions\/794"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}