sortSubviewsUsingFunction Question?
sortSubviewsUsingFunction Question?
- Subject: sortSubviewsUsingFunction Question?
- From: Wilhelm Phillips <email@hidden>
- Date: Sun, 17 Oct 2004 14:04:12 -0700
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:
<x-tad-bigger>- (void)sortSubviewsUsingFunction:(int (*)(id, id, void *))compare context:(void *)context</x-tad-bigger>
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:
<x-tad-bigger>[mainView sortSubviewsUsingFunction:([mainView viewWithTag:10],
[mainView viewWithTag:5],
NSOrderedAscending)
context:nil];</x-tad-bigger>
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 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden