ID:141967
 
This may not actually be a bug. To me the terms of a grid normally mean a current-cell feature would indicate the X,Y coordinates on the grid and properly place the information on the grid in the correct coordinates when you output something into it. But, for all intensive purposes, I will report it, because I think it is.

Applicable Configuration:
BYOND Version: 429.999
Operating System: Windows XP Pro SP3
Game/Hub(s): My current projects with A Grid in the interface (Dunno about others since I dont edit them to find out)
Video Card (for graphics bugs): Dual NVidia Geforce 8800 GTs

Descriptive Problem Summary: When you use winset(player,control,params), as far as I know you set params as "current-cell=x,y". As far as I can tell, it doesn't listen to the Coordinates.
What I mean is that if I set every single instance in it to the params "current-cell=1,y" where y is anything from 1 to 1 billion, it doesn't really listen. I have a Grid where every single winset() is just like that, X is always 1 and Y is whatever, and when I maximize it, it creates the grid so that it always spans right first, then downward, ignoring the params.

After I show the Code, I will include two pictures that emulate this problem.

Numbered Steps to Reproduce Problem:
Create a Grid.
Set the Grid to work as Flexible (Shouldn't mean it ignores the X coordinates in my opinion)
use a various amounts of winset() and output()s to create a grid type-interface.
Make it so that the window only has room for 1 instance for each X (One row), but when maximized, the rows increase to any number over 1
View the window normally, then maximize it.

Code Snippet (if applicable) to Reproduce Problem:
This code is the exact code in which I'm having problems.
        proc
UpdateSkills()
winset(src,"skills","current-cell=1,1")
src << output("Weapon Skills:","skills")
winset(src,"skills","current-cell=1,2")
src << output("\icon[image('skillicons.dmi',"blade")] Blade: [src.blade]","skills")
winset(src,"skills","current-cell=1,3")
src << output("\icon[image('skillicons.dmi',"axe")] Axe: [src.axe]","skills")
winset(src,"skills","current-cell=1,4")
src << output("\icon[image('skillicons.dmi',"blunt")] Blunt: [src.blunt]","skills")
winset(src,"skills","current-cell=1,5")
src << output("\icon[image('skillicons.dmi',"bow")] Bow: [src.bow]","skills")
winset(src,"skills","current-cell=1,6")
src << output("\icon[image('skillicons.dmi',"spear")] Spear: [src.spear]","skills")
winset(src,"skills","current-cell=1,7")
src << output("\icon[image('skillicons.dmi',"dualwield")] Dual Wield: [src.dualwield]","skills")
winset(src,"skills","current-cell=1,8")
src << output("Armor Skills","skills")
winset(src,"skills","current-cell=1,9")
src << output("\icon[image('skillicons.dmi',"shield")] Shield: [src.shield]","skills")
winset(src,"skills","current-cell=1,10")
src << output("\icon[image('skillicons.dmi',"heavyarmor")] Heavy Armor: [src.heavyarmor]","skills")
winset(src,"skills","current-cell=1,11")
src << output("\icon[image('skillicons.dmi',"lightarmor")] Light Armor: [src.lightarmor]","skills")
winset(src,"skills","current-cell=1,12")
src << output("\icon[image('skillicons.dmi',"robearmor")] Robe Armor: [src.robearmor]","skills")
winset(src,"skills","current-cell=1,13")
src << output("\icon[image('skillicons.dmi',"noarmor")] Armorless: [src.noarmor]","skills")
winset(src,"skills","current-cell=1,14")
src << output("Attribute Skills","skills")
winset(src,"skills","current-cell=1,15")
src << output("\icon[image('skillicons.dmi',"speed")] Speed: [src.speed]","skills")
winset(src,"skills","current-cell=1,16")
src << output("\icon[image('skillicons.dmi',"pickpocket")] Pickpocket: [src.pickpocket]","skills")
winset(src,"skills","current-cell=1,17")
src << output("\icon[image('skillicons.dmi',"tiptoe")] Tiptoe: [src.tiptoe]","skills")
winset(src,"skills","current-cell=1,18")
src << output("Magic Tree Skills","skills")
winset(src,"skills","current-cell=1,19")
src << output("\icon[image('skillicons.dmi',"elementalmagic")] Elemental Magic: [src.elementalmagic]","skills")
winset(src,"skills","current-cell=1,20")
src << output("\icon[image('skillicons.dmi',"healingmagic")] Healing Magic: [src.healingmagic]","skills")
winset(src,"skills","current-cell=1,21")
src << output("\icon[image('skillicons.dmi',"supportmagic")] Support Magic: [src.supportmagic]","skills")
winset(src,"skills","current-cell=1,22")
src << output("\icon[image('skillicons.dmi',"summoningmagic")] Summoining Magic: [src.summoningmagic]","skills")
winset(src,"skills","current-cell=1,23")
src << output("\icon[image('skillicons.dmi',"necromancermagic")] Necromancery: [src.necromancermagic]","skills")

Here are the pictures to emulate this problem:
UnMaximized:
Free Image Hosting at www.ImageShack.us
Maximized: Same Code
Free Image Hosting at www.ImageShack.us

Expected Results:
One column, Y rows

Actual Results:
As many columns as will fit in the grid's size (X), Y/X rows.

Does the problem occur:
Every time? Or how often? Everytime
In other games? Dunno
On other computers? Dunno
In other user accounts? Dunno

When does the problem NOT occur?
When the Grid is small enough to only contain the amount of columns you want

Workarounds:
Create a grid barely big enough to hold the columns you want, will not nessicarily fix the problem if the screen resolution of the other players' computers is big enough compared to the default size of the window and the maximize.

Your problem is that you're setting the grid to be a "flexible list of entries". Uncheck that, and it should work as expected.

Grids automatically expand to add in content outside of their current dimensions, but you'll need to shrink it manually if you ever remove items from it.

Also, you can bypass the winset with a special functionality of output:
winset(src,"skills","current-cell=1,11")
src << output("\icon[image('skillicons.dmi',"lightarmor")] Light Armor: [src.lightarmor]","skills")

//Can be written as...
src << output("\icon[image('skillicons.dmi',"lightarmor")] Light Armor: [src.lightarmor]","skills:1,11")


You follow the grid id by a colon and the location.

The only time you should use a flexible list for grids is when you don't care how the items are placed.
In response to DarkCampainger
It shouldn't ignore the params of winset() when you set it flexible, it should just increase the size based on your settings for the current cell. For example, if you set the cell to 2,2, it should create enough cells to reach that point, it shouldn't ignore the current-cell parameter completely.
In response to Polantaris
Polantaris wrote:
It shouldn't ignore the params of winset() when you set it flexible, it should just increase the size based on your settings for the current cell. For example, if you set the cell to 2,2, it should create enough cells to reach that point, it shouldn't ignore the current-cell parameter completely.

Yes it should, that's what a *flexible* list of entries is. You're telling DS that you don't care how they are placed, that their locations are flexible. You can control the order they are placed in, but the grid will be stretched and moved to fit the list of items as efficiently as possible.

The behavior of automatically increasing in size is true regardless of whether the grid is set to flexible or not.

Why do you need the grid to be flexible?
In response to DarkCampainger
I thought flexible meant that it could be increased and decreased in size depending on the circumstance.

My mistake.

When I saw flexible, I thought of grids like a generic list (in like C++ and such), where the list's size is dependent, unless otherwise defined, on what you set it as. For example, the Grid has settings that say "Columns, Rows" and I assumed that meant that it cannot be bigger than that setting, and flexible would mean that it can be whatever it needed, not that it would make it careless to its directions on where to put it.