list field not getting arrowkey msg

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

list field not getting arrowkey msg

pmbrig
I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: "If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down." I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack.

Ideas?

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Mike Bonner
Not sure if this is what you're seeing, but if you are using tab to enter
the next field, then using arrow keys to navigate up and down, it doesn't
work. (6.7.6) When you tab into a list field, the hilite remains, but there
is no selection in the field. IE no insertion point, so the arrow keys
don't work.

I've found that if you select the hilited line as you tab into the field it
solves this problem.

If this is the problem you are seeing, clicking a line in the recalcitrant
field should make the arrow keys start working, because the click selects a
line.

Another direction to solve it would be to catch the arrowkey message in the
field, and if there is a hilite, but no lines selected, select the hilited
line then pass arrowkey. If there are no lines selected, and no hilites,
select and hilite the first line.  If I understand correctly, the second
part should only be necessary if you have toggle hilites turned on.
(because otherwise when you tab into the field, a line is selected.)

I just noticed another interesting thing (Still in 6.7.6)

Selecting "click to toggle" in the inspector puts a checkmark into
mutli-line and non-contiguous (as it should?) but clicking away and coming
back to the object, only click to toggle is still selected.

Oh, and final note on this, if you have multiline non-contiguous selected
you'd have to account for that too.

Check the focused object when the arrow keys aren't working. If the correct
field is focused, check the selectedline to see if there is one. If not,
the arrow keys fail to work.

On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham <[hidden email]> wrote:

> I have a list field in one stack that isn't behaving properly. List fields
> are supposed to allow up and down arrowkeys to move the hilited line. From
> the dictionary: "If a field's listBehavior property is set to true, and the
> user clicks a line, the entire line is highlighted. The Up and Down arrow
> keys move the selection up or down." I have a similar field in another
> stack that works exactly as expected. The two fields both have their
> listbehavior set to true -- in fact, AFAICS all their basic properties are
> the same. I have no arrowkey handlers in any scripts in the misbehaving
> stack.
>
> Ideas?
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

pmbrig
On Jul 19, 2015, at 10:12 AM, Mike Bonner wrote:

> Not sure if this is what you're seeing, but if you are using tab to enter
> the next field, then using arrow keys to navigate up and down, it doesn't
> work. (6.7.6) When you tab into a list field, the hilite remains, but there
> is no selection in the field. IE no insertion point, so the arrow keys
> don't work.

Not using tab to select into the field. Clicking on the line, it gets selected, then arrowkey does nothing.

> I've found that if you select the hilited line as you tab into the field it
> solves this problem.
>
> If this is the problem you are seeing, clicking a line in the recalcitrant
> field should make the arrow keys start working, because the click selects a
> line.
>
> Another direction to solve it would be to catch the arrowkey message in the
> field, and if there is a hilite, but no lines selected, select the hilited
> line then pass arrowkey. If there are no lines selected, and no hilites,
> select and hilite the first line.  If I understand correctly, the second
> part should only be necessary if you have toggle hilites turned on.
> (because otherwise when you tab into the field, a line is selected.)

There is a line selected. If I put the following into the field script:

on arrowkey
   put the hilitedlines
end arrowkey

then click in the field to select a line, then hit up- or down-arrowkey, nothing happens. The field is apparently not getting the arrowkey message. It's acting as though the traversalon of the field is false, but it's not.

> I just noticed another interesting thing (Still in 6.7.6)
>
> Selecting "click to toggle" in the inspector puts a checkmark into
> mutli-line and non-contiguous (as it should?) but clicking away and coming
> back to the object, only click to toggle is still selected.

toggleHilites, mulitpleHilite, and noncontiguousHilites are all false.

> Oh, and final note on this, if you have multiline non-contiguous selected
> you'd have to account for that too.
>
> Check the focused object when the arrow keys aren't working. If the correct
> field is focused, check the selectedline to see if there is one. If not,
> the arrow keys fail to work.

if I put this into the card script:

on arrowkey what
   put the short name of the focusedobject
   pass arrowkey
