Page 2 of 4

Re: Module BaseClass (Module as Object)

Posted: Fri Mar 03, 2017 6:43 pm
by mk-soft
Ok.
i have changed my example :wink:

Re: Module BaseClass (Module as Object)

Posted: Sat Mar 04, 2017 6:22 am
by step11
Great !! Thanks for your code.
Than what's your next plan?what about implementing multi interfaces? or even IDispatch interface?

Re: Module BaseClass (Module as Object)

Posted: Sat Mar 04, 2017 10:08 am
by mk-soft
It should not make any more difficult to create these ones.
For multiinterfaces only in QueryInterface has to call from another module the function New().

The function number and the name as key are already stored for IDispatch. Own Debuggerfunction ShowInterface.
However, the parameter list must still be stored.

But use less with Windows...

Re: Module BaseClass (Module as Object)

Posted: Fri Apr 14, 2017 2:41 pm
by mk-soft
Update v1.27
- Bugfix BaseClass as DLL: Macros created codes as procedure encapsulated because on some Windows 7 machine crashed
- Code cleanup, some internal name changed

Re: Module BaseClass (Module as Object)

Posted: Sun Apr 16, 2017 12:39 pm
by mk-soft
Update v1.28
- Changed internal class management because of the rules for creating DLLs

Re: Module BaseClass (Module as Object)

Posted: Tue May 02, 2017 2:15 pm
by mk-soft
Update v1.29
- Dispose object work now revers
- Save LinkedList Initialize object and Dispose object over Mutex
- Added global ObjectCounter over all Classes

:wink:

Re: Module BaseClass (Module as Object)

Posted: Wed Aug 23, 2017 12:15 pm
by mk-soft
Update v1.31
- Spelling Correction: Initalize -> Initialize

Sorry, I did not notice it until ...

Correct your own projects with 'Search and Replace'.

Re: Module BaseClass (Module as Object)

Posted: Thu Aug 24, 2017 2:08 pm
by Kwai chang caine
Spelling Correction: Initalize -> Initialize
I have spent a long time to understand the error is always in the above code :oops: :lol:
Nice works, thanks for sharing 8)

Re: Module BaseClass (Module as Object)

Posted: Thu Aug 24, 2017 2:33 pm
by mk-soft
Thanks :wink:

I have now update example 9. We need threadsafe.

Code: Select all

CompilerIf #PB_Compiler_Thread = 0
  CompilerError "Use compiler option theadsafe"
CompilerEndIf
P.S. Now updated all examples :wink:

Re: Module BaseClass (Module as Object)

Posted: Fri Aug 25, 2017 5:24 pm
by mk-soft
Update v1.32
- Change internal Initialize and Dispose from list to array to avoid thread blocking
- Added small version of BaseClass. 'Modul_BaseClassSmall.pb'

:wink:

Re: Module BaseClass (Module as Object)

Posted: Sun Oct 29, 2017 9:23 am
by mk-soft
BaseClass small version

Update v1.05
- Now compatible to extended version
+ Macro AsNewMethode, Macro CloneObject

Still the smallest code for creating objects 8)

Re: Module BaseClass (Module as Object)

Posted: Thu Dec 21, 2017 9:26 pm
by mk-soft
Update small v1.07 and advance v1.33
- bugfix FreeMutex

Re: Module BaseClass (Module as Object)

Posted: Sat Dec 23, 2017 12:25 am
by Andre
If I will ever use "OOP-style" code for programming in PureBasic, then I start with this nice piece of code... :mrgreen:
Thank you :D

Re: Module BaseClass (Module as Object)

Posted: Thu Jan 25, 2018 3:15 pm
by mk-soft
New version of small version :wink:

Update v1.09r3
- Map of classes encapsulated
- Check of the new class in procedure 'AddClass(...)' extended
- Change Macros because map of classes not longer global
- Change CheckInterface. Parameter is not longer required
- Name of classes not longer case sensitive (no case)

Re: Module BaseClass (Module as Object)

Posted: Sun Apr 07, 2019 12:29 pm
by mk-soft
Update v1.10
- Change ClassName Management.

The module name is no longer the internal class name.
This means that the interface name is now specified for inheritance, and not the module name.
Is therefore more logical.