Re: SVG component question
an SVG picture has a "rendering tree", which is the backend of the displayed image. it also has a "dom tree", which is the parsed xml structure in memory. SVG SET ATTRIBUTES with no optional * works on the rendering tree, which is useful if you want to alter the image in a "volatile" way. for example, in the context of an editor, you might want to use this while the use is trying to move, resize, or draw an object. SVG SET ATTRIBUTES with optional * works on the dom tree, as well as the rendering tree, which is useful if you want to alter the image in a way that "sticks". if you keep your own dom reference to periodically recreate the picture with SVG EXPORT TO PICTURE (copy) then you have a third tree, a backend dom tree. in that case you can't use the "4d-text" pseudo svg attribute, you have to work on the xml directly. > 2017/09/06 2:05、Two Way Communications via 4D_Tech <4d_tech@lists.4d.com> > のメール: > > SVG SET ATTRIBUTES($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) does work, > but as soon as I refresh the SVG picture it is gone. ** 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 **
Re: SVG component question
There is a DOM. Lift the hood on SVG and you'll find XML. I missed SVG_GET_ATTRIBUTE until I discovered that DOM GET XML ATTRIBUTE BY NAME works for that. Keith - CDI > On Sep 5, 2017, at 3:03 PM, Two Way Communications via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > > Thanks Keith, I was already afraid of that. > > And yes, if there is a DOM then it is possible to use XML commands. But since > i created the SVG using SVG_New, I assume there is no DOM, but I am not sure > about that. > > > Rudy Mortier > Two Way Communications bvba - > > > >> On 05 Sep 2017, at 19:19, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >> >> I think a 'text' element's text can only be set when it is created, unlike a >> textArea. So the item that needs to be changed will need to be deleted and >> created again. >> >> OTOH, I didn't know about addressing the "4d-text" attribute. Maybe it can >> be better addressed via XML commands? >> >> Keith - CDI >> >>> On Sep 5, 2017, at 12:05 PM, Two Way Communications via 4D_Tech >>> <4d_tech@lists.4d.com> wrote: >>> >>> Hi guys, >>> >>> For the past hour I have been trying to modify the content of a text (NOT >>> textarea) in an SVG document. >>> >>> I use: >>> SVG_SET_ATTRIBUTES ($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) >>> >>> But the text does not get updated. >>> >>> SVG SET ATTRIBUTES($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) does work, >>> but as soon as I refresh the SVG picture it is gone. >>> >>> I can’t find an appropriate command in the SVG component. >>> >>> Am I overlooking something? >>> >>> >>> >>> Kind regards, >>> >>> Rudy Mortier >>> Two Way Communications bvba - >>> >>> >>> >>> ** >>> 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 >>> ** >> >> ** >> 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 >> ** > > ** > 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 > ** ** 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 **
Re: SVG component question
Thanks Keith, I was already afraid of that. And yes, if there is a DOM then it is possible to use XML commands. But since i created the SVG using SVG_New, I assume there is no DOM, but I am not sure about that. Rudy Mortier Two Way Communications bvba - > On 05 Sep 2017, at 19:19, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > I think a 'text' element's text can only be set when it is created, unlike a > textArea. So the item that needs to be changed will need to be deleted and > created again. > > OTOH, I didn't know about addressing the "4d-text" attribute. Maybe it can > be better addressed via XML commands? > > Keith - CDI > >> On Sep 5, 2017, at 12:05 PM, Two Way Communications via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> Hi guys, >> >> For the past hour I have been trying to modify the content of a text (NOT >> textarea) in an SVG document. >> >> I use: >> SVG_SET_ATTRIBUTES ($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) >> >> But the text does not get updated. >> >> SVG SET ATTRIBUTES($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) does work, >> but as soon as I refresh the SVG picture it is gone. >> >> I can’t find an appropriate command in the SVG component. >> >> Am I overlooking something? >> >> >> >> Kind regards, >> >> Rudy Mortier >> Two Way Communications bvba - >> >> >> >> ** >> 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 >> ** > > ** > 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 > ** ** 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 **
Re: SVG component question
I think a 'text' element's text can only be set when it is created, unlike a textArea. So the item that needs to be changed will need to be deleted and created again. OTOH, I didn't know about addressing the "4d-text" attribute. Maybe it can be better addressed via XML commands? Keith - CDI > On Sep 5, 2017, at 12:05 PM, Two Way Communications via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > Hi guys, > > For the past hour I have been trying to modify the content of a text (NOT > textarea) in an SVG document. > > I use: > SVG_SET_ATTRIBUTES ($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) > > But the text does not get updated. > > SVG SET ATTRIBUTES($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) does work, > but as soon as I refresh the SVG picture it is gone. > > I can’t find an appropriate command in the SVG component. > > Am I overlooking something? > > > > Kind regards, > > Rudy Mortier > Two Way Communications bvba - > > > > ** > 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 > ** ** 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 **
SVG component question
Hi guys, For the past hour I have been trying to modify the content of a text (NOT textarea) in an SVG document. I use: SVG_SET_ATTRIBUTES ($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) But the text does not get updated. SVG SET ATTRIBUTES($RPMKlblObjRef;"4d-text";[REAP_Markers]Label) does work, but as soon as I refresh the SVG picture it is gone. I can’t find an appropriate command in the SVG component. Am I overlooking something? Kind regards, Rudy Mortier Two Way Communications bvba - ** 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 **