 |
yawdoolf Beginner
Joined: 21 Sep 2008 Posts: 10
|
Posted: Mon Oct 13, 2008 11:02 pm
Is package's state shared? |
"State" means values of variables, buttons, etc.
For example, I have "some.pkg" package and some values within. This package is used by two different sessions.
Suppose I've opened both. Will all values inside of package be the same for each session? Or there will be some copies of these? (saved in the default session's package?).
Where I'm getting at - should I combine in the one package only logic? It's self-evident that there are no problems with variables used only within package itself. But what about values used out of package?
I could provide interface of package through events and it'd be cool, but when I want to save the state there should be some value to keep it, and the right way is to hold its own copy in each session (like a single program shared between several PC where each keeps its own settings of this program).
A package could be copied and used only for particular session, but if there are some changes you will have a headache to do the same changes for other copies of such package.
How does it work?
p.s. I'd be glad to hear how you arrange your packages, modules, etc. |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Oct 14, 2008 8:11 am |
Yes and no. On the package properties menu, there's a shared box. If that box is checked, the package is only loaded once for all sessions. If it's unchecked, it's loaded once for each session - whichever session closes last is the one whose state is saved to disc. If you want to have separate values saved, you need to use two copies of the package or you need to store these values in a package that's unique to that session - the session's main package should do.
|
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|