Question
· May 10, 2023

Is it possible to define an *instance* method in tag-based CSP?

In a tag-based CSP page, I can define (e.g.):

<script method="Foo" language="cache" runat="server">

Is there any way to use this syntax to define an *instance* method (i.e., Method rather than ClassMethod) in the generated class?

Product version: IRIS 2023.1
Discussion (12)3
Log in or sign up to continue

In fact, even subclassing %CSP.WebSocket or adding your instance methods class as superclass would not work because all the code you write inside a CSP page run in class methods, so you cannot call an instance method.

And this brings back my initial question:

What would be the instance (i.e. $this) of the method?

None I think, within a CSP page code there is no current instance, the "page" is not instantiated, even when using %CSP.WebSocket as superclass.

But...how are you using %CSP.WebSocket??

Something like:
<CSP:CLASS SUPER="%CSP.WebSocket">

Or what/how?

Enrico