Bill,
You are just further obfuscating things with a set of classes and defines like that. OO is about maintenance as much as it's about reuse.
Here's how I'd recommend you do this:
create classlib businessprocess
create class baseprocess of businessprocess as container && I like container for this because I can put a Label object inside there and use it to name the item so when I drop one of these on a form I can easily tell what's what.
* give this class an Execute() method - this is an abstract method, it is a method that every subclass will have in it's interface, but there is no code here at the level, because you don't yet have a clue about what this business process is really going to accomplish. But you've established the interface, you've established that anyone can call the Execute() to get the object to do its thing.
create classlib MyOneShotThing
create class WhizBang of MyOneShotThing as baseprocess from businessprocess
define your methods:
get_window()
check_status()
change_status()
and code them
Make the Execute method:
with this
.get_window()
.check_status()
.change_status()
endwith
Now you thought this was a lot of excess work, but you have a reasonably well defined, standalone component that anyone can pick up and understand
Now comes the point of use. Drop your WhizBang class onto the form. Drop a button on the form, set the button.Click()
this.parent.WhizBang.Execute()
>This thread and the other one about the .h file definitions being used only once gave me an idea.
>What do you think of this?
>
>
>then inside the button:
>button.Click()
> #DEFINE get_window 'Click1'
> #DEFINE check_status 'Click2'
> #DEFINE change_status 'Click3'
> with this
> lo = .get_window(p1,p2)
> .check_status(lo)
> .change_status(lo)
> endwith
>