can't get form name

Hi all..

Bit of a problem.. Here is my method in a controller form (I assume you can check the currentcontroller form as something separate from the controller form):

var v_current_form = history.getFormName()
if (v_current_form == dh_po || dh_purchase_order_print)
{
globals.po_logo = “media:///1.gif”
}
if (v_current_form == murderme_po || murderme_purchase_order_print)
{
globals.po_logo = “media:///2.gif”
}

if I execute this on onShow, I get the following error:

Can’t find method com.servoy.j2db.FormManager$History.js_getFormName().

Seems that this is a Servoy bug? or am I doing something wrong?

Thanks for any help you can give..

If I look at history.getFormName() I see that the function is described as

history.getFormName(number)

So Servoy is absolutely right when saying

Can’t find method com.servoy.j2db.FormManager$History.js_getFormName().

because there is no such method but only a “js_getFormName(number)”.

So if you want the current form using the history functions, it should look like

history.getFormName(history.getCurrentIndex())

Of course, there is also many other ways of retrieving the current form name…

Hope this helps.