Thanks, Tim. I thought that was probably the case. Jeremy
> On 10 Nov 2019, at 20:22, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote: > > On Nov 10, 2019, at 2:00 PM, Jeremy Roussak wrote: > >> I’d like to have a method set by ON EVENT CALL to live in a component. It >> works, in that the method is called on each event, but the system variables >> Modifiers and KeyCode are undefined so testing for the event itself is >> tricky. >> >> I can get round the absence of Modifiers by using Macintosh control down, >> but I’m not sure how I get the keystroke that triggered the event. >> >> Is it possible? > > No. The variable space for components is separate from the host database. So > the process variables “Modifiers” and “KeyCode” only live in the host and are > not eve defined in the component environment. Only thing you could do is pass > in the values of these variables into a shared method from the component. > > You still have to call ON EVENT CALL from the host, but from that method on > the host it can call a shared component method. Something like this: > > From somewhere in the host you do ON EVENT CALL(“OnEventCallMethod”) > > Host method “OnEventCallMethod” > > ComponentSharedMethod(Modifiers;KeyCode) > > Tim ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************