Because my code is often rewriting the contents of input fields as a
result of user interactions with other fields, and controls. When this
happens, the end-user frequently finds unanticipated ways to fool it.

IME these instances would arise less often if:
   wd 'set myfield *',newstring
simultaneously performed the equivalent of: myfield=: newstring
...which it doesn't.

I can't really understand why not. Surely no logical purpose is served
by permitting the noun: myfield ever to get out-of-step with what's
showing on the screen?  I'd guess it's just to save processor cycles.
But whatever the reason, it's a bug-farm.

(Of course one can always remember to perform the assignment oneself
religiously after every use of wd 'set...' -which is what I find I'm
having to do.)

Moreover I disagree that "It would be unusual to require the value of
a control before an event occurs." Or else I frequently need to do
"unusual" things. Like requiring to know what's actually showing in a
given edit field (which can get there from a variety of causes) in
order to handle some event correctly. As with the app I'm coding now.

Ian


On Mon, Nov 29, 2010 at 4:50 AM, chris burke <[email protected]> wrote:
> On Mon, Nov 29, 2010 at 7:33 AM, Ian Clark <[email protected]> wrote:
>> Is there a system verb I can call which simulates a button event? Or a
>> call I can make from my code to post a keyDown or mouseclick event?
>>
>> I've often met the need to do this, but most recently as one possible
>> solution to the following problem:
>
> ...
>
> Just curious - why do you often feel the need to do this?
>
> Typically, your program will respond to events, and these trigger read
> of the controls. It would be unusual to require the value of a control
> before an event occurs.
>
> Chris
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to