>> Personally i would prefer to "chech" data on loading. If a 0 char is
>> detected text-tab will be disabled.
> I hope that by "chech" you meant "cache"? Yes, that would be very nice.
> It seems we need to discuss how will this work. Should we disable
> tab-switching until changes are saved, or we used shared memory for all
> tabs to use?
> BTW, I don't like the idea of disabling, because you cannot copy/paste
> such text. It would be much better to make it read-only.
Ups a typo - i meant "check".
I don't know ATM how to handle. Yes copy/pasting would be good. But the
text will be truncated if you save it back.
Maybe i could handle it as follows:
1) Detect characterset of blob / database
2) Check the data according to the detected characterset (UTF8, ...)
3) If no Line-End-Char (or Word or something) is found
-> Text can edited
-> if the tab gets switched data will be saved to the cache and
restored from it
If a Line-End-Char (or Word or something) is found
-> Text will be read-only
-> Maybe i can show a hint to the user. Because it may be curios if
sometimes text is read-only and sometimes not.
-> if the tab gets switched the data will not saved to the cache -
BTW: "cache" mechanism is already implemented. If you edit text and
switch to binary the binary field will show the edited text.
The current implementation saves and restores the data to/from a
memorystream if you switch the tab.
> - IMHO, if blob subtype is text, it should open "text" tab initially.
> - we should add some UI to make blob field NULL
> I also have some ideas about binary tab:
> - use 2 different colors for columns, so each byte is clearly separated
> from the next one. I have no idea if this would slow down wxSTC - needs
> - in binary mode, rows should not have labels: 1, 2, 3, 4, 5, ..., but
> offset instead: 0, 32, 64, 96, 128, etc.
> - of course, we will need to allow editing - it is BLOB *editor* after
> all. In the meantime, control should have silver/gray color to indicate
> that it is read-only.
Ok, i will change it.
>> Thank you.
> Thank you Andy. Considering this is your first patch, it is very good.
Thank you. Yes, it was my first patch. ;-)
> Anyway, I made a few fixes, tested on Linux/Gtk and commited everything
> to repository so we can all test and comment on it easily.
Great. Thank you.