end arrowkey

then click on a line in the list field, then hit up-arrowkey, I get

card id 1002

???

Having found that the focus is on the card, for reasons best known to the engine (certainly not to me), I have a workaround, by putting an "on arrowkey" handler into the card script and then hiliting the next/prev line of the field and duplicating the relevant portion of the field mouseUp handler in the card script -- but I don't know why I should have to do that. Why isn't the field getting the arrowkey message after I click on a line in the field??? That works fine in my other stack, with the list field having the same properties.

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig


> On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham <[hidden email]> wrote:
>
>> I have a list field in one stack that isn't behaving properly. List fields
>> are supposed to allow up and down arrowkeys to move the hilited line. From
>> the dictionary: "If a field's listBehavior property is set to true, and the
>> user clicks a line, the entire line is highlighted. The Up and Down arrow
>> keys move the selection up or down." I have a similar field in another
>> stack that works exactly as expected. The two fields both have their
>> listbehavior set to true -- in fact, AFAICS all their basic properties are
>> the same. I have no arrowkey handlers in any scripts in the misbehaving
>> stack.
>>
>> Ideas?
>>
>> -- Peter
>>
>> Peter M. Brigham
>> [hidden email]
>> http://home.comcast.net/~pmbrig
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Mike Bonner
Strange that its not actually taking focus when you click on it.  As far as
there being a selection, it's weird.  The tab thing I was mentioning
freaked me out. Focusing the object with tab worked (the focusedobject said
what I expected) but the arrow keys wouldn't work.  When checking the
selectedline, there was no selected line.  Actually clicking into the field
would then make the arrow keys work, and the selectedline showed correctly.

Seems to me that tabbing into a field (which correctly focuses on the
field) would let the arrowkeys work but apparently not.

Either way, glad you have a method figured out.

On Sun, Jul 19, 2015 at 9:17 PM, Peter M. Brigham <[hidden email]> wrote:

> On Jul 19, 2015, at 10:12 AM, Mike Bonner wrote:
>
> > Not sure if this is what you're seeing, but if you are using tab to enter
> > the next field, then using arrow keys to navigate up and down, it doesn't
> > work. (6.7.6) When you tab into a list field, the hilite remains, but
> there
> > is no selection in the field. IE no insertion point, so the arrow keys
> > don't work.
>
> Not using tab to select into the field. Clicking on the line, it gets
> selected, then arrowkey does nothing.
>
> > I've found that if you select the hilited line as you tab into the field
> it
> > solves this problem.
> >
> > If this is the problem you are seeing, clicking a line in the
> recalcitrant
> > field should make the arrow keys start working, because the click
> selects a
> > line.
> >
> > Another direction to solve it would be to catch the arrowkey message in
> the
> > field, and if there is a hilite, but no lines selected, select the
> hilited
> > line then pass arrowkey. If there are no lines selected, and no hilites,
> > select and hilite the first line.  If I understand correctly, the second
> > part should only be necessary if you have toggle hilites turned on.
> > (because otherwise when you tab into the field, a line is selected.)
>
> There is a line selected. If I put the following into the field script:
>
> on arrowkey
>    put the hilitedlines
> end arrowkey
>
> then click in the field to select a line, then hit up- or down-arrowkey,
> nothing happens. The field is apparently not getting the arrowkey message.
> It's acting as though the traversalon of the field is false, but it's not.
>
> > I just noticed another interesting thing (Still in 6.7.6)
> >
> > Selecting "click to toggle" in the inspector puts a checkmark into
> > mutli-line and non-contiguous (as it should?) but clicking away and
> coming
> > back to the object, only click to toggle is still selected.
>
> toggleHilites, mulitpleHilite, and noncontiguousHilites are all false.
>
> > Oh, and final note on this, if you have multiline non-contiguous selected
> > you'd have to account for that too.
> >
> > Check the focused object when the arrow keys aren't working. If the
> correct
> > field is focused, check the selectedline to see if there is one. If not,
> > the arrow keys fail to work.
>
> if I put this into the card script:
>
> on arrowkey what
>    put the short name of the focusedobject
>    pass arrowkey
> end arrowkey
>
> then click on a line in the list field, then hit up-arrowkey, I get
>
> card id 1002
>
> ???
>
> Having found that the focus is on the card, for reasons best known to the
> engine (certainly not to me), I have a workaround, by putting an "on
> arrowkey" handler into the card script and then hiliting the next/prev line
> of the field and duplicating the relevant portion of the field mouseUp
> handler in the card script -- but I don't know why I should have to do
> that. Why isn't the field getting the arrowkey message after I click on a
> line in the field??? That works fine in my other stack, with the list field
> having the same properties.
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
>
> > On Sun, Jul 19, 2015 at 7:07 AM, Peter M. Brigham <[hidden email]>
> wrote:
> >
> >> I have a list field in one stack that isn't behaving properly. List
> fields
> >> are supposed to allow up and down arrowkeys to move the hilited line.
> From
> >> the dictionary: "If a field's listBehavior property is set to true, and
> the
> >> user clicks a line, the entire line is highlighted. The Up and Down
> arrow
> >> keys move the selection up or down." I have a similar field in another
> >> stack that works exactly as expected. The two fields both have their
> >> listbehavior set to true -- in fact, AFAICS all their basic properties
> are
> >> the same. I have no arrowkey handlers in any scripts in the misbehaving
> >> stack.
> >>
> >> Ideas?
> >>
> >> -- Peter
> >>
> >> Peter M. Brigham
> >> [hidden email]
> >> http://home.comcast.net/~pmbrig
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

