SVGIconImageList
SVGIconImageList copied to clipboard
AV error after setting SVGText in TSVGIconImage
Got this even though icon was set ok (think I got it one or twice, not sure if IDE issue or not)
Btw, I was trying to set that image again (accidentally in the screenshot above I was trying to set it at my base TStoryItem class instead of at the descendent TImageStoryItem, those are from https://github.com/zoomicon/READCOM_App). I noticed if I set the SVGText to the Glyph object I have there (of TSVGIconImage type) at a descendent frame (say in TAudioStoryItem) upon pressing Save in Delphi for the TFrame file, it clears the SVG from the display (and loses it). Not sure if it's something I'm doing wrong in my base frame constructor, it was working till recently and think it broke (lost the SVG images at descendent frames) upon updating your library from GetIt.
So, have you tried if your TSVGIconImage stores its SVGText state ok when it is used with Frame inheritance (aka set at a descendent frame)?
so if I edit my .fmx of the inherited frame (TAudioStoryItem, descending from TStoryItem) by hand and open it, shows OK, but pressing save again it replaces SVGText with ''. The ancestor (the TStoryItem) has Glyph's SVGText as '' instead (the property editor doesn't seem to be able to set an empty string/file). So load when using frame inheritance works, but save somehow fails (instantly replaces SVGText with '')
inherited AudioStoryItem: TAudioStoryItem
Size.Width = 232.000000000000000000
Size.Height = 204.000000000000000000
OnClick = FrameClick
inherited Glyph: TSVGIconImage
Opacity = 0.300000011920929000
Size.Width = 232.000000000000000000
Size.Height = 204.000000000000000000
SVGText =
''#10'<svg xmln' +
's:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http:' +
'//www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xm' +
'lns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.o' +
'rg/dc/elements/1.1/" id="Layer_1" enable-background="new 0 0 100' +
' 100" xml:space="preserve" viewBox="0 0 100 100" version="1.1" y' +
'="0px" x="0px">'#10'
update: also just noticed that if I save an even deeper descendent frame than the one where I set the SVGText property of the TSVGIconImage that had been inherited from parent frame, it saves ok. It only fails (clears the SVGText) if I press Save in the frame that defined the SVGText (as I said that is a descendent frame of the one where TSVGIconImage component was defined)
If I add by hand in the .fmx file the SVGText it works ok.
Also note before I had that SVGText in the child Multires bitmap and it was saving ok, but after upgrade to new version it lost that data. You may be missing some call to "inherited" if you define persisted content programmatically / on-the-fly
Is this problem also present? I don't use Android apps as extensively as you do, so I can't reproduce the problem...
Not related to Android, but to frame inheritance. You may have forgotten to call inherited if you’ve overriden the persistence calls