Re: Insertion point problems

2015-06-25 Thread David Epstein
One more try on the second part of my original post. In LC 7.01, Mac Yosemite, I find that the insertion point blinks once when placed by clicking or typing, then disappears. It will also blink once in its most recent position if I click the title bar, but again it disappears. Also, if I type

Re: Insertion point problems

2015-06-25 Thread dfepstein
Thanks to Bernd for the simplest solution to my practical problem. If we "go to" Stack A "the selectedChunk" will mean "the selectedChunk in stack A". But, as he notes, preservation of the prior selection depends on certain conditions (more on this below). One anomaly is that "the selecte

Re: Insertion point problems

2015-06-24 Thread BNig
Just tried with the default button (the blue blinking on on Mac) which has its traversalOn set to true and the script still worked. I seem to remember that Mac and Windows handle traversalOn for buttons differently where on Mac the button does not take the focus from the field. Not sure though. The

Re: Insertion point problems

2015-06-24 Thread BNig
Yes, traversalOn of the button is set to false. Mind you: I have to go to the topStack to get the selectedChunk when no text is selected and only the cursor is blinking. Kind regards Bernd pmbrig wrote > The difference may be that in Bernd's case the traversalon of the button > is > false, whe

Re: Insertion point problems

2015-06-24 Thread Richard Gaskin
J. Landman Gay wrote: > I don't think traversal is the problem here. When I tested, my button > did not have traversalOn set to true (that was the first thing I > checked.) The anomaly is that the selectedChunk works fine if the > selection contains text, it only fails if the selection is a simple

Re: Insertion point problems

2015-06-24 Thread J. Landman Gay
I don't think traversal is the problem here. When I tested, my button did not have traversalOn set to true (that was the first thing I checked.) The anomaly is that the selectedChunk works fine if the selection contains text, it only fails if the selection is a simple insertion point. Both ins

Re: Insertion point problems

2015-06-24 Thread Richard Gaskin
Yes, the traversalOn property is the key here. Only one object can have focus at any given time, so when traversing among controls with the keyboard any field selection will be cleared. But by turning off the traversalOn property for buttons you want to be able to act on text, the focus remai

Re: Insertion point problems

2015-06-24 Thread Peter Brigham
The difference may be that in Bernd's case the traversalon of the button is false, whereas in David's case the traversalon of the button is true, which will void the current selection in the field on mousedown. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Tue, J

Re: Insertion point problems

2015-06-24 Thread Peter Brigham
What I do for this is store the selectedchunk in a customprop or a script local on mouseEnter in the button script that will be doing the pasting. That way if the mousedown removes the current selection you already have the info you need. BTW, if you set the traversalon to false for the button, the

Re: Insertion point problems

2015-06-23 Thread BNig
this works for me from a palette stack for both selected text or blinking cursor on mouseUp put the topStack into tTop go stack tTop put the selectedChunk into tSC if tSC <> "" then -- or whatever paste end if end mouseUp Kind regards Bernd -- View this message in con

Re: Insertion point problems

2015-06-23 Thread Bob Sneidar
On a Mac, I opened two stacks, one with a button, one with a field. I palletized the first stack, then set the insertion point in the field in the second one. Clicking the button in the palletized stack still causes the field on the second stack to lose focus. I don’t think there is a way to c

Re: Insertion point problems

2015-06-23 Thread J. Landman Gay
On 6/23/2015 4:49 PM, dfepst...@comcast.net wrote: I want a menu button in a palette to paste the clipboard's contents to the topStack at the selectedChunk. This works if the selectedChunk actually includes some hilited text ("char 1 to 4..."), but not if the selectedChunk is an insertion point

Re: Insertion point problems

2015-06-23 Thread dfepstein
Thanks to Craig Newman and Bob Sneidar.  Unless I have misunderstood them, which is possible, I think I have not clearly enough explained my problem.    I want a menu button in a palette to paste the clipboard's contents to the topStack at the selectedChunk.  This works if the selectedChunk act

Re: Insertion point problems

2015-06-23 Thread Bob Sneidar
Instead check the focusedObject. If it is a field then you can paste. Bob S > On Jun 22, 2015, at 14:19 , David Epstein wrote: > > 1. With a word selected in field 1 of the topStack, a menu button in a > palette issues a command “Paste”. The handler for this command includes > > set the d

Re: Insertion point problems

2015-06-22 Thread dunbarx
Hi. I don't understand. If you have text selected in the field, what are you doing with the value that the selectedChunk sets into the local variable "it"? You never say where to paste that text. What does this do for you, perhaps with some text selected in a field 1? It "puts", rather than