Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to close all open windows except for a few "special ones"?



on Wed, 28 Jun 2006 01:54:52 , Stephen Kay <email@hidden> wrote:

> Well, I'm not sure, but if you get a pointer to the window list, and then
> while you're traversing it you start closing windows, would this mess with
> the window list?
> 
> Anyway, my question was a bit stupid, it turns out, I haven't been in there
> doing WindowList related things for awhile, and I sort of forgot I could
> just walk the Window List and then test each window. I was locked into the
> mindset of bringing each window to the front in a loop. Sorry about that.

Indeed, vector looks like unnecessary entity here. Pseudo code:

window = GetFrontWindowOfClass(windowClass, mustBeVisible);
while (window) {
    next = GetNextWindowOfClass(window, wndowClass, mustBeVisible);
    GetWindowProperty(window, ...);
    if this window requires closing - close it.
    window = next;
}

Mike


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: How to close all open windows except for a few "special ones"? (From: Stephen Kay <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.