ClarionLive March 16 2012
WebGem
Wolfgang Orth had a webgem on easing permissions for files used across the network using Internet Explorer, but I missed part of that. Perhaps someone can fill this in.Â
INRANGE
Some discussion of the Inrange function.
STATUS
Greg Bailey brought up the STATUS function, which among other things can be used to get the open mode of files (or whether the file is open at all). Mark Goldberg pointed out that there is a BadWindow equate but it's not clear when this might come into play. The online help has the following code in no particular context:
CASE STATUS(PassedLabel) !Check parameter passed OF WINDOW:OK !if window is good, and opened CYCLE !continue OF WINDOW:NotOpened !if window is good, but not opened OPEN(PassedLabel) !open it OF WINDOW:BadWindow !bad window? MESSAGE('Invalid Window','Note:') !exit procedure RETURN END
However the help says this:
Built-in variables TARGET, PRINTER and SYSTEM can be passed as parameters to calls to STATUS(WINDOW). The function always returns WINDOW:OK if the actual parameter is PRINTER or SYSTEM.
So perhaps BadWindow is simply a way of detecting that you've called Status(Target).Â
Update: Later in the webinar Mike tried checking Status on a null &window reference and guess what? BadWindow!
Windows Alternate Data Streams
Mark Goldberg showed another way to unblock executables so you don't get the annoying error message. You can do this with the unblock option via Windows Explorer, but the hacker way is to use alternate data streams.Â
To read a stream:
more  < filename:Zone.Identifier
To clear the Zone Identifier data (which is what triggers the warning):
copy nul:>Â filename:Zone.Identifier
ProgressClass
Mike Hanson and Mark Goldberg continued with a previous project - a general purpose progress bar that could function as a drop-in replacement for the standard progress bar with some improvements, such as only displaying if the progress elapsed time exceeds a certain value. Lots of nice techie code in there. I missed the first part (or parts) so I'm still a bit adrift as far as how this class actually works.Â
One snag - there are potential problems with having a window definition stored with the class. If you attempt to open two instances of the class you'll get a GPF because you can't open the exact same window instance twice. So Mike switched to requiring an Init method to set up references to an existing window (and he put the class's window definition in an include so it can still be used).Â