I have a question regarding the order in which methods are triggered.
My method:
var selected = cont_id
var contact = forms.contacts.cont_id
forms.contacts_join.controller.showRecords()
forms.contacts_join.controller.find()
forms.contacts_join.conjoin_rel1 = selected
forms.contacts_join.conjoin_rel2 = contact
forms.contacts_join.controller.search()
var found = forms.contacts_join.controller.getMaxRecordIndex()
if(found >= 1)
{
var message = i18n.getI18NMessage('coperta.dialog.contactjoin.text.already', new Array ())
}
else
{
if (selected == contact)
{
var message = i18n.getI18NMessage('coperta.dialog.contactjoin.text.same', new Array ())
}
else
{
var message = i18n.getI18NMessage('coperta.dialog.contactjoin.text', new Array ())
}
}
globals.g_contact_dialog = message
forms.nav_user_main.controller.showRecords()
forms.nav_user_main.elements.tabs_dialog.visible = true
application.output("select_cont tab_dialog visible true")
forms.nav_user_main.elements.tabs_dialog.tabIndex = 2
The form nav_user_main triggers another script onShow with, among other things, these lines:
forms.nav_user_main.elements.tabs_dialog.visible = false
application.output("open_contacts tab_dialog visible false")
When I run the script using the debugger with breaks on, it gives me the following output:
open_application tab_dialog visible false
select_cont tab_dialog visible true
and everything works fine. But when I use the debugger without the breaks and run the script like it is normally run, it gives me:
select_cont tab_dialog visible true
open_contacts tab_dialog visible false
It seems to me that the order in which the scripts are triggered is changed. Is there a way to edit the order, so that it would run like it is when the debugger breaks are on? Or is there a way to disable the onShow option in a script?