Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMS Add-Ins: managing state using session variables

26 views
Skip to first unread message

Ian

unread,
Dec 16, 2007, 9:22:53 AM12/16/07
to
Hi,

I'm new to the world of RMS, but have been looking into making RMS Add-
Ins. I'm developing in C#.

I've got a couple of add-ins written that don't do anything particular
at the moment, but do need a way of passing state to each other.

The two add-ins are hooked into the InitializeTransaction and
PrintReceipt hooks. At the moment, I'm passing state around by using a
session variable.

However, what I find a little odd is that the session variables appear
to be implemented as a fixed 10-position array. For my initial testing
I'm just arbitrarily picking one slot in the array to use. And it
works a treat.

But, in a real-world deployment, I can't hard-code a slot to use. So,
should I just loop through all 10 slots, looking for the first free
one (if setting the variable) or one that conforms to a particular
type (if retrieving the variable)? But what happens if all 10 slots
are in use by other add-ins?

The only other options I can see are to either customize the database
and manage state through there, or to have something like a .NET
Remoting singleton to manage all the state. But those both seem like
using a sledgehammer to crack a nut.

Please, someone tell me I've completely misunderstood how the session
variables work, and set me straight...

Cheers
Ian

YUSHA

unread,
Oct 14, 2021, 12:15:04 AM10/14/21
to
yea i tried that, but it can be done only at dll and works but at the receipt side well .....

Public hookx(10) As String
hookx(1) = "ESTE"
hookx(2) = "CASO PERDIDO"
hookx(3) = "ESTA"
hookx(4) = "CASI RESUELTO?"
identity.Variable(10) = hookx

MsgBox("El Registro Actualizado es " & identity.Variable(10)(1).ToString & ".")

--
For full context, visit https://www.beansmart.com/point-of-sale/rms-add-ins-managing-state-using-session-variables-29987-.htm

0 new messages