said:
> >The "Become" tab in the Properties notebook appears when a data file has
> >extended attributes, and does not appear on files which have zero-length
> >extended attributes.
Steven Levine wrote:
> Yep, it's got to have a .CLASSINFO EA to be a class object.
> >And, the "Become" tab's Help button says it is for changing an object's
> >Workplace Shell "Class". The "Become" tab allows you to choose a
> >different "class handler" to manage the "object" (the file).
> And notice that there's a limited set of "Become" options. Probably
> related to the class hierarchy.
I noticed that, but didn't know why. Bet you're right.
> > 1. What is the "class handler" referred to by the above-mentioned Help
> >button? Is it some code that executes in the Workplace Shell?
> It's a computer. It runs code, so the answer must be yes :). Every class
> has a associated DLL registered with the WPS. There's a REXX command to
> list them. The DLL's talk to the WPS class DLL's and other classes via
> SOM which is an implementation of a CORBA interface.
Thanks, found the Rexx command. Here's my test of it (run this and
you'll see some "DLL's" apparently embedded in the WPS):
/* The x-classq program displays the Workplace Shell class list. */
"@echo off"
call RxFuncAdd "SysQueryClassList", "RexxUtil", "SysQueryClassList"
say " ------- Class -------"
say " # Name DLL?"
say " === ================ ===="
call SysQueryClassList "list."
do index = 1 to list.0
parse var list.index class dll
class = class || copies( " ", 18-length(class) )
say format( index, 5 ) || " " || class || dll
if datatype( index/20, "Whole number" ) then pause
end
return
> > 2. How do you set a file's Workplace Shell "Class" if it doesn't have
> >one already (or if it has one and you want to change it)? For example,
> >the RexxUtil SysCreateObject function may do this, but I'm not sure of
> >the syntax. And how do you do this in C?
> Dunno for sure. You've probably got to talk to the WPS. There's a ton of
> wp...() functions to do this. It will take a bit of work to find the
> specific one. It could be the equivalent of SysSetObjectData, but I don't
> know.
Thanks, good idea and I'll try it.
> > 3. What is the purpose of the Workplace Shell "Class"? What uses it?
> >What is it used for? Are there programs that check this tag before
> >opening the file to see how it should be processed? Does the Workplace
> >Shell check this tag when you click on a data file object to decide how
> >to handle it?
> It's object oriented and sorta the other way around. The class is a
> "smart pointer" to all the functions that perform actions on an object.
> When you double click on an object icon, PMSHELL's message handler (I
> think) detects the click and "OK so you want to open this" and converts
> the icon location to an object handle (by magic) and invokes the "Open
> Method" associated with the class. The Open Method is invoked and passed
> a handle to the object. What the Open Method does is implementation
> specific. In the case of folders the folder will open in the default
> view. In the case of a Mesa spreadsheet, the class handler will invoke
> Mesa.exe and pass it the name of the sheet to be open. Some of this
> linkage is guess-work on my part an may need to be corrected by other that
> really know.
Aha! So PMSHELL's message handler (you think) causes the class to be
looked up in the WPS Class Table which also contains the appropriate
DLL, and then the appropriate DLL entry point is called with the object
handle. The DLL merrily computes on from there. All subsequent
questions are undoubtedly answered in some unknown book or web site
concerning how to write WPS Class DLL's. Yes? How simple. They coulda
explained it better.
Thanks, Steve.
- Peter Skye
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
>> Next Message >>
Return to [ 16 |
December |
1998 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.