Hyperlinking and Dislocation

Posted by Beale on Thu 11 Aug 2005 03:48 AM — 1 posts, 10,854 views.

#0
For lack of a colourpicker function, I created the following code:

function colourPicker( sCommandHead, sCommandFoot )
  local iCount = 1
  local arrColourList = {"maroon", "lightyellow","honeydew"--[[long colour list here]]}
  for k, v in pairs(arrColourList) do
    world.Hyperlink(sCommandHead .. v .. sCommandFoot, "#", v, v, "", false)
    iCount = iCount + 1
    if iCount == 11 then iCount = 1 world.Note("") end
  end
end


What it should do:
Create a 17x10 grid of "#", each with a link to a variant of a command supplied as sCommandHead and sCommandFoot, containing the colour it is.

What it actually does:
Create a 17x10 grid of "#", each with a link to a variant of a command supplied as sCommandHead and sCommandFoot, containing the colour of the "#" one space to the right, with the right edge not being links, and the empty space to the left being the links to the variant with the left edge's colours.

Bizarre, no? Anyone got any ideas?