J. Landman Gay
In reply to this post by pmbrig
On 7/19/2015 10:17 PM, Peter M. Brigham wrote:

>
> There is a line selected. If I put the following into the field script:
>
> on arrowkey
>     put the hilitedlines
> end arrowkey
>
> then click in the field to select a line, then hit up- or
> down-arrowkey, nothing happens. The field is apparently not getting the
> arrowkey message. It's acting as though the traversalon of the field is
> false, but it's not.


What do you get if you put this into the field script:

on mouseUp
  put the hilitedlines of me
end mouseUp

BTW, I think your arrowkey test needs "of the target". Hilitedlines
without an object reference is probably always empty.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

pmbrig
Unfortunately, I still get nothing with "the hilitedlines of me" in the
field script. The arrowkey message is not going to the field.

Here's the arrowkey handler in the card script. This works fine but I don't
know why it should be necessary.

on arrowkey what
   put hilitedline of fld "notesList" into lineNbr
   put the number of lines of fld "notesList" into totNbr
   switch what
      case "left"
      case "right"
         pass arrowkey
         break
      case "up"
         if lineNbr = 1 then
            put totNbr into nextLineNbr
         else
            put lineNbr - 1 into nextLineNbr
         end if
         break
      case "down"
         if lineNbr = nextLineNbr then
            put 1 into nextLineNbr
         else
            put lineNbr + 1 into nextLineNbr
         end if
         break
   end switch
   set the hilitedline of fld "notesList" to nextLineNbr
   put line nextLineNbr of fld "notesList" into listEntry
   put getItem(listEntry, 1, tab) into noteTitle
   displayNote noteTitle
   pass arrowkey
end arrowkey

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig


On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay <[hidden email]>
wrote:

> On 7/19/2015 10:17 PM, Peter M. Brigham wrote:
>
>>
>> There is a line selected. If I put the following into the field script:
>>
>> on arrowkey
>>     put the hilitedlines
>> end arrowkey
>>
>> then click in the field to select a line, then hit up- or
>> down-arrowkey, nothing happens. The field is apparently not getting the
>> arrowkey message. It's acting as though the traversalon of the field is
>> false, but it's not.
>>
>
>
> What do you get if you put this into the field script:
>
> on mouseUp
>  put the hilitedlines of me
> end mouseUp
>
> BTW, I think your arrowkey test needs "of the target". Hilitedlines
> without an object reference is probably always empty.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Peter Haworth
It's pretty clear LC doesn't think the list field has focus not sure why
that would be.  Maybe a "focus on me" from the list field's
selectionChanged handler would help?

