Hi all.
This is just a headzup for those using selection based list boxes.
If this was covered in 4D docs, I missed it.

For a listbox column in early 4D v13 and before, when you set the object 
properties, only the event(s) you selected would trigger.
For single event objects, I got into the habit of putting code in the object 
without any event checking as it only triggered for the specified event.

At some point this changed and 4D started adding other events and greyed them 
out in the column’s object properties events list.

I made the mistake of ignoring those, putting them down to a mistake made by 
4D, and continuing to add code in the same way = big mistake.
Those greyed out events *will* trigger and you have to code the object 
specifically for only the events you want.

For example, I added On Data Change code to a column, and was surprised when it 
triggered during On Display Detail.
The fix was to enclose the object code inside a form event condition test:
If (Form event = On Data Change)
   do stuff
End if

It appears that array based list boxes do not have this “added feature”.
Hope this saves you some of the head scratching I went through trying to figure 
out what was happening.
I had great assistance from 4D Tech Support to pinpoint my problem.

Hope this helps someone else and is not just a waste of bytes… :-)
Cheers, Keith
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to