当我将<table id="keywords" class="flight_details" align="center"
cellspacing="" cellpadding="20px"
style="border-collapse: separate; border-spacing: 0px 5px;">
<tr style="border:1px;">
<th style="width:15%" align="center"> </th>
<th style="width:15%; text-align:center"> <font color="04BBCD"> Departure ▼ </font></th>
<th style="width:10%; text-align:center" align="center"> <font color="04BBCD"> Arrival ▼ </font></th>
<th style="width:15%; text-align:center" align="center"> <font color="04BBCD"> Duration ▼ </font></th>
<th style="width:25%; text-align:center" align="center"> <font color="04BBCD"> Fare ▼ </font></th>
<th style="width:20%; text-align:center" align="center"> </th>
</tr>
<tr class="flight_tr makeborder">
<td class="leftborder"> <img src="image/clay-img/air france logo.png" style=" width:100px;" /><br /> Flight No. <br />XXXXXXXXXXXXX</td>
<td align="center" style="size:16px;"> 17.45 DEL <hr /> 17.45 DEL</td>
<td align="center" style="size:16px;"> 11.25 LEIP <hr /> 11.25 LEIP </td>
<td align="center" > 19h.50m <br /> <font size="1px;">1stop</font> <hr /> 19h.50m <br /> 1stop </td>
<td align="center" style="size:16px; font-size:16px;"><font color="04BBCD"> INR 36000</font> </td>
<td align="center" style="size:16px;" class="rightborder"> <button type="button" class="btn"> View Details </button><br /> <br />
<button type="button" class="btn"> Add to Cart </button>
</td>
</tr>
<tr class="flight_tr makeborder" >
<td class="leftborder"> <img src="image/clay-img/air france logo.png" style=" width:100px;" /><br /> Flight No. <br />XXXXXXXXXXXXX</td>
<td align="center" style="size:16px;"> 18.45 DEL <hr /> 19.45 DEL</td>
<td align="center" style="size:16px;"> 4.25 LEIP <hr /> 11.25 LEIP </td>
<td align="center" style="size:16px;"> 23h.50m <br /><font size="1px;">1stop</font> <hr /> 16h.50m <br /> 1stop </td>
<td align="center" style="size:16px; font-size:16px; color:04BBCD"><font color="04BBCD"> INR 37000</font> </td>
<td align="center" style="size:16px;" class="rightborder"> <button type="button" class="btn"> View Details </button><br /> <br />
<button type="button" class="btn"> Add to Cart </button>
</td>
</tr>
</table>
绑定到NSTextView
中的NSArrayController
时,撤消工作正常,但每次保存上下文时storyBoard
都会失去焦点。
因此,我将NSTextView
绑定到NSTextView
NSArrayController
:
programatically
现在,它没有放松对保存的关注,但撤消功能已停止为[_noteTextView bind: NSAttributedStringBinding
toObject: _noteArrayController.selection
withKeyPath: @"noteByUser"
options: (@{
NSContinuouslyUpdatesValueBindingOption : @YES,
NSAllowsEditingMultipleValuesSelectionBindingOption : @YES,
NSConditionallySetsEditableBindingOption : @YES,
NSRaisesForNotApplicableKeysBindingOption : @YES })];
工作,NSTextView
中与故事板中mainWindow
绑定的其他视图正确响应撤消命令。< / p>