On Mon, Jul 20, 2015 at 11:48 AM Peter Brigham <[hidden email]> wrote:

> Unfortunately, I still get nothing with "the hilitedlines of me" in the
> field script. The arrowkey message is not going to the field.
>
> Here's the arrowkey handler in the card script. This works fine but I don't
> know why it should be necessary.
>
> on arrowkey what
>    put hilitedline of fld "notesList" into lineNbr
>    put the number of lines of fld "notesList" into totNbr
>    switch what
>       case "left"
>       case "right"
>          pass arrowkey
>          break
>       case "up"
>          if lineNbr = 1 then
>             put totNbr into nextLineNbr
>          else
>             put lineNbr - 1 into nextLineNbr
>          end if
>          break
>       case "down"
>          if lineNbr = nextLineNbr then
>             put 1 into nextLineNbr
>          else
>             put lineNbr + 1 into nextLineNbr
>          end if
>          break
>    end switch
>    set the hilitedline of fld "notesList" to nextLineNbr
>    put line nextLineNbr of fld "notesList" into listEntry
>    put getItem(listEntry, 1, tab) into noteTitle
>    displayNote noteTitle
>    pass arrowkey
> end arrowkey
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
>
> On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay <[hidden email]>
> wrote:
>
> > On 7/19/2015 10:17 PM, Peter M. Brigham wrote:
> >
> >>
> >> There is a line selected. If I put the following into the field script:
> >>
> >> on arrowkey
> >>     put the hilitedlines
> >> end arrowkey
> >>
> >> then click in the field to select a line, then hit up- or
> >> down-arrowkey, nothing happens. The field is apparently not getting the
> >> arrowkey message. It's acting as though the traversalon of the field is
> >> false, but it's not.
> >>
> >
> >
> > What do you get if you put this into the field script:
> >
> > on mouseUp
> >  put the hilitedlines of me
> > end mouseUp
> >
> > BTW, I think your arrowkey test needs "of the target". Hilitedlines
> > without an object reference is probably always empty.
> >
> > --
> > Jacqueline Landman Gay         |     [hidden email]
> > HyperActive Software           |     http://www.hyperactivesw.com
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

J. Landman Gay
In reply to this post by pmbrig
But did you try a mouseUp handler? I'm curious if the field is
recognized in any way.

On 7/20/2015 1:47 PM, Peter Brigham wrote:

> Unfortunately, I still get nothing with "the hilitedlines of me" in the
> field script. The arrowkey message is not going to the field.
>
> Here's the arrowkey handler in the card script. This works fine but I don't
> know why it should be necessary.
>
> on arrowkey what
>     put hilitedline of fld "notesList" into lineNbr
>     put the number of lines of fld "notesList" into totNbr
>     switch what
>        case "left"
>        case "right"
>           pass arrowkey
>           break
>        case "up"
>           if lineNbr = 1 then
>              put totNbr into nextLineNbr
>           else
>              put lineNbr - 1 into nextLineNbr
>           end if
>           break
>        case "down"
>           if lineNbr = nextLineNbr then
>              put 1 into nextLineNbr
>           else
>              put lineNbr + 1 into nextLineNbr
>           end if
>           break
>     end switch
>     set the hilitedline of fld "notesList" to nextLineNbr
>     put line nextLineNbr of fld "notesList" into listEntry
>     put getItem(listEntry, 1, tab) into noteTitle
>     displayNote noteTitle
>     pass arrowkey
> end arrowkey
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
>
> On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay <[hidden email]>
> wrote:
>
>> On 7/19/2015 10:17 PM, Peter M. Brigham wrote:
>>
>>>
>>> There is a line selected. If I put the following into the field script:
>>>
>>> on arrowkey
>>>      put the hilitedlines
>>> end arrowkey
>>>
>>> then click in the field to select a line, then hit up- or
>>> down-arrowkey, nothing happens. The field is apparently not getting the
>>> arrowkey message. It's acting as though the traversalon of the field is
>>> false, but it's not.
>>>
>>
>>
>> What do you get if you put this into the field script:
>>
>> on mouseUp
>>   put the hilitedlines of me
>> end mouseUp
>>
>> BTW, I think your arrowkey test needs "of the target". Hilitedlines
>> without an object reference is probably always empty.
>>
>> --
>> Jacqueline Landman Gay         |     [hidden email]
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Kay C Lan
In reply to this post by pmbrig
On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham <[hidden email]> wrote:

>
> Having found that the focus is on the card, for reasons best known to the
> engine (certainly not to me),
>

What does the Message Watcher say? If on clicking on a line in the fld
fires a salvo of messages, somewhere - frontscript, backscript, card or
stack script a handler is being fired that sends the focus elsewhere;
apparently the card.

Do a global script search for 'go', 'send', 'select' and 'focus'. There are
probably other ways to remove the focus but those come readily to mind.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

pmbrig
In reply to this post by J. Landman Gay
I *have* a mouseup handler in the field, and it works fine.

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig


On Jul 20, 2015, at 3:14 PM, J. Landman Gay wrote:

> But did you try a mouseUp handler? I'm curious if the field is recognized in any way.
>
> On 7/20/2015 1:47 PM, Peter Brigham wrote:
>> Unfortunately, I still get nothing with "the hilitedlines of me" in the
>> field script. The arrowkey message is not going to the field.
>>
>> Here's the arrowkey handler in the card script. This works fine but I don't
>> know why it should be necessary.
>>
>> on arrowkey what
>>    put hilitedline of fld "notesList" into lineNbr
>>    put the number of lines of fld "notesList" into totNbr
>>    switch what
>>       case "left"
>>       case "right"
>>          pass arrowkey
>>          break
>>       case "up"
>>          if lineNbr = 1 then
>>             put totNbr into nextLineNbr
>>          else
>>             put lineNbr - 1 into nextLineNbr
>>          end if
>>          break
>>       case "down"
>>          if lineNbr = nextLineNbr then
>>             put 1 into nextLineNbr
>>          else
>>             put lineNbr + 1 into nextLineNbr
>>          end if
>>          break
>>    end switch
>>    set the hilitedline of fld "notesList" to nextLineNbr
>>    put line nextLineNbr of fld "notesList" into listEntry
>>    put getItem(listEntry, 1, tab) into noteTitle
>>    displayNote noteTitle
>>    pass arrowkey
>> end arrowkey
>>
>> -- Peter
>>
>> Peter M. Brigham
>> [hidden email]
>> http://home.comcast.net/~pmbrig
>>
>>
>> On Mon, Jul 20, 2015 at 2:14 PM, J. Landman Gay <[hidden email]>
>> wrote:
>>
>>> On 7/19/2015 10:17 PM, Peter M. Brigham wrote:
>>>
>>>>
>>>> There is a line selected. If I put the following into the field script:
>>>>
>>>> on arrowkey
>>>>     put the hilitedlines
>>>> end arrowkey
>>>>
>>>> then click in the field to select a line, then hit up- or
>>>> down-arrowkey, nothing happens. The field is apparently not getting the
>>>> arrowkey message. It's acting as though the traversalon of the field is
>>>> false, but it's not.
>>>>
>>>
>>>
>>> What do you get if you put this into the field script:
>>>
>>> on mouseUp
>>>  put the hilitedlines of me
>>> end mouseUp
>>>
>>> BTW, I think your arrowkey test needs "of the target". Hilitedlines
>>> without an object reference is probably always empty.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

pmbrig
In reply to this post by Kay C Lan
On Jul 21, 2015, at 2:07 AM, Kay C Lan wrote:

> On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham <[hidden email]> wrote:
>
>>
>> Having found that the focus is on the card, for reasons best known to the
>> engine (certainly not to me),
>>
>
> What does the Message Watcher say? If on clicking on a line in the fld
> fires a salvo of messages, somewhere - frontscript, backscript, card or
> stack script a handler is being fired that sends the focus elsewhere;
> apparently the card.
>
> Do a global script search for 'go', 'send', 'select' and 'focus'. There are
> probably other ways to remove the focus but those come readily to mind.

I don't see anything in my mouseup script that would change the focus:

on mouseup tBtn
   select empty
   -- putting "focus on me" here doesn't fix the problem
   put getGridCell() into g -- doesn't go to or select anything
   put item 1 of g into lineNbr
   put item 2 of g into colNbr
   if lineNbr = empty then
      exit mouseup
   else
      set the hilitedline of me to lineNbr
      -- this should put the focus in the field
   end if
   put line lineNbr of me into listEntry
   put getItem(listEntry, 1, tab) into noteTitle
   -- doesn't go to or select anything
   displayNote noteTitle
   -- fetches a customprop and puts it into the display field
   -- but this shouldn't move the focus
   -- putting "focus on me" here doesn't fix the problem
   if tBtn <> 3 then exit mouseup
   put popChoose("rename","delete") into u
   switch u
      case "rename"
         renameNote noteTitle
         break
      case "delete"
         answer "Are you sure you want to delete this note? This is not undo-able!" with "OK" or "whoops!" \
               as sheet
         if it is not "OK" then exit to top
         deleteNote lineNbr, noteTitle
         break
   end switch
end mouseup

I'll take a look at the messagewatcher when I get a chance.

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Bob Sneidar-2
In reply to this post by pmbrig
I ran into this and just worked around it.

Bob S


> On Jul 19, 2015, at 06:07 , Peter M. Brigham <[hidden email]> wrote:
>
> I have a list field in one stack that isn't behaving properly. List fields are supposed to allow up and down arrowkeys to move the hilited line. From the dictionary: "If a field's listBehavior property is set to true, and the user clicks a line, the entire line is highlighted. The Up and Down arrow keys move the selection up or down." I have a similar field in another stack that works exactly as expected. The two fields both have their listbehavior set to true -- in fact, AFAICS all their basic properties are the same. I have no arrowkey handlers in any scripts in the misbehaving stack.
>
> Ideas?
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Mike Bonner
In reply to this post by pmbrig
Having a line hilited isn't enough.  It seems you MUST have an insertion
point of some type.  Either select the line lineNbr, or if there is nothing
selected, set the selectedchunk to char 1 to 0 of me


On Tue, Jul 21, 2015 at 8:38 AM, Peter M. Brigham <[hidden email]> wrote:

> On Jul 21, 2015, at 2:07 AM, Kay C Lan wrote:
>
> > On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham <[hidden email]>
> wrote:
> >
> >>
> >> Having found that the focus is on the card, for reasons best known to
> the
> >> engine (certainly not to me),
> >>
> >
> > What does the Message Watcher say? If on clicking on a line in the fld
> > fires a salvo of messages, somewhere - frontscript, backscript, card or
> > stack script a handler is being fired that sends the focus elsewhere;
> > apparently the card.
> >
> > Do a global script search for 'go', 'send', 'select' and 'focus'. There
> are
> > probably other ways to remove the focus but those come readily to mind.
>
> I don't see anything in my mouseup script that would change the focus:
>
> on mouseup tBtn
>    select empty
>    -- putting "focus on me" here doesn't fix the problem
>    put getGridCell() into g -- doesn't go to or select anything
>    put item 1 of g into lineNbr
>    put item 2 of g into colNbr
>    if lineNbr = empty then
>       exit mouseup
>    else
>       set the hilitedline of me to lineNbr
>       -- this should put the focus in the field
>    end if
>    put line lineNbr of me into listEntry
>    put getItem(listEntry, 1, tab) into noteTitle
>    -- doesn't go to or select anything
>    displayNote noteTitle
>    -- fetches a customprop and puts it into the display field
>    -- but this shouldn't move the focus
>    -- putting "focus on me" here doesn't fix the problem
>    if tBtn <> 3 then exit mouseup
>    put popChoose("rename","delete") into u
>    switch u
>       case "rename"
>          renameNote noteTitle
>          break
>       case "delete"
>          answer "Are you sure you want to delete this note? This is not
> undo-able!" with "OK" or "whoops!" \
>                as sheet
>          if it is not "OK" then exit to top
>          deleteNote lineNbr, noteTitle
>          break
>    end switch
> end mouseup
>
> I'll take a look at the messagewatcher when I get a chance.
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Dr. Hawkins
In reply to this post by pmbrig
Foolish question, but have you tried creating a new field from scratch,
pasting the script, and seeing if that works?

