The patch that I sent earlier is backward compatible:
it will allow just "event" verb in child locale, while
preserving the three existing handlers with the priority:
 - PID_handler
 - PID_CID_event
 - event_CURRENT_   <-- new
 - PID_default

http://www.jsoftware.com/pipermail/general/2008-March/031629.html

Note 1: the event_CURRENT_ is processed only if
"syslocalec" is non-blank AND "event" verb exists.

Note 2: in locating child handler in control locale,
inheritence need to be considered to allow cascaded
handlers. E.g. 
  base-->mouse gesture-->pan/zoom handler-->image viewer.
But I believe it works so already:
   nc<'names'
3
   nc<'names_base_'
3
   nc<'names_z_'
3

> Analogously, if wdhandler is called in a form object locale, would you like 
> the option that wdhandler just call event?

No, that's not feasible and will break existing code.
In particular, form locale should be able to handle
events for multiple form IDs.

In contrast to form locale handler, in control locale 
the control ID and the form ID are known and unique 
for a given instance of control object.

For form locales though, the difference between 
form instance and "static" form locale is only ability 
to create multiple forms simultaneously. Whereas
within the (either type of) locale you still need to
distinguish between form IDs and control IDs.

It was tested successfully with "jsplitter" by applying 
the patch to wdhandler and removing
>   (PID,'_',ID,'_paint')=: paint
>   (PID,'_',ID,'_mbldown')=: mbldown
>   (PID,'_',ID,'_mblup')=: mblup
>   (PID,'_',ID,'_mmove')=: mmove

Similarly it can be done in "jzgrid" and other
controls where setlocale is not even used.


--- Eric Iverson <[EMAIL PROTECTED]> wrote:

> If wdhandler is called in a child object locale, you would like wdhandler to 
> just call event. Makes sense.
> 
> Analogously, if wdhandler is called in a form object locale, would you like 
> the option that wdhandler just call event?
> 
> The point is that PID and CID are probably not needed and indeed are a 
> nuisance if called in an object locale.
> 
> We can't make the change for forms as too much would break. Perhaps a form 
> style could indicate this option. Perhaps a setlocale parameter could select 
> the plain event option. In this case the changes would be to the wd'q' 
> result and not to the wdhandler definition.
> 
> Your point deserves attention. It would be nice if it can be done in a 
> manner that is backwards compatible, is clean in 603, and doesn't require to 
> much messing around with 602.
> 
> ----- Original Message ----- 
> From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
> To: "General forum" <[email protected]>
> Sent: Monday, March 17, 2008 12:28 PM
> Subject: Re: [Jgeneral] wd setlocale
> 
> 
> > Up to calling wdhandler is fine.
> >
> > The problem is in what wdhanlder is calling.
> > It is currently calling verb:
> >  PID_CID_event''
> >
> > So it prevents having generic controls without
> > creating every time the cascade of verbs:
> >  PID_CID_event=: event
> > for each instance.
> >
> > To fix this, wdhandeler should call simply
> >  event''
> > if it exists or proceed as it does right now
> > otherwise.
> >
> >
> > --- Eric Iverson <[EMAIL PROTECTED]> wrote:
> >
> >> I haven't had a chance to study your messages so this is comment may be
> >> completely off base.
> >>
> >> The intent of wd'setlocale' is that wdhandler is called in the desired
> >> locale. In the splitter example this would be in the object locale of the
> >> splitter class. There should be no requirement for wdhandler to look at
> >> syslocalec, just as there is no need for it to look as syslocalep.
> >>
> >> ----- Original Message ----- 
> >> From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
> >> To: "General forum" <[email protected]>
> >> Sent: Friday, March 14, 2008 11:55 PM
> >> Subject: [Jgeneral] wd setlocale
> >>
> >>
> >> > Here's a pattern for "wd setlocale" from jsplitter.ijs:
> >> >
> >> >  (PID,'_',ID,'_paint')=: paint
> >> >  (PID,'_',ID,'_mbldown')=: mbldown
> >> >  (PID,'_',ID,'_mblup')=: mblup
> >> >  (PID,'_',ID,'_mmove')=: mmove
> >> >  HWNDC=: wd 'qhwndc ',ID
> >> >  wd 'setlocale ',ID,' ',>coname''
> >> >
> >> > It seems to beat the raison d'etre of "wd setlocale":
> >> > if it is necessary to create event verbs
> >> > for each control instance, that's no better
> >> > than before--when such event verbs were defined
> >> > in parent form as handlers in control locale:
> >> >
> >> >   (PID,'_',ID,'_mmove')=: ('mmove_',ctl_loc,'_')~
> >> >
> >> > what would be really nice, is if it weren't necessary
> >> > to define event verbs; "wd setlocale" should suffice
> >> > to tell that for such parent and for such child id
> >> > here's the locale (control instance) that would have
> >> > the handelrs in the simple form "mmove" (without "PID_ID_"):
> >> >
> >> >  mmove=: 3 : 0
> >> >    ... do move
> >> >  )
> >> >
> >> > Maybe it's already there and somebody does not
> >> > fully understand something. If it's not there it
> >> > should be easy to realize such logic in the main
> >> > wdhandeler based on the wdq values.
> >> >
> >> >
> >> >
> >> >
> >> > ____________________________________________________________________________________
> >> > Looking for last minute shopping deals?
> >> > Find them fast with Yahoo! Search.
> >> > http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> >> > ----------------------------------------------------------------------
> >> > For information about J forums see http://www.jsoftware.com/forums.htm
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
> >
> >
> > 
> > ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to