Copying methods to the other platform-specific class
If you plan on completing examples in
Defining lineups for multiple platforms, you can complete the other platform-specific class (
ScreenPMCapture or
ScreenWinCapture) simply by copying the methods to the other class. For example, if you implemented the methods in
ScreenPMCapture but now want to add them to
ScreenWinCapture, you can copy the methods to
ScreenWinCapture as follows:
1. From a TrailBlazer browser with the application DevelopScreenCapture and the class ScreenPMCapture selected, drag your mouse down the list of instance methods for ScreenPMCapture. Make sure to select all of the methods.
2. Position your mouse over the Instance Methods pane; then press mouse button two.
3. From the displayed pop-up menu, select
Mark > Global Mark. This marks the code for the selected methods.
4. Select ScreenWinCapture from the list of classes.
5. Set the check boxes for instance methods to Private.
6. Pop up the menu for the Instance Methods pane.
7. From the displayed pop-up menu, select Mark > Copy Marked. The methods are copied to ScreenWinCapture and displayed in the list of instance methods.
Now, if you want platform-specific BMPs captured, revise the method saveGraphicImage so it uses the class CgPMBMPFileFormat (or CgWinBMPFileFormat).
To test the changes, open an instance of ScreenWinCapture by evaluating ScreenWinCapture new open.
The examples in
Defining lineups for multiple platforms describe how to configure
DevelopScreenCapture and its two classes so a system automatically uses
ScreenPMCapture for OS/2 and
ScreenWinCapture for Windows.
Last modified date: 03/13/2019