npAbac plugin

About this plugin

This plugin allow to show a complete Calculator attached to a NeoBook rectangle. Of course you can attach more than one Calculator and controlling it separatelly. Every calculator can be customized by colors, options, events, etc.

You can press any Calculator button programatically, get advised when a button is pressed, show a Calculator Tape and retrieve their contents, and of course obtain the last value on the Calculator. All things in an easy but customizable way.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npAbacCreate

Create a new instance of an Abac object and attach it to a NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npAbacDestroy

Destroy a previously Abac object instance and deattach from their NeoBook rectangle. The result variable store "True" if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npAbacDestroyAll

Destroy all previously Abac objects instances and deattach from their NeoBook rectangles.

↑↑

npAbacColors

Set the colors of an Abac object instance. Specify the Abac object instance in order to change their colors. You can choose various Calculator elements colors to customize the control. Take a look at npAbacOptions too. The result variable store "True" if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npAbacOptions

Specify general options of an Abac object instance. Specify the Abac object instance in order to customize various options. Take a look at npAbacColors too. Here you can view the options you can change, the possible values and the default values:

The result variable store "True" if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npAbacTape

Get the current tape text of an Abac object instance. The result variable store the Calculator tape text if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npAbacValue

Get the current value in an Abac object instance. The result variable store the last Calculator value if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npAbacPress

Press an specific button of an Abac object instance. This action allow you to press any of the Calculator buttons programatically. Here is the list of the available buttons in order to be pressed:

The result variable store "True" if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

npOnAbacButton

Set a publication subroutine to be executed when an Abac object instance button are pressed. In the rectangle variable you receive the rectangle name in which the control is attached. By this way, you can share one subroutine with more than one control. The button variable store one of the button "names" listed on npAbacPress, and, additionally the cbNone value.

The result variable store "True" if everything is OK, or "False" if an error ocurr. In this last case the [LastError] variable store information about the error.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