MechanismType

classes
   action         make           remove         selected       
   count          menu           select         

SYNTAX

mt = new MechanismType(0)
mt = new MechanismType(1)

DESCRIPTION

Provides a way of iterating over all membrane mechanisms or point processes and allows selection via a menu or under hoc control.

The 0 argument creates a list of all available distributed membrane mechanisms (as opposed to PointProcesses). eg "hh", "pas", "extracellular". that can be inserted into a section.

The 1 argument creates a list of all available Point Processes. eg. IClamp, AlphaSynapse, VClamp.

Mechanism order is the same as the argument order that created the "special" during nrnivmodl or mknrndll. Therefore when a saved session depends on information in a MechanismType it is dependent on a particular special or dll.

EXAMPLES

execute following example
objref mt
//Print the names of all density mechanisms
mt = new MechanismType(0)
strdef mname
for i=0, mt.count()-1 {
	mt.select(i)
	mt.selected(mname)
	print mname
}

SEE ALSO

MechanismStandard


select

MechanismType

SYNTAX

mt.select("name")
mt.select(i)

DESCRIPTION

selects either the named mechanism or the i'th mechanism in the list.


selected

MechanismType

SYNTAX

i = mt.selected([strdef])

DESCRIPTION

returns the index of the current selection. If present, strarg is assigned to the name of the current selection.


remove

MechanismType

SYNTAX

mt.remove()

DESCRIPTION

For distributed mechanisms invoked with the "insert" statement. Deletes selected mechanism from currently accessed section. A nop if the mechanism is not in the section.


make

MechanismType

SYNTAX

mt.make()
mt.make(objectvar)

DESCRIPTION

mt.make()
For distributed mechanisms. Inserts selected mechanism into currently accessed section.
mt.make(objectvar)
For point processes. The arg becomes a reference to a new point process of type given by the selection. Note that the newly created point process is not located in any section. Note that if objectvar was the only reference to another object then that object is destroyed.


count

MechanismType

SYNTAX

i = mt.count()

DESCRIPTION

The number of different mechanisms in the list.


menu

MechanismType

SYNTAX

mt.menu()

DESCRIPTION

Inserts a special menu into the currently open xpanel. The menu label always reflects the current selection. Submenu items are indexed according to position with the first item being item 0. When the mouse button is released on a submenu item that item becomes the selection and the action (if any) is executed.


action

MechanismType

SYNTAX

mt.action("command")

DESCRIPTION

The action to be executed when a submenu item is selected.


neuron/neuron/classes/mechtype.hel : Apr 15 1997