That's exactly what I do. On Tue, Oct 3, 2017 at 8:33 PM, Timothy Penner via 4D_Tech < 4d_tech@lists.4d.com> wrote:
> Hi Tom, > > > Could you please explain a bit further how you get from attributes to > event callbacks? Do you capture an event on the SVG area and scan all its > element attributes? > > I am just guessing here but check out this command: > > SVG Find element ID by coordinates > http://livedoc.4d.com/4Dv15.4/help/Command/en/page1054.html > > The description of this command talks about using the On Clicked event of > the object to get the mouse coordinates and then then using the X Y > coordinates of the mouse location with the SVG Find element ID by > coordinates to find out what is beneath the mouse during the click event. > > You should then have the ID of the element that was clicked on. > > If you had set a custom attribute for that element using SVG SET ATTRIBUTE > you could then use SVG GET ATTRIBUTE to obtain that custom attribute, then, > assuming it is a method name, you could use the EXECUTE METHOD command to > execute it. > > This is just one approach. > > Another approach could be to use a case statement for the elements that > you know may be clicked on, with each action defined within the case > statements. > > There could be other approaches to. > > -Tim > > > > > > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** > -- Jim Dorrance jim.dorra...@gmail.com 4...@dorrance.eu www.4d.dorrance.eu PS: If you know of anyone that needs an experienced 4D programmer to add energy and experience to their team, please let me know. I have experience in many areas. Reasonable rates. Remote or Paris only. ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************