In our previous Send_Message posting we mentioned that we had deprecated another well-known function, and I’m sure you can guess which one from the title of this post – Yep, we deprecated the Utility function!
One of the things we’ve tried to do in this release is to tidy up and standardize the interface between your Basic+ programs and the Presentation Server, providing a standard object-based model based on properties, methods and events. The Utility function has always been been an exception to this however, essentially providing a shorthand way of executing what should be SYSTEM object methods, thereby breaking the paradigm.
In light of this the Utility function has been deprecated and it’s functionally exposed as properties and methods of the SYSTEM and FILESYSTEM objects instead. Utility itself still works, but it is now a shell that maps to the two aforementioned objects (more of which we’ll cover later).
In case you’re interested here’s how the Utility services map to the SYSTEM and FILESYSTEM objects:
Utility Service | Object | Type |
BEEP | SYSTEM | Method |
COPYFILE | FILESYSTEM | Method |
CREATE | SYSTEM | Method |
CURSOR | SYSTEM | Property [S] |
CHOOSECOLOR | SYSTEM | Method |
CHOOSEFONT | SYSTEM | Method |
CHOOSEFILE | SYSTEM + FILESYSTEM | Method |
CHOOSEDIR | SYSTEM + FILESYSTEM | Method |
DESTROY | SYSTEM | Method |
DIALOG_BOX | SYSTEM | Method |
FLUSH | SYSTEM | Method |
GET_EVENT | SYSTEM | Method |
GETLOGICALDRIVES | FILESYSTEM | Property [G] (DRIVELIST) |
HANDLE_BY_CURSOR | SYSTEM | Method |
HOOKCTRL | SYSTEM | Method |
IUNKNOWN_RELEASE | SYSTEM | Method |
LOAD_PICTURE | SYSTEM | Method |
MAKEDIR | FILESYSTEM | Method |
OBJECTID | SYSTEM | Method |
OPENAPP | SYSTEM | Method |
OBJECT_BY_CURSOR | SYSTEM | Method |
OBJECTLIST | SYSTEM | Method |
PRINTSETUP | SYSTEM | Method |
POST_WINMSG | SYSTEM | Method |
PICTURE_PROPS | SYSTEM | Method |
REMOVEDIR | FILESYSTEM | Method |
RENAMEDIR | FILESYSTEM | Method |
RENAMEFILE | FILESYSTEM | Method |
RUN | SYSTEM | Method |
RUNHELP | SYSTEM | Method |
RUNWIN | SYSTEM | Method |
SHELLEXECUTE | SYSTEM | Method |
SEND_WINMSG | SYSTEM | Method |
TEXTRECT | SYSTEM | Method |
UNHOOKCTRL | SYSTEM | Method |
WINCOUNT | SYSTEM | Property [G] |
WINDOW_BY_POS | SYSTEM | Method |
[EDIT: 19 Nov 15, Updated CHOOSEDIR and CHOOSEFILE methods to include FILESYSTEM]
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).
Pingback: The new FILESYSTEM object | Building OpenInsight 10
Are you saying these are a list of services that are available now using the UTILITY function, cos, I don’t see some of these in the help!!
Yes they are, but bear in mind some of those that haven’t been documented before are low-level functions wrapped by more common ones that you may be more familiar with: For example DIALOG_BOX is used by the dialog_Box() function – there’s no point calling it in any other context.
Other functions of course are simple oversights 🙂
Yeh, sorry, thought of that after I replied.
thanks for the info though.
I’ll see what I can do about getting the useful ones documented for the next OI 9.3 release
Docs have been submitted for the following Utility services in 9.3.x:
HANDLE_BY_CURSOR
IUNKNOWN_RELEASE
LOAD_PICTURE
OBJECT_BY_CURSOR
PICTURE_PROPS
The other services are not documented because they are low-level (and need a specific context), they are not finished/have a bug, or they are duplicates 🙂
Pingback: OpenInsight and High-DPI | Building OpenInsight 10
In the print dialog box where the user can select all pages, Current page, or pages say 2-5, can we also have like word pages 1,3,6-10
Hi Chris,
OI has 3 areas where the Print Dialog gets called:
1) The Utility() function (now the SYSTEM PRINTSETUP method) – this only affects printing with the Basic+ Print statement, but I believe that can be changed to use multiple page ranges. (It wraps the Windows API PrintDlg function that could be changed to use PrintDlgEx)
2) The older OIPI (OCX version, not .NET): This can’t be changed as it is handled by the printer control in the OCX internally and Revelation have no way to change it. However, one of the options passed in the Set_Printer INIT call allows a separate page-range dialog to be displayed. You might be able to enter multiple ranges in that but I haven’t tested it – the OCX control underlying methods do support multiple page ranges though, so it probably does handle them.
3) OIPI.and the BRW. I’ll have to let Bryan at Revelation answer this one as he’s responsible for maintaining that part of the product. I’ve emailed him this link so hopefully he’ll respond here, and you can always ask on the main RevSoft site. TBH I believe it’s the same as for option (2) above.
Pingback: The CHOOSEDIR and CHOOSEFILE methods | Building OpenInsight 10