[futurebasic] Re: [FB] Down Arrow Keystroke

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2006 : Group Archive : Group : All Groups

From: Ted Spencer <tedspencer@...>
Date: Tue, 5 Sep 2006 14:43:37 -0400
On 5 Sep, 2006, at 10:37 AM, Joseph Smith wrote:

> The FN doXXXXThing does nothing more that to advance to the  
> associated edit field.
> Cases 28,29 and 30 work perfectly...Case 31 doesn't.
>
> I have suspicions that it might be a runtime problem.
>
> Has anyone encountered this problem and if so, how did you fix it?

The folks who know these things might mention that the following  
could be used:

evnt = dialog(0)
id = dialog(evnt)

select evnt//mostly for scooting around in the puzzle
case _eftab
ef ++
if ef > _boxes then ef = 1
edit field ef
case _efShiftTab
ef -= 1
if ef < 0 then ef = _boxes
edit field ef
case _efRightArrow//left, right should stay in row
long if ef mod(9)//if it's not the rightmost box
ef += 1
xelse
ef = ef - 8//if it is rightmost
end if
edit field ef
case _efLeftarrow
long if ef mod(9) = 1//if it's a leftmost box
ef = ef + 8
xelse
ef -= 1
end if
edit field ef
case _efuparrow
ef -= 9
if ef < 1 then ef = ef + _boxes
edit field ef
case _efdownarrow
ef += 9
if ef > _boxes then ef = ef - _boxes
edit field ef
case = _wndRefresh
fn formatWindow1
case = _wndClose
window close 1
windowthere = _false
menu _PuzMenu,_puzNew,_enable
case = _efClick
ef = id
end select

This, above, is obviously from my Sudoku solution, and, as with your  
experience, the down arrow doesn't do what is expected: it seems to  
light up a totally odd field rather than the one at the top of the  
column

Since the thing is only for my consumption, I haven't looked too hard  
for a solution, and haven't got one.
--
Ted Spencer
--
It's much easier to make nations like you than to defend yourself  
against them. (Bono)