The refresh helper uses the document’s undo manager in its destructor. Normally the document would stay open throughout the duration of the scope in which the refresh helper is used, but it might be possible to close the current document from a nested event loop, as spawned e.g. by showing a tool tip, in which case, the document will be closed when we reach the destructor.
Previously if we did something like:
CP_Resources = resources/*
The build file would correctly depend on the ‘resources’ directory, but a change, as in, adding, removing, or renaming a file, in a directory below ‘resources’ (e.g. adding ‘resources/English.lproj/NewWindow.xib’) would not correctly update the build file to include the new resource.
Incase of an empty string CFStringGetBytes() returns 0 which we treated as an error. This caused empty strings to be turned into the NULL_STR placeholder.
If the window hadn’t been loaded yet, we previously had to delay opening the document when changing tab (in code).
Since we now create the window in the initializer, there is no longer need for this.
Since 10% of reported crashes are in synchronizeWindowTitle and seems to be about not having a proper document pointer, I am adding these checks and some debug output — don’t understand how we would get into this situation though.
20% of reported crashes are in launch_tbz which indirectly call oak::c_array. My hunch is that the c_str buffer is overwritten because the std::string which returned it has been disposed, this makes strdup() do a bad allocation / memory read.
This would likely be a race condition (wrt. the c_str buffer) and coincidentally the oak::c_array is called in a thread (when it crashes).
This is so that a global setting for ‘source.ruby’ takes precedence over a local ‘source’ setting.
A minor downside is that a local properties file cannot use scoped settings outside a scope selector section.
It’s not feasible to maintain the old-style xib translations while we work on the UI. We’ll soon move fully to constraint-based layout which should allow translations to be purely string-based.
The main window has now moved fully to constraint based layout which makes it a lot easier to tweak the layout and fixes issue #145.
Presently the option to have HTML output on the right is not supported. It will likely be back with a few other options that have been requested.
The width of file browser and height of HTML output view is always read from defaults rather than restored from previous session. Effectively this results in the same behavior except when there are multiple windows with different sizing of these splits. Unsure if per-window sizes should be brought back.
With auto-layout the tab bar view can simply invalidate its intrinsic size when it should expand/collapse. This is also done if the global user setting for disabling tab bar collapsing is changed.
If e.g. we rename “image.tiff” → “image.png” then the build files are correctly updated to copy “image.png” to the build directory, but until this commit, the old tiff image would stay in the build directory until manually removing it / cleaning the build directory.
The gutter will invalidate its intrinsic size when its width changes which will cause the Cocoa layout engine to update the layout, so no more explicit code to deal with adjusting the gutter’s width.
Likewise, the height of the gutter (not the gutter scroll view) has been setup to match the height of the text view (again, not the containing scroll view). This avoids observing the text view frame and manually updating gutter height to match it.
Ideally I also wanted to include project directory, but since the user’s properties are read after the default ones, and those contain the setup of projectDirectory, this isn’t possible with the current semantics.
There’s a few subtle advantages of going with a view, mostly theoretical (about minimizing refresh rectangles) but switching to constrained based layout should provide minor code simplifications, since our ancestor view won’t have to deal with the gutter divider rectangle.
There’s a few commands which want to read settings from the current theme. So far these have been reading the theme UUID from TextMate’s settings and scanned the disk to find the corresponding property list.
This is pretty bad because theme UUID can be set in different ways, themes can be in arbitrary bundles, and the property lists can be in delta format.
The latter is not solved, though we ensure the variable point to the base theme, incase a delta exist. TextMate could simply write a non-delta version of the theme to TMPDIR and let the variable point to that, so we’re not really limiting ourself by adding this variable.
This is for bundles that need to read TextMate’s preferences file (should only be those using a nib with user defaults bindings for their preferences dialog).