Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM internals questions
#1
Hi Gintaras,

some general question about QM internals:

1. Can rset write to registry from a .reg file instead of using run someregfile.reg
2. In a custom class, is there _s available for this class, or is it the global one?
3. others predefined (_command, _hresult, _i) exist too? can we create them if not?
4. In a custom class, does
SomeCustomClass t
str'string
lpstr'pointer
ARRAY(str)'array
handle creation (i.e is the constructor)
5. Is t object deleted at macro end?
6. Can I define a global variable from init2 to use it anywhere: SomeCustomClass+ t?
7. How to use it in macro MyMacro then.

Have some more but these are the most important.

Thanks
#2
1. Can't.
2. _s and _i are local variables that don't have to be declared. Can be used anywhere, for any purpose.
3. _command, _hresult etc don't need to declare too. Each has its specific purpose.
4. A class can have constructor. Look in Help, or create with menu -> New -> Class.
5. Yes, QM destroys a class variable when its scope ends (local - when the function exits, thread - when the thread ends, global - when QM exits or new QM file loaded).
6. Yes.
7.
#3
Quote:1. Can't.
Ok, hoping it could. Too hard to implement it for a 10k reg file. I'll stick on run function way.
Quote:2. _s and _i are local variables that don't have to be declared. Can be used anywhere, for any purpose.
3. _command, _hresult etc don't need to declare too. Each has its specific purpose.
Good for memory...

Quote:4. A class can have constructor. Look in Help, or create with menu -> New -> Class.
Too complicated for me, if QM does it, enough for me...
Quote:5. Yes, QM destroys a class variable when its scope ends (local - when the function exits, thread - when the thread ends, global - when QM exits or new QM file loaded).
6. Yes.
OK
Quote:7. How to use it in macro MyMacro then.
I suppose I simply redeclare it in the function/macro I want to use it?
init2:
SomeCustomClass+ t
functionIwantTouseitIn
SomeCustomClass+ t

Is there a t._s or t._i variables though?
#4
Don't need to redeclare global variables, but can.

t._s or t._i - no.
#5
ok, thanks.


Forum Jump:


Users browsing this thread: 1 Guest(s)