Fix table row inserted/deleted documentation and windows implementation. #515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As I failed to understand the documentation of both
uiTableModelRowInserted()
anduiTableModelRowDeleted()
on when to insert to/delete from the underlying model and when to in/decrease theNumRows()
counter - I decided to do some digging.As it stands the current implementation does not seem to be so sure itself. The windows code is completely broken. The TODOs regarding API clarification and compatability with unix and darwin were never implemented. This patch set fixes all that.
uiTableModelRowInserted()
anduiTableModelRowDeleted()
NumRows()
to reflect the new row count before callinguiTableModelRowInserted()
anduiTableModelRowDeleted()
Strictly API wise speaking only gtk seems to require data insertion into the model before calling
uiTableModelRowInserted()
.With this patch set no implementation actually relies on the value in
NumRows()
.But my reasoning is that both functions are past tense. The operation has already been performed and hence the state of the model should represent that. Otherwise I would consider the function names to be buggy.
Oh and I used the win32 provided macros instead of the SendMessageW((CastARoo*))((FUNCTIONS))