Hints not appearing on app on Apple Mac [SOLVED] lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 12:54 Lazarus 1.8.0 RC3 FPC 3.0.2 macOS 10.12.5 Sierra Hello, I've just added a TToolbar with a couple of buttons to my application. These buttons have Hint properties associated with them. However, I am not seeing any hints appear. Moreover, I have added an Application.OnShowHint event handler and stuck a breakpoint in there, and the breakpoint is not being hit. Can anyone confirm that the LCL hint system does indeed work under Lazarus on the Apple Mac? I assume it must work since the Lazarus IDE itself displays hints quite happily. What am I doing wrong? ---------------------------------------------------------------------- balazsszekely · 2017-07-15 19:37 Did you set ShowHint to true? It works fine for me on macOS Sierra, Lazarus Trunk, FPC 3.0.2 ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 19:49 Yep. ShowHint is set to True on the buttons themselves and all parent controls right up to the form. I'm going to create a small test project... ---------------------------------------------------------------------- balazsszekely · 2017-07-15 20:05 @carl_caulkett Please take a look: https://youtu.be/FsRkS8dlpDo Maybe it was fixed recently in Lazarus trunk. ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 20:11 Well, I've just made a small test project of equal complexity to that video. No Hints on mine. I've got the Trunk downloaded - I'll give it a try there... ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 20:26 Hey GetMem, any chance of uploading a small project that definitely works on your system? TIA. ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 20:54 I'm having issues starting the trunk version of Lazarus. It keeps complaining about the config path... ---------------------------------------------------------------------- Phil · 2017-07-15 21:11 Quote from: carl_caulkett on July 15, 2017, 10:54:23 pmI'm having issues starting the trunk version of Lazarus. It keeps complaining about the config path... See point 3: https://macpgmr.github.io/MacXPlatform/UsingCocoaFromTrunk.html ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 23:41 Thanks, Phil. OK, I have rebuilt the trunk with cocoa to get a Cocoa Lazarus 1.9. I then created a shell script with: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/shopen lazarus.app --args "--pcp=~/.laz-cocoa" That launches the cocoa Lazarus successfully. I then downloaded the truck source again to another folder ~/code/fpc/laz-carbon and rebuilt the source there with make LCL_PLATFORM=cocoa CPU_TARGET=x86_64. Then I created another shell script with: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/shopen lazarus.app --args "--pcp=~/.laz-carbon" When I run this shell script it fails to open Lazarus and gives the error: The application cannot be opened because its executable is missing. A quick search on google led me to try: chmod +x lazarus.app/Contents/MacOS/* but this did not help. I can only assume I did something wrong when building the Carbon version of the Lazarus trunk, but it all seemed to run ok, so I'm really puzzled at the moment. Can anyone help? ---------------------------------------------------------------------- carl_caulkett · 2017-07-15 23:47 I'm re-trying the make command with make clean all on the basis that the default widget set should be carbon. We'll see in 5 minutes! ---------------------------------------------------------------------- carl_caulkett · 2017-07-16 00:10 That worked. So I was able to test my minimal TestHints app in both Cocoa and Carbon versions of Lazarus 1.9. The results were that the app wouldn't run under Cocoa, and under Carbon, I still couldn't get control hints to appear. So the net result is that I've learnt a lot about configuring Lazarus, so that's good. In terms of solving my missing hints problem, I'm no further forward. So it goes, as Kurt would say! ---------------------------------------------------------------------- balazsszekely · 2017-07-16 04:28 @carl_caulkett QuoteHey GetMem, any chance of uploading a small project that definitely works on your system?Attached test project. ---------------------------------------------------------------------- carl_caulkett · 2017-07-16 10:08 Thanks! The problem was that the toolbar buttons in my project had the property ParentShowHint := True;. This had the result that although the buttons' ShowHint properties were showing as True in the object inspector, the property was not being saved in the associated lfm file. I set the ParentShowHint := False; for all buttons, and lo and behold, the ShowHint properties appeared in my lfm files and, of course, they appear when the app is run. This seems to me to be something slightly screwy in Lazarus' streaming mechanism - essentially the system is not honouring the effects of one particular property - the ShowHint property - but is instead relying on the state of another property - the ParentShowHint property - to determine if the ShowHint property actually works, despite the object inspector showing True for ShowHint at all times.