I've had to do that a couple for times when some exotic and non-displayed
property or another got set.

--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

pmbrig
In reply to this post by Mike Bonner
When I add
      select line lineNbr of me
or
      select before line lineNbr of me
right after
      set the hilitedline of me to lineNbr
in my mouseup handler, it makes no difference. Arrowkeys up and down still do nothing. Not sure what you mean when you say that an insertion point of some type is necessary, since this is a field with listbehavior = true and it never has an insertion point, just a hilitedline.

And, I repeat, I have an equivalent list field in another stack with the same properties that works fine with the arrowkeys to change the hilitedline with no "select line x" or other work-around needed, ie, it works the way list fields are supposed to work: just click on the field to hilite a line, then arrowkey up or down to change the hilitedline.

Still a mystery. I may need to delete the field and replace it with a copy of my working field from the other stack, then alter the script to work in the problematic stack.

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig


On Jul 21, 2015, at 10:56 AM, Mike Bonner wrote:

> Having a line hilited isn't enough.  It seems you MUST have an insertion
> point of some type.  Either select the line lineNbr, or if there is nothing
> selected, set the selectedchunk to char 1 to 0 of me
>
>
> On Tue, Jul 21, 2015 at 8:38 AM, Peter M. Brigham <[hidden email]> wrote:
>
>> On Jul 21, 2015, at 2:07 AM, Kay C Lan wrote:
>>
>>> On Mon, Jul 20, 2015 at 11:17 AM, Peter M. Brigham <[hidden email]>
>> wrote:
>>>
>>>>
>>>> Having found that the focus is on the card, for reasons best known to
>> the
>>>> engine (certainly not to me),
>>>>
>>>
>>> What does the Message Watcher say? If on clicking on a line in the fld
>>> fires a salvo of messages, somewhere - frontscript, backscript, card or
>>> stack script a handler is being fired that sends the focus elsewhere;
>>> apparently the card.
>>>
>>> Do a global script search for 'go', 'send', 'select' and 'focus'. There
>> are
>>> probably other ways to remove the focus but those come readily to mind.
>>
>> I don't see anything in my mouseup script that would change the focus:
>>
>> on mouseup tBtn
>>   select empty
>>   -- putting "focus on me" here doesn't fix the problem
>>   put getGridCell() into g -- doesn't go to or select anything
>>   put item 1 of g into lineNbr
>>   put item 2 of g into colNbr
>>   if lineNbr = empty then
>>      exit mouseup
>>   else
>>      set the hilitedline of me to lineNbr
>>      -- this should put the focus in the field
>>   end if
>>   put line lineNbr of me into listEntry
>>   put getItem(listEntry, 1, tab) into noteTitle
>>   -- doesn't go to or select anything
>>   displayNote noteTitle
>>   -- fetches a customprop and puts it into the display field
>>   -- but this shouldn't move the focus
>>   -- putting "focus on me" here doesn't fix the problem
>>   if tBtn <> 3 then exit mouseup
>>   put popChoose("rename","delete") into u
>>   switch u
>>      case "rename"
>>         renameNote noteTitle
>>         break
>>      case "delete"
>>         answer "Are you sure you want to delete this note? This is not
>> undo-able!" with "OK" or "whoops!" \
>>               as sheet
>>         if it is not "OK" then exit to top
>>         deleteNote lineNbr, noteTitle
>>         break
>>   end switch
>> end mouseup
>>
>> I'll take a look at the messagewatcher when I get a chance.
>>
>> -- Peter
>>
>> Peter M. Brigham
>> [hidden email]
>> http://home.comcast.net/~pmbrig
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

