SimpleHTML datatype and dynamic content loading

Is there a way to change content in SimpleHTML DT (Aeon version or the original one) on the fly ? If I save html content to file and then create a new object with NewDTObject("filename"...) then the object displays html fine. But trying to remove it and adding it back to layout gadget (BOOPSI GUI) makes the software to crash. Trying to create the object without any filename and trying to change the content with DTST_MEMORY doesn't display any changes. Is there a way to force datatypes to use a certain datatype ? I tried to create/obtain a struct Datatype but that didn't help.

But trying to remove it and adding it back to layout gadget (BOOPSI GUI) makes the software to crash.

Removing an object from a layout (through LAYOUT_RemoveChild or the safer LM_REMOVECHILD method) will dispose of the object, so you cannot possibly add it back because it no longer exists. Are you sure your crash is not caused by you adding an object that has already been disposed of?

While it may not be the actual cause of your problem, the datatypes subsystem certainly is outdated. It's a technological reflection of a past world where data and media types were less complex than today's ones.

I didn't expect SimpleHTML being able to display all HTML content. I was trying something as curiosity. Loading jpeg picture into memory and telling jpeg datatype to get it from there it displays the picture fine. I was expecting other datatypes being able to do the same as general feature.

Using the tags DTA_DataType, DTA_GroupID, DTA_SourceType, DTA_SourceAddress and DTA_SourceSize with SetDTAttrs() is incorrect and will not do anything meaningful.

I hope SimpleHTML will support those tags in future. Otherwise it's pretty meaningless. It shouldn't matter who loads the data into memory. (All data have to be loaded into memory before it can be accessed in any case.)

That's illogical. You cannot change the class of an object after the object has been created. You cannot tell a picture class to be a sound or something. If you want to change the type of data you have to dispose the object and create a new one.

The current datatype system is a little bit outdated, because it is (yet) unable to change its contents dynamically (aka the "complexity" of "modern" data that Trixie mentioned. But this is not about complexity, it is much more about pushing "dynamic" content even if the dynamic is not needed for the specific content at all. E.g. the APNG format, which is meant for still images BUT also for animations, in the same context. So, if you have THE ideal software to display still images you´re forced to support animations, too, even if your software is optimized just for still image display. Hence I would call it "artificial complexity" instead, sometimes hidden behind the term "portable").

That´s why you should dispose a finished datatype object and allocate a new one, if you want to change the contents of your datatype object.

@whose
Now I understood a little bit better. I was testing too many things if they could make a difference. Unfortunately adding and removing objects to an already open window has been problematic always. So somebody have to create similar BOOPSI gadget class because they can display dynamic content. But our community is too small to make it worthwhile.