 |
| Zugg |
Posted: Wed Nov 22, 2006 8:10 pm
Poll about how Published Modules should work |
 |
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Sun Nov 26, 2006 12:08 am |
I'd go with a radio box for all four options - it just looks like there's something missing if you leave out option 1.
|
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Sun Nov 26, 2006 3:29 pm |
Option 1 is totally unnecessary since there is no way it could ever become active. Without being attached to a window only alarms might possibly run, and I think those would even need a session in order to become active.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4805 Location: Pensacola, FL, USA
|
Posted: Sun Nov 26, 2006 8:29 pm |
It might be useful for variables that hold sensative material... would you still be able to get at the variables if you referanced them modularly?
Or for housing 'Plug-Ins' when and if they come about. |
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Thu Nov 30, 2006 4:48 pm |
I have been thinking a little bit more about this and have another idea if you haven't implemented anything yet, Zugg.
| Quote: |
| 1) Module is private - nobody can see anything within the module (not visible to current package, not visible to other packages) |
For option 1, this is basically a Window module behavior. Things within the module can still be referenced if they are specifically targetted through a //module/class syntax. That is good, nothing should be totally private, just having it so it has to be specifically referenced is good enough.
| Quote: |
| 2) Module is published to everyone - all packages can see within the module. (visible to current package, visible to other packages) |
For option 2 we currently have a module with the pubished flag. That is perfect how it goes to satisfy that option.
| Quote: |
| 3) Module is only published to current package (visible to current package, not visible to other packages) |
For option 3 we currently have a module without the published flag. Since all modules excluding window modules publish thier settings to the entire package they are in.
| Quote: |
| 4) Module is only published to other packages (not visible to current package, visible to other packages) |
For option 4 there is a short coming. One simple solution, that might even make more sense then another publishing flag is to change the "List of packages enabled for this module" to "List of modules enabled for this module". The module that is displaying the list would have itself enabled and greyed, unpublished modules in other packages would be disabled and greyed.
If a default of not enabled is used then option 4 begins to be satisfied. A module would be published, but its package builder would have to specifically enable it for other modules in the package. This also provides a degree of security for newer users downloading a package from the library. They would have to specifically enable the modules before any action could be taken by those modules. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Nov 30, 2006 6:14 pm |
Vijilante, I've thought about doing that. The problem is that there is no way for one package to know which modules are in another package without reading the entire package. Also, module names are not unique. The same module name might exist in multiple packages. And remember that this information is stored with a *session* and not with the package itself. By storing the "enabled package list" with the session, it allows you to load the same package, but have it enabled or disabled for different character windows.
For example, if you have a "Fighter Package", then you have your main session with two Windows: "Warrior" and "Mage", then you just enabled the "Fighter Package" for the Warrior window, and not for the Mage window.
From a user interface point-of-view, the only way this would make sense is if the "List of enabled modules" was a tree-view with checkboxes next to each node, where you could click on the checkbox for the entire package to enable/disable all modules in the package, or just click the checkbox for an individual module within a package. But this would take a lot of time to code, and I'm still not sure how to efficiently store the data into a session in a way that would work even if the package was edited and the names of the modules were changed.
Anyway, something this complicated isn't going to get added soon, so I still need an easy way to handle the user interface option for case (4). Case (4) is already implemented in the code with a simple boolean test, so it's just the user-interface that needs to be set. |
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Nov 30, 2006 6:27 pm |
| Zugg wrote: |
| The same module name might exist in multiple packages. |
What happens if you have two variables with the exact same //module/class/name path, then? Would both be updated, or a randomly chosen one of them? |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Nov 30, 2006 6:39 pm |
It will pick the module within the same package first. If both modules are outside of the current package, then it should pick the module that was loaded first. Only one would be updated.
That's why the //module/class/name syntax should only be used when absolutely necessary. The whole point of packages is that they should be independant. As soon as you start linking packages together with //module/class/name stuff, then you are creating package dependencies that could potentially cause problems. The syntax is only there for cases where you have no other choice. |
|
|
|
 |
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Thu Nov 30, 2006 11:54 pm |
Is there a //package/module/class/name syntax? There would be no ambiguity then.
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Dec 01, 2006 12:04 am |
No, and that isn't planned right now. As I said, that breaks the independance of packages.
If someone can come up with an actual useful purpose for this kind of stuff, then I'll consider it. But if you want to access stuff in a different package, just make sure the module names are unique! Come on people, we can all think of stuff that could be added. But I'm not adding the kitchen sink to CMUD. There are already plenty of ways to do cross-package communication (unique module names, events, etc). I'm not going to spend hours and hours adding some new obscure syntax for //package... just because someone is worried about conflicts in module names.
Let's try to focus on stuff that really matters here. |
|
|
|
 |
|
|
|