pmbrig
In reply to this post by Dr. Hawkins
That's my next step.

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig

On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote:

> Foolish question, but have you tried creating a new field from scratch,
> pasting the script, and seeing if that works?
>
> I've had to do that a couple for times when some exotic and non-displayed
> property or another got set.
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Mike Bonner
What I mean is.. When I use tab to change focus between fields, the arrow
keys do nothing in the field I tabbed into.
When I click and select a line in the field, then the arrow keys work.  In
the former, the focusedobject correctly shows the field in question, but
has no selectedchunk.  In the latter, the focus is correct, but the
seletedchunk reflects the line clicked.

Remove the "select empty" from the top of your handler and it should work.
Just tried it here.

On Tue, Jul 21, 2015 at 10:26 AM, Peter M. Brigham <[hidden email]> wrote:

> That's my next step.
>
> -- Peter
>
> Peter M. Brigham
> [hidden email]
> http://home.comcast.net/~pmbrig
>
> On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote:
>
> > Foolish question, but have you tried creating a new field from scratch,
> > pasting the script, and seeing if that works?
> >
> > I've had to do that a couple for times when some exotic and non-displayed
> > property or another got set.
> >
> > --
> > Dr. Richard E. Hawkins, Esq.
> > (702) 508-8462
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Mike Bonner
Hey, in fact, the easiest test I can find to prove this is..
put a mouseup handler in a field with ONLY select empty.
Then try it.  Boom, no arrow keys.

On Tue, Jul 21, 2015 at 10:44 AM, Mike Bonner <[hidden email]> wrote:

> What I mean is.. When I use tab to change focus between fields, the arrow
> keys do nothing in the field I tabbed into.
> When I click and select a line in the field, then the arrow keys work.  In
> the former, the focusedobject correctly shows the field in question, but
> has no selectedchunk.  In the latter, the focus is correct, but the
> seletedchunk reflects the line clicked.
>
> Remove the "select empty" from the top of your handler and it should
> work.  Just tried it here.
>
> On Tue, Jul 21, 2015 at 10:26 AM, Peter M. Brigham <[hidden email]>
> wrote:
>
>> That's my next step.
>>
>> -- Peter
>>
>> Peter M. Brigham
>> [hidden email]
>> http://home.comcast.net/~pmbrig
>>
>> On Jul 21, 2015, at 11:26 AM, Dr. Hawkins wrote:
>>
>> > Foolish question, but have you tried creating a new field from scratch,
>> > pasting the script, and seeing if that works?
>> >
>> > I've had to do that a couple for times when some exotic and
>> non-displayed
>> > property or another got set.
>> >
>> > --
>> > Dr. Richard E. Hawkins, Esq.
>> > (702) 508-8462
>> > _______________________________________________
>> > use-livecode mailing list
>> > [hidden email]
>> > Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

Richard Gaskin
In reply to this post by Mike Bonner
Mike Bonner wrote:
 > What I mean is.. When I use tab to change focus between fields, the
 > arrow keys do nothing in the field I tabbed into.
 > When I click and select a line in the field, then the arrow keys
 > work.  In the former, the focusedobject correctly shows the field in
 > question, but has no selectedchunk.  In the latter, the focus is
 > correct, but the seletedchunk reflects the line clicked.

I've seen this myself.  I thought there was a bug report against that,
but I couldn't find it this morning.  Anyone know if that's been
submitted?  If not, would you like to submit that, Mike?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: list field not getting arrowkey msg

J. Landman Gay
In reply to this post by pmbrig
On July 21, 2015 9:38:11 AM CDT, "Peter M. Brigham" <[hidden email]> wrote:
>I don't see anything in my mouseup script that would change the focus:
>
>on mouseup tBtn
>   select empty
>   -- putting "focus on me" here doesn't fix the problem

As a test, remove the "select empty"  line and see what happens. It might at least narrow down the problem.
--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12