Setting cursor position in Flexible Windows

I’m using Version 15/210811 of Flexible Windows.

When I try to set the cursor position in a text grid, it seems like the row and column get switched.

When I use “set sidewin cursor to row 20 column 1”, it goes to row 1 column 20.

Or do I not understand rows vs. columns?

I had the same experience. The boxed quote code example I posted last month includes:

To my-set (win - a text grid g-window) cursor to row (row - a number) column (col - a number):   
(- glk_window_move_cursor({win}.(+ ref number +), {col} - 1, {row} - 1); -).

The glk spec says:

You can set the cursor position with glk_window_move_cursor().

void glk_window_move_cursor(winid_t win, glui32 xpos, glui32 ypos);

xpos, then ypos, i.e., column then row.

Flexible Windows says:

To set (win - a text grid g-window) cursor to row (row - a number) column (col - a number):
	(-  glk_window_move_cursor({win}.(+ ref number +), {row} - 1, {col} - 1); -).

Row, then column.

I never brought this up 'cause I kept thinking I must be missing something. @Dannii, is this backwards?

Yeah looks like a typo, oops.

1 Like