I have been issuing my app under Real Studio 2012r2.1 for the past 4 years as there were too many problems with the Cocoa version back in 2014. With Apple now depreciating 32bit apps I recently purchased a Xojo 2018r2 license and was pleasantly surprised how readily my code ported to the latest version of the Xojo compiler/framework.
I ntotice that the bugs I reported in 2014 in TextArea where tabs and custom cursors failed had still not been fixed, and assumed that maybe Apple’s Cocoa text widget made them impossible to fix. I was able to work around that by moving to FTC which is an excellent widget where access to the source makes customizing very easy.
All seemed well until I got to the final testing stage and found tooltips/helptabs no longer functioned. My app is complex and has some 500 pages of manuals but users need online help as an aide memoire, and experience with other OSX and Windows apps have taught them that tooltips are always available to provide that.
Tooltips/helptags work fine under all versions of Windows from 7 onwards but seem to fail under OS X. I think the problem is that reported by Jay Lichtenauer in his Jan 2014 feedback (31888) where controls in a tab panel fail to support tooltips. I use page panels but assume the implementations are related. Jay’s report was verified in Jan 2014 but is still unfixed. There are later comments noting this.
I am running under OS 10.12.6 and checked tooltips in Pages they work fine, as they do in the Xojo app itself. So this is not an OS X or Cocoa problem but a bug in the Xojo framework possibly associated with the implementation of tabpanels/pagepanels.
Ninety per cent of my users run Windows so the failure on the Mac is not a disaster, but I already have to advise those who want to use the app as a web server to use the Windows version because of OSX limitations. To have to advise all users that the help facilities on the Mac do not work is not very pleasant.
I appreciate that OS X, with Apple’s frequent major changes, is much more difficult to support than Windows but the tooltips bug reported in 2014 should have been fixed by now. Since users on both Windows and OS X expect help through tooltips in most of the commonly used apps I am surprised that has not been a major problem for all Xojo developers. Am I missing something?
As far as I know, the tooltip bug was fixed in 2018r1 or r2.
Could you provide a sample project showing what you are seeing?
Hi Greg, it is very good news that this is expected to be a fixed issue. I was assuming this was not peculiar to my project because 31888 is still open and there are comments in March 2018 that the problem is still not fixed. There is also an item on the forum entitled “HelpTag Alternatives?” where there is recent mail that the problems with helptags are not fixed. However, I just downloaded the test cases provided and you are right, they do not seem to have problems in 2008r2.
I will see if I can cut down my app to something that still shows the problem I am seeing and submit that. I am also happy to send you the entire app with an explanation of how to exhibit the tooltip/helptag failures. They are occurring with, eg, checkboxes embedded in a canvas embedded in a pagepanel so it might be an issue of the depth of embedding. The only role of the canvas is to make it easy to re-center the controls when a window is resized. I can also try removing the canvas to see if the problem goes away.
Now that I know this is meant to be a resolved issue, I will try and be more specific in helping debug what I am seeing. It has been frustrating because the move from 2012r2.1 to 2018r2 was astonishingly smooth, and moving to FTC as a replacement for TextArea had its own benefits. I thought I had completed the port until finding that helptags no longer functioned under OS X. It is also possible that the massive leap of the project between compiler generations has led to a problem but nothing is showing in the project analysis.
Another possibility would be to use another container instead of the canvas if that turns out to be the issue.
Hi Greg, I deleted the canvas container of the other controls out (which was not easy!) and tool tip magically reappeared, so it is the embedding in a container that is the problem. I have always a canvas as a container to center a set of controls because it does not draw anything. I tried changing the canvas to a groupbox but the tooltips were gone again. This was the problem reported in 31888, that helptags on controls in a groupbox on a tabpanel don’t work after switching tabs.
When you said that you thought the tooltip bug was fixed in 2018r1 or r2 it may be that was the one documented in the manual where they would not appear at all in 64bit builds. The issue with helptags on controls embedded in a RectControl occurs with both 32bit and 64bit builds and is a different one.
I have a lot of canvas-based controls controls and often group these together using a colored RoundRectangle as a background. It struck me that helptags were probably failing for these also. I checked and no helptags appear. Canvas-based controls are a major capability of the Xojo framework and are widely used to provide attractive and helpful interfaces to complex applications, so the failure of helptags in such situations is very significant.
Hi Dr Brian, there is a workaround in case 31888:
You mention canvas-based controls (I don’t have experience with those yet). Could be possible to try to do something similar than the above workaround to make it work in your case? This of course so you can continue with your project and not have to wait until the bug is fixed.
Hi Alberto, a temporary workaround in the pagepanel change event would be easy to implement and very useful. I am not sure what you mean by “set tabpanel.false” is it some property of the tabpanel that should be changed and changed changed back?
Case 31888 has sample code so is easy to reproduce the issue, it has a “Fix” checkbox.
Code in TabPanel Change event:
//This coerces helptags to work after switching tabs
If Fix.Value Then
In this case (TabPanel switch then HelpTags do not show for controls in groupbox - <https://xojo.com/issue/31888> ), is an easy workaround, just 2 lines of code, set TabPanel Visible to False then True again on Change event.
I hope the same can be done with your canvas/code.
Hope this helps.
I’d still like to see an example of how you’re doing this. I’ve tried a few scenarios and can’t come up with one that sounds like what you are describing.
Alberto, brilliant! I put that fix into the three windows where I use PagePanels and it works perfectly helptags show up everywhere regardless of how many times one changes the panel. So the problem is that identified in 31888, that changing panels leaves the interface in a state where tooltips/helptags fail. It would probably help others searching feedback for the helptag problems if you posted the fix to case 31888 also.
Greg, I will strip out an example from my app, check that the problem shows up, and send it to you. The fact that Alberto’s fix works may also be very helpful in identifying what is going on.
Dr Brian, I’m glad that it worked.
Just a note, that is not my fix/workaround. I took the code from Jay’s project from <https://xojo.com/issue/31888>.
Thanks Alberto, I feel an idiot for missing Jay’s workaround! Maybe that is why 31888 is ranked low and has never been fixed everyone (except me) noticed the workaround.
Don’t be hard on yourself, those things happen. The good thing is that you can keep working.
Greg, I realized I was misled by missing the bug fix, into thinking Jay’s example project of the problem no longer showed it under 2018r2. However, incorporated his bug fix in the example and one needs to comment out the code in the TabPanel change event to exhibit the bug.
So the project attached to 31888 is a nice simple example of the loss of helptags when one switches panels. Let me know if need another example all my problems with helptags in pagepanels were fixed when I put the workaround code in the change event.
It would be worth fixing the bug in the Xojo framework because it is not all apparent what is going on when one first notices that helptags are failing, and it will save developers considerable frustration before they eventually identify the relevant case and fix in feedback.
Another workaround would be to subclass TabPanel, put the visibility fix in the changed event wrapped in #if TargetMacOS and then replace your TabPanels with the new one.
For what it’s worth, searching through Feedback this morning, this also seems to affect PagePanels (which isn’t surprising since they’re related to TabPanels).