A bug in the editor

It turns out that the error I got trying to access the XSLT source (not the missing shortcut, the crash) was due to a bug in the editor. I had a


with no <tbody>. Yes, I know.

But the editor checked the XSLT and appears to think it is fine. Then the renderer took over and crashed, due to the missing <tbody>.

Fortunately I found the XSLT in the temp cache so with the supplier’s help I could regenerate the XSLT (deleting all my work) and reinsert my code, now with the <tbody> tag.


Interform communication

We performed the upgrade to Lansa 14 so now I am getting used to that. Some irritating bugs in the form UI have disappeared so so far I am happy 🙂

As I have said, I am very much learning the language at the moment and these are my notes. Today I wanted to one form to invoke a method in another form (provided it had been instantiated). Both forms would have been opened by a third form and I decided to let the third, the “parent”, form do the actual invocation.

The forms are, for reasons, named VLI510 (source), VLI710 (destination) and VLI500 (parent). In VLI710 (destination) I create the method that should be invoked:

Mthroutine Name(MTHSETUP)

In VLI510 (source) I create

Define_Com Class(#VLI500) Name(#VLI500) Reference(*DYNAMIC)
Mthroutine Name(Set_VLI500)
Define_Map For(*INPUT) Class(#VLI500) Name(#VLIPAR) Pass(*BY_REFERENCE)
Set_Ref Com(#VLI500) To(#VLIPAR)
If_Ref Com(#VLI500) Is_Not(*null)

And in VLI500 (parent) I have

Define_Com Class(#VLI510) Name(#VLI510) Reference(*DYNAMIC)
Define_Com Class(#VLI710) Name(#VLI710) Reference(*DYNAMIC)
If_Ref Com(#VLI710) Is(*null)
Set_Ref Com(#VLI710) To(*create_as #VLI710)
If_Ref Com(#VLI510) Is(*null)
Set_Ref Com(#VLI510) To(*create_as #VLI510)
Mthroutine Name(VLI710UPD)
If_Ref Com(#VLI710) Is_Not(*null)

This actually works. So, I have a method on the destination form, VLI710.MTHSETUP. This is called from the parent forms method, VLI500.VLI710UPD, which is called from the source form. In order to have the reference to the parent form in the source form, the parent calls the VLI510.Set_VLI500 method with itself as the VLIPAR parameter.