On Jan 14, 2007, at 10:46 AM, Bernie wrote: > > Brian S wrote: > >> I'm using a userdata pointer to avoid writing multiple bounds- >> changed-handlers for multiple windows. This is efficient and easy >> to maintain. I set once at window build time like: >> >> fn InstallBoundsChangedHandler( window( _wndRef ),@fn >> ResizeSomeWIndow) >> >> There is still a need for separate resize fns, but this limits it >> to only *one* bounds changed handler. > > > Not 100% sure what you're doing so I've probably missed something. Hi Bernie, You didn't miss anything (thank you for being generous). My slightly off-topic comment doesn't specifically address the CEUtil.incl code ( apologies to the list). It was posted only as another example of how a user data pointer might be used. > But, if you want one handler to handle resizing multiple windows, > can't you install a kEventWindowBoundsChanged event on the > application at initialisation, rather than call the installer for > every window? Conceptually I didn't know this was possible (but I believe you,) and have never investigated it. Most of my app uses WNE and not CE. Handlers have been added with new functionality but not retrofitted for old. > > fn CEAddEvent( _kEventClassWindow, _kEventWindowBoundsChanged ) > fn CEInstallEvents( fn GetApplicationEventTarget(), @fn > MyAppHandler, 0 ) Thanks Bernie. I'll add this to my list of things to learn and investigate. Right now my focus is learning how to make tabs work with nibs/IB and specifically how to proceed in the code once the nib is loaded. Setting this up without a nib is clear because all the controls need to be registered, but not as clear with the nib involved. Even though I know how to do it, I don't want to build the tab without the nib since it defeats the goal of keeping all the window elements managed in IB. My plan is to implement CE and NIB windows at the same time (maybe too ambitious but this is my target), so I need to look at your NIB demos and CE demos and put together all the necessary pieces in one demo and test it. Brian S.