FB II Compiler
FB II COMPILER
Fix a misbehaviour with the list manager on Mac OS 8.5
I've run into a rather interesting bug under OS 8.5.
Cells in List Mgr lists fail to highlight when selected.
Under MacOS 8.5 on a PowerMac, run the example project at FutureBasic II:(FB) Examples:Handbook:List Mgr Examples:List Mgr FB.bas Click on any item in the list. Notice that it does not highlight, but everything else operates correctly.
This same sample code works fine under OSes prior to 8.5. (the List Mgr has been rewritten to be PPC native in OS 8.5, so this may be due to a change in how the List Mgr operates now...)
The problem occurs with the standard system LDEF ID 0 or my custom LDEF. My custom LDEF has worked fine for years under Systems 6.04-System 8.1. Since the problem occurs with the standard system LDEF, we can rule out my LDEF as a source of the problem. I added the information about my LDEF because I was able to insert debuggin calls into my LDEF to get more info about the problem.
One of the symptoms is the _lHiliteMsg is never sent to the LDEF.
As I suspected, it had something to do with the fact that the List Manager is now PPC native.
The LoadUs 123 project does not include any code for activating or deactivating the list (Calls to LACTIVATE).
My application, and the FB sample project List Mgr FB.bas (Found in (FB) Examples:Handbook:List Mgr Examples) do have code for list activation and deactivation.
So it turns out the problem is in the LActivate code:
CALL LACTIVATE(_zTrue, listHndl&)
This works under OS 8.1 and earlier.
The List Manager is now PPC native in OS 8.5, and it apparently has a stricter definition for the value true:
CALL LACTIVATE(_zTrue, listHndl&) does not work; it leaves the list in an unactivated state (though since FB happily activates the scroll bars for us, this is not obvious; also, the list responds to clicks and double-clicks; there is just no visual feedback)
CALL LACTIVATE(_pTrue, listHandle&) also does not work.
CALL LACTIVATE(_true, listHandle&) works - and also works under older OSes.
So, the old List Manager was not picky about the value for true. The new List Manager is. (and ultimately, the problem was with my code, and not FutureBasic as I earlier suggested).
Hope this helps someone else...