Improving the Experience 2
07/30/2007 08:53 Filed in: PolicePro
One of the new features of Filemaker 9 - released a
couple of weeks ago in mid-July, 2007 - is something
called Conditional Formatting for fields. In earlier
versions, display tricks such as red or green
buttons, different kinds of text formatting and
similar things required some trickery with
calculations, custom functions and container fields
that would hold color blocks. All this was central to
the Lightbar in PolicePro - the row of red and green
buttons that displays whether a given police car or
officer is in or out of service. WIth Conditional
Formatting, I had an opportunity to remove several
layers from the existing process.
Of course, that means that to properly take
advantage of the new function, we need to rewrite the
whole thing. Since we're doing that, we might as well
throw in some enhancements that would make sense to
the dispatchers running the system.
What a pain in the ass it is to get this stuff exactly right! I rewrote the entire function on a single computer to where it ran flawlessly. When it came time to test it across a LAN with some other desktops, we realized that the red/green stuff I had changed wasn't working over the network the way I had rewritten it. Had to go at it all over again to remove all globals and use calculation fields instead with a new discrete relationship from PolicePro to to a single record in Preferences.
I decided the default state for any new car added to the roster should be a green button and an "In Service" tooltip. Any button that did not have a car assignment needed to open as red with no tooltip notations.
Then it occurred to me that if no location was entered when a green button was clicked, the button should stay green - an additional If statement.
After a day of tweaking and testing, it's this script (times 10, for the 10 possible Lightbar buttons) to control the actions of the lightbar stuff ends up nicely organized, easily readable and very straightforward.
The final step was to go back through the thing and comment the hell out of it for the future, the single most important thing I've learned over the last 11 years of doing this work.
What a pain in the ass it is to get this stuff exactly right! I rewrote the entire function on a single computer to where it ran flawlessly. When it came time to test it across a LAN with some other desktops, we realized that the red/green stuff I had changed wasn't working over the network the way I had rewritten it. Had to go at it all over again to remove all globals and use calculation fields instead with a new discrete relationship from PolicePro to to a single record in Preferences.
I decided the default state for any new car added to the roster should be a green button and an "In Service" tooltip. Any button that did not have a car assignment needed to open as red with no tooltip notations.
Then it occurred to me that if no location was entered when a green button was clicked, the button should stay green - an additional If statement.
After a day of tweaking and testing, it's this script (times 10, for the 10 possible Lightbar buttons) to control the actions of the lightbar stuff ends up nicely organized, easily readable and very straightforward.
The final step was to go back through the thing and comment the hell out of it for the future, the single most important thing I've learned over the last 11 years of doing this work.
|
Activate The Southern Command Again
07/11/2007 08:02 Filed in: Road Trips
In the meantime, there's the daily trip up to the Crab Pot for fresh fish, Jimmy Buffett music playing in the bar there, our three busy beach houses and the nicest stretch of unoccupied beach on the East Coast. I've been hitting this place for over fifty years now, and it never fails to deliver. I hope everyone out there has a place like this in their lives, whether it's a beach, a mountain lake, whatever... this stuff is irreplaceable.