dev-jam / opensesame-plugin-parallel_port_trigger

OpenSesame Plug-in for sending stimulus synchronization triggers through the parallel port to data acquisition systems.
Other
3 stars 10 forks source link

Compatibility with OpenSesame 3.0 #2

Open smathot opened 8 years ago

smathot commented 8 years ago

I receive quite a few automated bug reports about this plug-in on OpenSesame 3.0. On the one hand this is good news, because it means people are using the plug-in. On the other, it means that it would be a good idea to update the plug-in. I suspect it's only a matter of fixing the management of experimental variables, so that they are all properties of the var object, as described here:

esdalmaijer commented 8 years ago

Is self.var the new self.experiment?

smathot commented 8 years ago

Not really. var is a container object for experimental variables. Before, experimental variables where properties of the experiment object, but this made the distinction between experimental variables and the inner mechanics of OpenSesame very fuzzy.

esdalmaijer commented 8 years ago

Thanks! I've just seen @dev-jam's new implementation, and think I get the concept. Should probably change that in some of my old plug-ins too. Did you get any automatic bug reports on the slider plug-in? (Or anything else? I doubt people are still using my other things.)

smathot commented 8 years ago

Yes, I actually have seen a few bug reports for the slider as well.

dev-jam commented 8 years ago

Solved! Plugin is now opensesame 3 compliant (all my plugins btw)

At the moment I am using: self.var for item specific elements/variables self.experiment for experiment wide variables/instances self.variable_name for plugin wide variables

In the prepare phase I link the item specific variables to plugin wide variables: self.variable_name1 = self.var.variable_name1 Could you advice me on this? Is this a good habit or can I better use the self.var through the entire class?