Home » U++ Library support » LineEdit, EditFields, DocEdit » Memory Mapping LineEdit Data
Memory Mapping LineEdit Data [message #58180] |
Wed, 09 March 2022 05:13  |
syntax_
Messages: 3 Registered: March 2022
|
Junior Member |
|
|
Hello UppWorld! Noob here.
I have a simple parent control that manages a LineEdit, MemStream, and my own class MemoryMappedFile (I didn't find FileMapping until later since it is not under Documentation tab, and anyway it appears to be readonly?).
When I load a file I can successfully MemStream::Create, init my MemoryMappedFile, and LineEdit::Load(myMemStream), and there is a successful display of the file's contents.
My problems are:
A) External edits to the file are not displayed in the LineEdit, even with a forced Refresh(), unless I destroy\reopen the file. I'm guessing I could look at the file descriptor's modify times and do this through user interaction notifications, but feels wrong.
B) Edits to the LineEdit control do not appear "linked" in any way to the actual mmapped data, i.e. when I msync (successfully according to checked return code) no data is written to the file.
Is there a better way to go about this? I am mmaping with PROT_READ|PROT_WRITE and MAP_SHARED, I just can't seem to sync up the control to the data..
Thank you.
|
|
|
Goto Forum:
Current Time: Sat May 10 01:19:24 CEST 2025
Total time taken to generate the page: 0.02479 seconds
|