|
unrealtor Beginner
Joined: 23 May 2020 Posts: 19
|
Posted: Sat May 23, 2020 10:23 pm
Problem with a Global Packaged Multi-state Button > Show in session toolbar |
I have finally begun the adventure of CMUD and the transfer of my ZMUD setup. Everything so far has been fairly straightforward, going well, and with the new packages; so much better! However, I have run into an issue with scoping and not sure the proper approach to resolve it in the new version.
Current Goal:
- Create global library of common shared objects (works)
- Have a basic trigger to eat @food when the hungry message occurs (works)
- Create a Mutlistate Button with selection of food types, sets var @food. This button is displayed in the lower session toolbar (2). (Partially works)
- Note: Selection does set a regular var under the session's local package (this is desired)
Issues:
- When a new session is opened, the button seems to get bound to it
- When switching to view other session tabs, the button is obviously shared in view and setting it in any tab only sets the @food var in the last opened session's local package vars
- If I close the last session/window, changing the button causes a CMUD error message. If I click Continue on the error, the button gets associated to one of the other sessions
So my goal here is to use the lower toolbar (2) for independent session controls, like dropdowns, for setting quick adjustments to a given character's needs. I want this to be a global package, that uses the lower toolbar to display a unique instance of the button specific for the session being viewed, so that it displays the current value of and changes the settings tied to the currently viewed session.
I have tried several things to resolve this, but I feel I am missing some scope understanding or maybe there is simply another way of doing this. My hunch is that the lower toolbar is by default shared across all instances and by having the button there, that the last connection causes the overwrite of that button and binds it to the single session.
Any thoughts to the best approach to achieve my goals?
Thanks in advance! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat May 23, 2020 11:51 pm |
This may be caused by having an instance of the variable(s) in the shared package.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
unrealtor Beginner
Joined: 23 May 2020 Posts: 19
|
Posted: Sun May 24, 2020 12:17 am |
For clarity, let me explain with some samples.
So when the state changes, it create/sets the variable @food in the local of the last session opened. No matter which tab you are clicked and viewing, it always writes to this last loaded session's "local" package.
Example steps with Results:
Given: mud1 and mud2 pull in a global package called buttons.pkg (this has an inherited button that is placed in the lower toolbar)
OPEN mud1, change drop-down from "meat to "bread", #show @food (says "bread"), look at mud1.pkg and see #VAR food=bread
OPEN mud2, do as above, but mud2.pkg now gets the #VAR food=bread
VIEW mud1 Tab, change the drop-down to "ration". This INSTEAD sets ONLY mud2.pkg's #VAR food=ration
VIEW mud2 Tab and you will see "ration" selected in the drop-down even though that was set viewing mud1 tab
*Desired: Each session tab you are viewing has its own button that sets only its own mud*.pkg var
So my conclusion, is that each new session tab loaded is replacing the button with it's own and when you change tab views you are seeing the same physical button. Again, I feel this might be because the toolbar is shared across all tabs, but if this is so, I am not sure how I get around it without re-inventing a few wheels.
Thanks! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun May 24, 2020 1:13 am |
There is a way I can see around it, but you won't like it.
Open each character session in a separate instance of CMUD. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
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
|
|