Bugs (fixed):
* The selected symbols aren't restored with the workspace
Cause: The selected symbols were getting loaded once, in the ctr, before the
list of symbols had been properly initialized. The view automatically
deselects items that aren't in the ItemsSource.
It was a relic of the past. Although different fns are called in the props'
getters ('rgb_color' vs 'argb_color'), both ultimately return the same value.
Bugs (fixed):
* Mini Orderbook crashes immediately when opened
Cause: The (cell) view_factory fn wasn't returning the cell's root
element, and was instead returning the root's child element.
As a result, when the row attempted to add this element to its visual
tree, the following exception was thrown:
System.ArgumentException: Specified Visual is already a child of
another Visual or the root of a CompositionTarget.
Bugs (fixed):
* Startup crash w/ error message: "A callback was made on a garbage
collected delegate of type ApiNativeMethods.raw_pb_callback"
Cause: The callback is only referenced in unmanaged c++. Without references
in managed code, the Garbage Collector deems the delegate eligible for
collection before the callback has finished execution.
Note: The original solution forced a reference in managed code by storing it
in a class-member 'keepalive' dictionary, whose life isn't bound to the
[synchronous] scope of the 'send' method. The callback would then remove
itself from the dictionary in its last line of code. While this reduced the
chance of such an error occurring, occassional crashes persisted
(particularly in low-bandwidth environments). I suspect the frequency at
which garbage-collector threads run is inversely related to the frequency
at which data arrives from the server, as the latter triggers execution of
higher-priority threads.
Steps to repro:
1. Insert a Thread.Sleep statement (1000 ms should be sufficient) after
the call that removes the last reference to the delegate (i.e., make
the thread sleep for a significant amount of time in the callback
AFTER it becomes eligible for garbage collection).
2. Build, run, and observe crash on startup.
Solution: Wrap the callback in another class, and store the wrapper
in the dictionary rather than the callback itself. The reason why this
works isn't totally clear, however its effectiveness has been verified
with the repro (described above).
The [vertical] alignment issue was only noticeable in the pnl settings dialog
(its cell params section is taller than those in other settings dialogs), where
the shorter columns list was center aligned with the taller cell params.
* Put attached props before regular (i.e., not attached) props
* Sort alphabetically, with exceptions for props that are logically
grouped together. For example Width/MinWidth/MaxWidth may be
adjacent, as they are all 'width' props.
* Improves readability
* Adds new lines to make navigating through the tags easier
* Mostly just white space changes
fix add empty lines
fix empty lines (reword commit to 'white space changes')
fix white space