targetForm argument?

In 5.x once a method is linked to a form event (like onAction) then we see a sub-property called targetForm for that event. It seems we can enter any string and that gets passed to the method as arguments[1].

I can’t find any explanation of its purpose in forum nor wiki but perhaps I don’t know where to look :o Is there an example somewhere? It looks like it could be useful to pass any string, not just a form name, to a method so it can conditionally branch.

If it’s just to pass the form name, this is already passed in the event - formName property

Where do you see this? Are you sure you’re not attaching a method to an event that you manually created and has a first parameter with the name targetForm?

Paul

This is what Tony means:

a function like:

function onAction(event, myParam1, myParam2)
{
	application.output(myParam1)
	application.output(myParam2)
}

This will show in the event properties as this:[attachment=0]props.png[/attachment]

The stringArg1/2 are correctly displayed in the console by the method.

OK, :oops:
I see it now, trying out Karel Broer’s sample code for a webclient compatible dialog
http://forum.servoy.com/viewtopic.php?f=14&t=13899#p72978
with the function

function core_DIALOG_deleteRecord(event, targetForm)

Wondered why I hadn’t noticed it before.
On that topic, is there an easier way to use dialogs in webclient?

antonio:
is there an easier way to use dialogs in webclient?

I like to have that question answered too :wink: