dpConnect use

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
6 posts • Page 1 of 1
MassEffect
Posts:29
Joined: Mon Aug 24, 2020 8:19 pm

dpConnect use

Post by MassEffect »

Hello!
As far as I know the function dpConnect(callback, DP.property) uses callback function to bind any changes DP.property. Does it exist any function that unbind my DP.property or it will be automatically? That is if I don't need listen to DP.property at the moment than I unsubscribe for event and subscribe if I need it.

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: dpConnect use

Post by adaneau »

Hi,

Depends where your dpConnect is called:

- in a panel: it will be disconnected when this panel is closed (if panel ref, when ref is removed).
- in a script: it will be disconnected when script is stopped. Be aware that dpconnect is preventing a script to terminate.

If you want fine control, you can always use dpdisconnect.

Best regards
Alexandre

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpConnect use

Post by leoknipp »

Just an additional information: The function dpDisconnect() must be called in the same script which has called dpConnect(). Otherwise the dpDisconnect() does not work.

Best Regards
Leopold Knipp
Senior Support Specialist

MassEffect
Posts:29
Joined: Mon Aug 24, 2020 8:19 pm

Re: dpConnect use

Post by MassEffect »

- in a panel: it will be disconnected when this panel is closed (if panel ref, when ref is removed).

That is all scripts that bind to panel or grafic elements, buttons in panel etc. (on events like - initialize, click, focus and so on) unbind than I close appropriate panel?

- in a script: it will be disconnected when script is stopped. Be aware that dpconnect is preventing a script to terminate.

That about scripts that running with control manager?

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: dpConnect use

Post by adaneau »

Hi,

Yes that's correct. Sorry I wasnt really clear by using the word "script", I meant running inside ctrl manager.

Best regards
Alexandre

MassEffect
Posts:29
Joined: Mon Aug 24, 2020 8:19 pm

Re: dpConnect use

Post by MassEffect »

Thank you very much!

6 posts • Page 1 of 1