A warning will be written to stderr when this happens. The user can provide -e/--preserve-escapes to disable the behavior.
Use -e0/--preserve-escapes=0 to suppress the warning.
Having an initial title that is different from what the user will see makes it harder for them to change the key equivalent, since they most know what this initial title is.
For more info see http://lists.macromates.com/textmate/2014-January/036949.html
When opening a folder we test against the ‘projectPath’ property (on already open window controllers), but this is not setup until we have an open document, and documents are opened using a background queue, so code running in the same event loop cycle as the session restore, will not get the proper value for this property.
The problem this fixes is: open /path/to/foo and quit TextMate. Now drag /path/to/foo to TextMate’s app icon. TextMate would first restore session (which includes /path/to/foo) and then open /path/to/foo (not seeing the restored folder as being /path/to/foo due to the uninitialized ‘projectPath’ property).
None of our layouts rely on the buttons not hugging their content, so we set the hugging priority so that we do not have to worry about wether or not the constraints capture this requirement.
Curiously, if only the hugging priority is set (to high) for the horizontal orientation then the find dialog can end up with an undesired layout, although all constraints are met.
Triggering a content reload will update the ‘enabled’ state of our buttons. These will be disabled if we have no actions set.
Of course the API should be so that the ‘enabled’ state is also updated when setting the actions, but I am being lazy here.
Since the menu item’s title can change (e.g. Word or Selection) and multiple menu items can have the same title (e.g. Tab Size » 4, Toggle Foldings at Level » 4) we store the menu item’s action + tag for the abbreviation.
Previously we would use highlight color if the table view was first responder. Now we use the highlight color if the cell’s background is set to NSBackgroundStyleDark, which then works when we use the cell in a table view which “shares focus” with a text or key equivalent field.
This is relevant when there is no filter string, as we then show a regular NSString which does not have an associated line break mode (unlike a string with marked up ranges).
These methods were deprecated in 10.7. Use `convertRectToScreen:` and `convertRectFromScreen:` instead. This is required for proper high resolution support.
These methods were deprecated in 10.7 and log warnings in the console when called. The documentation says to use `convertPointToBacking:` and `convertPointFromBacking:`, respectively, instead; however, these methods should not really be used in this case. We just want to store the top left position (point) of the OakChoiceMenu's frame in the OakDocumentView's coordinate systems so we can update its frame to the new position when OakDocumentView's bounds change. We do not need exact pixel alignment. The original choice to use the above deprecated methods was probably based on the use of `convertBaseToScreen:` and `convertScreenToBase:`, but these were also deprecated in 10.7. They can be replaced with the equivalent `convertRectToScreen:` and `convertRectFromScreen:`, respectively.
So instead, for this case, `convertRect:toView:` and `convertRect:fromView:` suffices and actually yields better tracking. (We could have used the corresponding "point" methods, as well, but we needed to convert the point to a NSRect to use `convertScreenFromRect:`, etc.)
With the original code, when the view bounds change, the position of the OakChoiceMenu would extend well below/above the placement of the caret.
Since we have the ‘drawAsHighlighted’ property it makes sense to make it post the accessibility notification when this property is set to YES and we do not have focus, rather than have the controller which change our selection be responsible for this.
A minor disadvantage is that there are multiple ways to change a table view’s selection. We assume that ‘selectRowIndexes:extend:’ is the canonical way to do it (and all code that wants to trigger VO notifications should use that method).
Originally, the "--ask" option was used in the previous commit window to change the NSTextField above the text view; however, no SCM bundles (in textmate's repos) currently uses it.
Only sources in the ui folder use this code and was previously including it from a parent folder, which breaks the hierarchical ordering of sources: you can include child folders, not ancestors.
The latter has been deprecated since 10.6 but hasn’t given any deprecation warnings (and it’s not like I’m eager to touch the NSTextInput protocol implementation, as I just barely understand how this stuff is supposed to work).
This ensures we get all key events, for example in the bundle item chooser window the pop-up button’s menu would previously see the key down event before the key equivalent view, so enabling recording and pressing ⌘1-3 would not record that key equivalent, but instead activate the corresponding (pop-up) menu item.
If `enableLoopFilterList` is set to `YES`:
- when at top, pressing <Up> selects the last item on bottom
- when at bottom, pressing <Down> selects the first item on top
Only values from the root target goes through this code, so it wasn’t causing a problem, as none of those keys had a multi-element array, but in ruby 2.0 embedding an array in a string seems to use inspect instead of to_s:
Ruby 1.8: "#{['foo']}" #=> foo
Ruby 2.0: "#{['foo']}" #=> ["foo"]