Author Topic: WPS Classes  (Read 3531 times)

miturbide

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1154
    • View Profile
    • OS2World
WPS Classes
« on: 2012.06.11, 22:36:15 »
..wait... wait... I think I'm getting it.... no :)


Martín Itúrbide
OS2World.com NewsMaster
Open Source Advocate

Skype - martiniturbide
Google Talk - martiniturbide@gmail.com

ivan

  • Hero Member
  • *****
  • Posts: 593
    • View Profile
Re: WPS Classes
« Reply #1 on: 2012.06.12, 11:06:27 »
Just what are you trying to get?

ivan

miturbide

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1154
    • View Profile
    • OS2World
Re: WPS Classes
« Reply #2 on: 2012.06.12, 17:38:20 »
Im trying to learn more about WPS programming, and to understand the WPS classes structure.
Martín Itúrbide
OS2World.com NewsMaster
Open Source Advocate

Skype - martiniturbide
Google Talk - martiniturbide@gmail.com

ivan

  • Hero Member
  • *****
  • Posts: 593
    • View Profile
Re: WPS Classes
« Reply #3 on: 2012.06.12, 19:57:21 »
Wasn't there one of the IBM Red Books about that?  Other than that I can't help very much.

ivan

RobertM

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2034
    • View Profile
    • A.I.BuiltPC - using OS/2 Warp Server & eComStation for Custom Web and Database Solutions
Re: WPS Classes
« Reply #4 on: 2012.06.14, 02:49:22 »
There are a few books that are great on the topic. there are also references on EDM/2 and Hobbes. Basically, the WPS is a set of subclasses and "superclasses" based off its default 3 classes (OS/2 only has three main classes: WPAbstract, WPFileSystem and WPTransient). The biggest and most important thing to learn is how OS/2 handles objects - or inotherwords, how OS/2's object oriented nature is *DRASTICALLY* different from Windows, and has various levels of differences from other oo methods.

This all also applies to how any true OS/2 GUI based program that utilizes WPS features works and can behave (which the WPS is just one of). Learning about the message queue and how it is handled is also vitally important. Everything gets done with messages of some sort. The default classes handle all things by default. BUT, when a sub-class is registered, it will handle certain messages (either system-wide or for specific things). A "super-class" is basically a replacement class for a class (or sub-class) that does just that - replaces the entire class.

If a subclass exists (that is intended to override an existing class) that handles certain things, those messages get passed to it. That sub-class has the option of handling the message, or "sending it back" to be handled by the parent class. Again, that applies to all "PM programs" including the WPS.

If a subclass exists that does NOT override an existing class, it can instead be (usually is) something that extends the capabilities of the main class. For instance, the main classes (such as WPFileSystem) are really "dumb" in that they are rather unaware of much of anything and simply provide a basic framework - the subclasses linked to them are what provide the additional functionality beyond that framework. As an example, WPFilesystem knows virtually nothing about multimedia files - the MM sub-classes give it that "knowledge".

Almost anything can be sub-classed or "super-classed" - and ALL of that is defined in what becomes system DLLs. (inotherwords, sub-classes and "super-classes" get handled by their DLLs - thus, that is what defines them. Once the DLL is registered, the WPS suddenly becomes aware it knows more and knows how to do more - the rest being transparent).

The class lists will of course vary on various installations of OS/2 depending on what additional DLLs are loaded as part of the WPS.

Here's some resources on the topic:
http://www.edm2.com/0510/wps1.html
http://www.amazon.com/OS-2-1-Workplace-Shell-Programming/dp/0679791620
- (good starting point at that price, even with its age)
http://www.warpspeed.com.au/cgi-bin/inf2html.cmd?..%5Chtml%5Cbook%5CToolkt40%5CWPSGUIDE.INF+326
« Last Edit: 2012.06.14, 03:03:26 by RobertM »
|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


ALT

  • Newbie
  • *
  • Posts: 42
  • Alex Taylor
    • View Profile
    • Alex's Website
Re: WPS Classes
« Reply #5 on: 2012.06.15, 15:19:52 »
There are a few books that are great on the topic.

