I have a great use for tables, and like the way they work, with one exception.
What’s with the tabbing? I separate a column of data (and header) with a tab, but as I add data, the columns jump all over the place. If I fix one, the others move. Why does the table do this? Is there a way to stop the table frenzy?
In my experience (Mac IDE), once I finish putting all of the information in (or the placeholders a number
, etc.) the alignment fixes itself. I’m guessing it’s the IDE trying to figure out what you’re doing. I’m not sure how to stop it from happening>
Yeah, I think it’s often longer text in the entries messing up the spacing, and unless you have a very wide display it can lead to the columns looking very odd. So long as you get the tabs in the right place it shouldn’t matter, though (and you can drag the code-editing frame so it’s wider to double-check).
You should be able to go to preferences and adjust the visual spacing between tabs. As Hidnook states, as you’re entering code the tab-gaps will adjust based on your screen size, font size, and the tab setting since Inform 7 tries in real time to align the tabs, but if you type a long entry it may start wrapping and allow the tabs to adjust.
(OSX preferences on Mac showing tab width interface)
I tried making a table, and notice the tabs kind of keep up with alignment, but then if I click away and continue the table it forgets the alignment visually and tabs as though for a rule instead of a table - since I’ve not been typing a continuous table. But it knows where the tabs are. If I start a new line sometimes or if I go to preferences and adjust the width everything snaps together.
I believe you just have to trust your tabbing and realize while you’re entering data it may be crazy but will line itself back up. If you keep the prefs screen open you can twiddle the tab-width to reset and sort everything together again. I think you just have to trigger it to re-flow the table from the start.
I think when you create a table, then move elsewhere, then come back to add to the same table it doesn’t yet know what table you’re appending and how it adjusted previously and it starts with your default tab width, but they will reflow back together and display correctly if something changes with the entire text.
It doesn’t solve the tab fussiness, but I find it helpful to insert a spacer (an empty comment) between rows when things get messy, i.e, rows taking up more than one line in the IDE
table of bogus information
text1 text2 text3
[]
"a placeholder" "a placeholder" "a placeholder"
[]
"another placeholder" "another placeholder" "another placeholder"
This advice is very useful indeed.
Thanks. I forgot about the Preferences screen. I turned off auto-indent to see how that will work.
I will try the spacer line. It sounds like a helpful hint.
OK. I think that might help, but now the problem comes to spacing in the output.
How do I get the columns to line up in the player’s view? Here’s what I get now:
Hard to read and unwieldy at best.
I’m not aware of any natural language method for laying out text on screen in Inform 10 beyond line breaks, though someone else may know better. In previous versions, there were some extensions that could manipulate layout to some extent, but I’ve only ever worked in 10 so I don’t know what those capabilities are.
If there is a way to do tab stops, I’ve never heard about it and would like to know myself.
You can’t use tab stops. First use fixed width type: [fixed letter spacing]
.
Then you have to calculate the length of each field and add spaces manually to pad them out.