Re: [BLACKBOX] user input (was limiting integer values in interactor field)

From: [at]} <Gunnar>
Date: Sun, 17 Jan 2010 11:15:43 +0100

----boundary-LibPST-iamunique-1584947764_-_-
Content-type: text/plain

Robert,

> [...]
> My point is that since 'self' is a (*copy*) of the pointer to the Action
> record setting it to NIL has no effect; the main pointer also needs to be
> cleared.
>
> [...]
> What (I think) you need to do to free the memory it is put the line
> attActionObj := NIL
> at the end of
> PROCEDURE attNotifier*( n, op, from, to: INTEGER ).
You are correct that I should reset the global variable (and have
noticed the difference).

>
> Do you have a reason to export "attActionObj" ?
Not really, in fact it works fine without.
But I have been using the SqlDb a lot recently, so exporting records
for accessibilities sake has almost become second nature.

>
> If not, I think its is better to move the declaration
> VAR
> attActionObj : attNotifierAction;
> into
> PROCEDURE attNotifier*( n, op, from, to: INTEGER ).
>
> Then there is no need to write
> "attActionObj := NIL" at the end
> as the garbage collector will free the memory anyway.
There is a global pointer to the notifier data in order to flush the
last event for another input field. This can not be done if the pointer
is only local to attNotifier (the comparison attActionObj.n#n would make
no sense).

regards
gunnar


PS: I do not know how professional programmers work, but when I return
from work I am happy to understand a basic concept and making it run.
The majority of my errors are fixed by the first idea that springs to
mind and is accepted by the compiler and a superficial test at run time
(when I see how our programmers at work fix errors I assume this is what
they do as well most of the time).


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1584947764_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnR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cHB5IHRv
IHVuZGVyc3RhbmQgYSBiYXNpYyBjb25jZXB0IGFuZCBtYWtpbmcgaXQgcnVuLiBccGFyDQpUaGUg
bWFqb3JpdHkgb2YgbXkgZXJyb3JzIGFyZSBmaXhlZCBieSB0aGUgZmlyc3QgaWRlYSB0aGF0IHNw
cmluZ3MgdG8gXHBhcg0KbWluZCBhbmQgaXMgYWNjZXB0ZWQgYnkgdGhlIGNvbXBpbGVyIGFuZCBh
IHN1cGVyZmljaWFsIHRlc3QgYXQgcnVuIHRpbWUgXHBhcg0KKHdoZW4gSSBzZWUgaG93IG91ciBw
cm9ncmFtbWVycyBhdCB3b3JrIGZpeCBlcnJvcnMgSSBhc3N1bWUgdGhpcyBpcyB3aGF0IFxwYXIN
CnRoZXkgZG8gYXMgd2VsbCBtb3N0IG9mIHRoZSB0aW1lKS5ccGFyDQpccGFyDQpccGFyDQotLS0t
XHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBC
TEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIfX0AnRRh+A==
----boundary-LibPST-iamunique-1584947764_-_---
Received on Sun Jan 17 2010 - 11:15:43 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:36 UTC