I'd love to know where, I haven't been able to find any.

Quote
http://www.amazon.com/OS-2-1-Workplace-Shell-Programming/dp/0679791620
- (good starting point at that price, even with its age)

According to the reviews, this book is actually about PM programming and contains no WPS information at all.

Last year I tried to dip my toes into WPS programming, but I hit a wall when I realized that there are (apparently) no clearly-written, comprehensive guides to be found anywhere.  I looked through the information on EDM/2 but it's all confusing and/or incomplete snippets, half of which seem to be using an obsolete version of the SOM compiler with a different programming syntax.

I just want a good, solid, methodical and comprehensive text on the subject, much the same way that Petzold's book was for Presentation Manager.  Is that too much to ask?  Surely all the developers who wrote WPS-aware programs back in the heydey must have gotten their training from somewhere... but I've never been able to find anything like that.

Sorry for the griping but as you can tell I got a bit (OK, a lot) discouraged about the whole topic.

jep

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • View Profile
Re: WPS Classes
« Reply #6 on: 2012.06.15, 19:04:46 »
I so totally agree with you...
Give me some proper info/docs and I'll try as well.

//Jan-Erik

melf

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 606
    • View Profile
« Last Edit: 2012.06.15, 19:11:43 by melf »
/Mikael

aschn

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: WPS Classes
« Reply #8 on: 2012.06.15, 20:25:31 »
Surely all the developers who wrote WPS-aware programs back in the heydey must have gotten their training from somewhere...

They were probably taught in IBM courses. Training is a major part of the business -- now and then.

Andreas

RobertM

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2034
    • View Profile
    • A.I.BuiltPC - using OS/2 Warp Server & eComStation for Custom Web and Database Solutions
Re: WPS Classes
« Reply #9 on: 2012.06.16, 07:26:46 »
There are a few books that are great on the topic.

I'd love to know where, I haven't been able to find any.

I *THINK* this is what I first used as a reference (and the other books mentioned lower in the page: OS/2 Warp Control Program API and OS/2 Warp Presentation Manager API):
- http://www.amazon.com/OS-Warp-Workplace-Shell-API/dp/0471038725

It will be out of date in numerous aspects, and is probably directed at IBM C-Set/2 (ie: their OS/2 C++ compiler that predates VAC++). But, if it is the book I remember, it was still a very helpful reference (even later on as it became more out of date) for many of the things that were difficult to find elsewhere.

|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2034
    • View Profile
    • A.I.BuiltPC - using OS/2 Warp Server & eComStation for Custom Web and Database Solutions
Re: WPS Classes
« Reply #10 on: 2012.06.16, 07:37:14 »
Hmmm... actually, I *know* it was one of the books I relied on.
- http://books.google.com/books/about/OS_2_Warp_Workplace_Shell_API.html?id=3cBQAAAAMAAJ

These are others I owned or borrowed - but cannot recall much about them:
- http://books.google.com/books?id=FqVQAAAAMAAJ
- http://books.google.com/books?id=HlUAAAAACAAJ
- http://books.google.com/books?id=2l2qQgAACAAJ
- http://books.google.com/books?id=Z7ZQAAAAMAAJ

And perhaps the best suggestion (especially since they have been doing this far more recently than those of us responding) is to send messages to the people who worked on xWorkplace, Nice, WPSWizard and so on to ask them what they used/use as references.



Quote
http://www.amazon.com/OS-2-1-Workplace-Shell-Programming/dp/0679791620
- (good starting point at that price, even with its age)

According to the reviews, this book is actually about PM programming and contains no WPS information at all.

Last year I tried to dip my toes into WPS programming, but I hit a wall when I realized that there are (apparently) no clearly-written, comprehensive guides to be found anywhere.  I looked through the information on EDM/2 but it's all confusing and/or incomplete snippets, half of which seem to be using an obsolete version of the SOM compiler with a different programming syntax.

I just want a good, solid, methodical and comprehensive text on the subject, much the same way that Petzold's book was for Presentation Manager.  Is that too much to ask?  Surely all the developers who wrote WPS-aware programs back in the heydey must have gotten their training from somewhere... but I've never been able to find anything like that.

