Mercurial > dwindows
comparison mac/dw.m @ 980:94dde9b3dfc0
Ok so we need to set the object to be the right value in this case so it gets removed from the proper view on Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 06 May 2011 06:47:31 +0000 |
parents | f6234f870e81 |
children | 536ec60ee433 |
comparison
equal
deleted
inserted
replaced
979:f6234f870e81 | 980:94dde9b3dfc0 |
---|---|
7249 DWBox *parent = (DWBox *)[object superview]; | 7249 DWBox *parent = (DWBox *)[object superview]; |
7250 | 7250 |
7251 /* Some controls are embedded in scrollviews... | 7251 /* Some controls are embedded in scrollviews... |
7252 * so get the parent of the scrollview in that case. | 7252 * so get the parent of the scrollview in that case. |
7253 */ | 7253 */ |
7254 if([parent isMemberOfClass:[NSScrollView class]]) | 7254 if([object isKindOfClass:[NSTableView class]] && [parent isMemberOfClass:[NSScrollView class]]) |
7255 { | 7255 { |
7256 parent = (DWBox *)[parent superview]; | 7256 object = parent; |
7257 parent = (DWBox *)[object superview]; | |
7257 } | 7258 } |
7258 | 7259 |
7259 if([parent isKindOfClass:[DWBox class]]) | 7260 if([parent isKindOfClass:[DWBox class]]) |
7260 { | 7261 { |
7261 Box *thisbox = [parent box]; | 7262 Box *thisbox = [parent box]; |
7262 int z, index = -1; | 7263 int z, index = -1; |
7263 Item *tmpitem, *thisitem = thisbox->items; | 7264 Item *tmpitem, *thisitem = thisbox->items; |
7264 | 7265 |
7265 [object removeFromSuperview]; | 7266 [object removeFromSuperview]; |
7266 /* Do we need to release? | |
7267 * [object release]; | |
7268 */ | |
7269 | 7267 |
7270 for(z=0;z<thisbox->count;z++) | 7268 for(z=0;z<thisbox->count;z++) |
7271 { | 7269 { |
7272 if(thisitem[z].hwnd == handle) | 7270 if(thisitem[z].hwnd == handle) |
7273 index = z; | 7271 index = z; |