mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-01 22:56:17 +00:00
Fixed: subviews in cib did not receive view(Will/Did)MoveToSuperview:
In Cocoa, viewWillMoveToSuperview: and viewDidMoveToSuperview: are called when views are instantiated from code or from a nib. Previously in Cappuccino, when a view was instantiated from a cib, the _subviews of the view were directly set from the decoded subview array. This short-circuited all of the normal notifications a view receives when added to a superview, including viewWillMoveToSuperview: and viewDidMoveToSuperview:. As a result, some views that override these methods, such as CPSearchField, were not set up correctly when instantiated from a cib. With this commit, subviews instantiated from a cib are manually added to their superview, thus ensuring they go through the same cycle as views instantiated from code, and ensuring that viewWillMoveToSuperview: and viewDidMoveToSuperview: are called. Closes #1699
This commit is contained in:
@@ -623,6 +623,7 @@ var concat = Array.prototype.concat,
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
aFunction([self objectAtIndex:index], index, shouldStopRef);
|
||||
|
||||
if (shouldStop)
|
||||
return;
|
||||
}
|
||||
@@ -648,6 +649,7 @@ var concat = Array.prototype.concat,
|
||||
for (; index !== stop; index += increment)
|
||||
{
|
||||
aFunction([self objectAtIndex:index], index, AT_REF(shouldStop));
|
||||
|
||||
if (shouldStop)
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user