ID:150995
 
Stat()
  statpanel("Stats", mystats)
  statpanel("Abilities", myabilities)
  statpanel("Inventory", contents)
  if(buying)
    statpanel("Purchase", buy_content)
  ..()


This is the code I use to open a new stat panel if a person is in "buying" mode. All of this worked beautifully two patches ago. After 293 the "Purchase" panel is created when in buying mode, but it's contents are not shown unless the user clicks on another panel, and then back to the Purchase panel.

Upgraded to 294, and this is still buggy.

I'll accept either a patch that puts it back how it was, or someone telling me how to alter the above code to make it work as intended.
We have futzed with the statpanels a bit, so I can understand the appearance of new problems. However, I'm having trouble reproducing this. I tried encapsulating your code with this example:

mob
var/mystats
var/myabilities
var/mypurchase
var/toggle
New()
mystats = list("a","b")
myabilities = list("c","d")
mypurchase = list("e","f")
verb/toggleon()
toggle = 1
verb/toggleoff()
toggle = 0

mob/Stat()
statpanel("Stats", mystats)
statpanel("Abilities", myabilities)
statpanel("Inventory", contents)
if(toggle)
statpanel("Purchase", mypurchase)
..()

And when I did "toggleon" the "Purchase" panel appeared. Clicking on it showed the correct contents. How are the events occuring in your world?

In response to Tom
Ok, I originally had the purchase panel listed first, which is what I really want. The reason is, this used to automatically bring it to front when someone activated the buying verb. Putting last means you have to use buy() then you have to notice there is a new panel, then you have to click on it. Not exactly what I want.

Now try the example putting the purchase panel first:

mob/Stat()
if(toggle)
statpanel("Purchase", mypurchase)
..()
statpanel("Stats", mystats)
statpanel("Abilities", myabilities)
statpanel("Inventory", contents)

And I get the problem I originally described. The panel shows as being active, but it shows the contents of the Stats panel instead. One must click on another panel, then back to the purchase panel.

I don't know if it has anything to do with it, but the Purchase panel shows a list of actual objects, not just text.

Thanks for investigating,

Skysaw

On 6/9/01 5:32 pm Tom wrote:
We have futzed with the statpanels a bit, so I can understand the appearance of new problems. However, I'm having trouble reproducing this. I tried encapsulating your code with this example:

mob
var/mystats
var/myabilities
var/mypurchase
var/toggle
New()
mystats = list("a","b")
myabilities = list("c","d")
mypurchase = list("e","f")
verb/toggleon()
toggle = 1
verb/toggleoff()
toggle = 0

mob/Stat()
statpanel("Stats", mystats)
statpanel("Abilities", myabilities)
statpanel("Inventory", contents)
if(toggle)
statpanel("Purchase", mypurchase)
..()

And when I did "toggleon" the "Purchase" panel appeared. Clicking on it showed the correct contents. How are the events occuring in your world?
In response to Skysaw
You know, I've had the same problem with my "Environment" panel, in my text MUD, and it's the first panel.

On 6/9/01 8:54 pm Skysaw wrote:
Ok, I originally had the purchase panel listed first, which is what I really want. The reason is, this used to automatically bring it to front when someone activated the buying verb. Putting last means you have to use buy() then you have to notice there is a new panel, then you have to click on it. Not exactly what I want.

Now try the example putting the purchase panel first:

mob/Stat()
if(toggle)
statpanel("Purchase", mypurchase)
..()
statpanel("Stats", mystats)
statpanel("Abilities", myabilities)
statpanel("Inventory", contents)

And I get the problem I originally described. The panel shows as being active, but it shows the contents of the Stats panel instead. One must click on another panel, then back to the purchase panel.

I don't know if it has anything to do with it, but the Purchase panel shows a list of actual objects, not just text.

Thanks for investigating,

Skysaw

On 6/9/01 5:32 pm Tom wrote:
We have futzed with the statpanels a bit, so I can understand the appearance of new problems. However, I'm having trouble reproducing this. I tried encapsulating your code with this example:

mob
var/mystats
var/myabilities
var/mypurchase
var/toggle
New()
mystats = list("a","b")
myabilities = list("c","d")
mypurchase = list("e","f")
verb/toggleon()
toggle = 1
verb/toggleoff()
toggle = 0

mob/Stat()
statpanel("Stats", mystats)
statpanel("Abilities", myabilities)
statpanel("Inventory", contents)
if(toggle)
statpanel("Purchase", mypurchase)
..()

And when I did "toggleon" the "Purchase" panel appeared. Clicking on it showed the correct contents. How are the events occuring in your world?
In response to Skysaw
On 6/9/01 8:54 pm Skysaw wrote:
Ok, I originally had the purchase panel listed first, which is what I really want. The reason is, this used to automatically bring it to front when someone activated the buying verb. Putting last means you have to use buy() then you have to notice there is a new panel, then you have to click on it. Not exactly what I want.

Thanks. It's fixed now. The focus stays on the existing panel, but you can change it by setting client.statpanel.

We'll be putting out the new release sometime this evening.