Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

OnFunctionCall called twice when using the OpenPopupEdit function


Jonas Kuster
 Share

Recommended Posts

Jonas Kuster
Posted
Posted

I'm not 100% sure about my issue, but wanted to bring this for discussion with other members having knowledge about ES plugin coding, so you may verify my observations.

When using the OpenPopupEdit function while coding a plugin, the FunctionId given is called twice afterwards. I tried debugging, but couldn't find the reason/source for the double call. It seems the OnFunctionCall catches the id twice and therefore executes also the statements twice then. I'm changing the flight plan and calling the flight plan amend function afterwards. May this lead to OnFunctionCall juming into again?

Jonas Kuster
Network Supervisor
Leader Operation vACC Switzerland | vacc.ch @vaccswitzerland
GNG Support Team | gng.aero-nav.com
ES Plugin Developer | CCAMS

Link to comment
Share on other sites

Jan Fries
Posted
Posted

I had this problem as well. I found out it only gets called twice when pressing enter. If you enter your text and click anywhere else, it gets called once. I did a workaround where the calling of the function is blocked by a boolean if the function is called and already executed, this kinda works.

I don't think it has anything to do with amding flight plans, but something on how OpenPopupEdit works.

  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...
Jonas Kuster
Posted
Posted

@Gergely Csernak Just stumbled over this topic again. Can you confirm it is intentional that OnFunctionCall is called twice for "confirmed" (Enter) entries, and one time otherwise (clicking elsewhere)?

Jonas Kuster
Network Supervisor
Leader Operation vACC Switzerland | vacc.ch @vaccswitzerland
GNG Support Team | gng.aero-nav.com
ES Plugin Developer | CCAMS

Link to comment
Share on other sites

 Share