The short answer is wd has zero knowledge of content in "buffer". This should also hold for most gui libraries. For example the content inside a c# text widget is unrelated to the variable with the same name. Whenever the content of a widget is needed, one has to get the 'value' or 'text' property of that widget (I assumed c# works like vb).
type inisde ide wdhandler and examine the first few lines to see how and why "buffer" are set. Пнд, 29 Ноя 2010, Ian Clark писал(а): > 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 -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