Sorry for the griping but as you can tell I got a bit (OK, a lot) discouraged about the whole topic.

It probably is... though I wonder how much of the information might be in VAC++'s docs. I have v3 (and I think I might have v4, but I suspect it may be lacking in such in depth docs). I do know that C-Set/2 had some pretty detailed information in it (though outdated - and probably the "obsolete... SOM compiler" you reference above) - but point is I suspect that during the VAC++ v3 timeframe, the docs may have been still somewhat decently updated and somewhat complete.
|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2034
    • View Profile
    • A.I.BuiltPC - using OS/2 Warp Server & eComStation for Custom Web and Database Solutions
Re: WPS Classes
« Reply #11 on: 2012.06.16, 07:40:27 »
Surely all the developers who wrote WPS-aware programs back in the heydey must have gotten their training from somewhere...

They were probably taught in IBM courses. Training is a major part of the business -- now and then.

Andreas

Yup - with references, code snippets, example code and programs and such given away on floppies or printed form or both. Members of BesTEAM and IBM SD (and other partner/developer groups IBM had) also were given the above (sans the training part unless chosen by the member as something they wanted to attend).
|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


miturbide

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1154
    • View Profile
    • OS2World
Re: WPS Classes
« Reply #12 on: 2012.06.17, 01:09:26 »
Hi

I'm looking forward to learn more about WPS programming on the next months. But I having the problem to clearly define where does WPS starts and PM, SOM ends.  For the moment my idea is that WPS is the objects that I can see with WPS Class explorer. I still need to understand more the potential of WPS and what can it be done with that and what can not be done.

Since I was trying to organize the EDM/2 wiki (http://www.edm2.com/index.php/Category:SOM_Articles). I think that the only official WPS Programming stuff from IBM I was able to find were:

WPS1.INF - Workplace Shell Programming Reference, Part 1 of 3 by IBM
WPS2.INF - Workplace Shell Programming Reference, Part 2 of 3 by IBM
WPS3.INF - Workplace Shell Programming Reference, Part 3 of 3 by IBM
WPSGUIDE.INF - Workplace Shell Programming Guide by IBM
...
And the stuff that is on IBM Toolkit.

I still need to get some time to start my training.

I agreed with Alex that there is no good consolidated material about the topic. The articles on EDM/2 are good, but are snippets.

Thanks the for links on the books. I will check them out.
Martín Itúrbide
OS2World.com NewsMaster
Open Source Advocate

Skype - martiniturbide
Google Talk - martiniturbide@gmail.com

LErdmann

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: WPS Classes
« Reply #13 on: 2012.07.02, 08:30:10 »
Hallo,

1) I have the book "OS/2 Warp Workplace Shell API" (ISBN: 0-471-03872-5). It's very helpful to understand some of the things like object lifetime etc. that the OS/2 toolkit docs won't properly explain. It's completely independent of any compiler but it might be outdated here and there as it refers to Warp 3.

2) you can create a WPS DLL with about any C/C++ compiler. You use "sc.exe" from the toolkit to create code skeleton (C/C++ code and header files). Forget about "Direct To SOM". You don't necessarily need it in order to write a WPS DLL.

3) I advise to use the C++-emitter from "sc.exe" even if you program in C. It's so much more elegant to code as naturally, SOM/WPS is object oriented (think about methods ...).

4) I once started writing a "post-it" class. It's finished to the point where it is usable but it was more of a learning project to me. It shows how to set up exception handling where necessary (an important thing to do in a WPS DLL). If anyone is interested, I can zip it up and send it to you.


miturbide

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1154
    • View Profile
    • OS2World
Re: WPS Classes
« Reply #14 on: 2012.07.08, 16:43:28 »
Thanks Lars.

I will appreciate if you can send me your "Post-it Class"  (martin@os2world.com) or if you can post the file on the forum.

Martín Itúrbide
OS2World.com NewsMaster
Open Source Advocate

Skype - martiniturbide
Google Talk - martiniturbide@gmail.com