This will work, as long as the loProgress object has a method named Update(). It introduce thight coupling between the objects because each object need to know something about the other.
>Pass an object reference to your common progress bar dialog so that it can control it via com....
>
>MyUIProcedure()
>
>local loDCOMEClass,loProgress
>
>loDCOMClass = createobj('myOLEServer.MyClass')
>
>loProgress = createobj('ProgressBar','Running the process',0,100)
>
>loDCOMClass.DoThing( loProgress )
>
>return
>
>************
>Then, your automation would be like...
>
>Function DoThing
>
>lparam loProgress
>
>do while ThisNeedsToBeRunning
>
>*** Lots of code here *****
>
>** Update Progress Bar ****
>
>loProgress.Update( 'Running this process', nIteration, nTotal )
>
>enddo
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only