Hello
Sorry, I confess I have some difficulty with object-oriented programming
If instead of using the function:
operativeModePres = function () {
......
I use the method:
OrthogonalProjections.prototype.operativeModePres = function () {
As I have to do to recall this method from an event I tried a few ways but it does not go:
// operativeMode ['currentIndexChanged (int)']. connect (function () {operativeModePres ();});
// operativeMode ['currentIndexChanged (int)']. connect (function () {this.operativeModePres;});
operativeMode ['currentIndexChanged (int)']. connect (function () {operativeModePres.call (operativeModePres);});
How do I go about recalling a method from an event
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
Re: How do I go about recalling a method from an event
Searching for solutions on https://github.com/qcad/qcad/ have managed to solve this problem as follows:
operativeMode ['currentIndexChanged (int)']. connect (this, "operativeModePres");
From here maybe I can solve the previous problem:
"Loss of script operation after using snaps"
operativeMode ['currentIndexChanged (int)']. connect (this, "operativeModePres");
From here maybe I can solve the previous problem:
"Loss of script operation after using snaps"