Skip navigation.
 
mlsortSubviewsUsingFunction Question?
FROM : Wilhelm Phillips
DATE : Sun Oct 17 23:04:12 2004

Hi,

I have a NSView with some overlapping subviews and want to order them
as desired.  Reading through the mailing list archives suggested that
the following method would help do just such a thing:

- (void)sortSubviewsUsingFunction:(int (*)(id, id, void *))compare
context:(void *)context

However, I have not been able to implement this correctly.  I added
tags to the two subviews that need to be ordered.  Here is how my code
looks:


[mainView sortSubviewsUsingFunction:([mainView viewWithTag:10],
                                    [mainView viewWithTag:5],
                                    NSOrderedAscending)
                                    context:nil];

This crashes my application on build.  I've already verified the
existence of the 2 subviews within my mainView.

Any ideas or suggestions?


Thanks,

Will

Related mailsAuthorDate
mlsortSubviewsUsingFunction Question? Wilhelm Phillips Oct 17, 23:04
mlRe: sortSubviewsUsingFunction Question? Louis C. Sacha Oct 18, 09:09
mlRe: sortSubviewsUsingFunction Question? Wilhelm Phillips Oct 18, 20:27
mlRe: sortSubviewsUsingFunction Question? Wilhelm Phillips Oct 18, 20:29