Re: Is this a bug I see before my eyes?
Mark Grandau <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
I agree it is a divergence from the MFC documentation. But you can easily override as stated in the code. Just cut it from 7.5 if thats what you like. To me it has to do more with style. And as stated here the more correct method would be to use a background thread. Doing anything short of updating a few UI state (and I do mean a few) in the OnIdle is just bad form. There are all kinds of issues with order of OnIdle() handler calls. I've experienced them. We moved to our own StateChange() that was explicity called where needed. As stated the more perfered programming model most of us would use is the background thread. So I view it as an improvement over MFC. The whole more time thing is overhead few of us would use. Which is keeping with WTL's primary philosiphy of cutting the MFC bloat. My opinion. :) On 6/30/10, Rob Marsden <rob-uNoPq/[email protected]> wrote: >> What's new from http://tech.groups.yahoo.com/group/wtl/message/13288 ? >> cheers, >> AR > > Well exactly :-) that was in v7.5. I'm on v8.1 now. I knew I'd taken the > issue up before, but at my age memory ain't what it used to be. > > I would still a shortcoming, in that it diverges from the MFC. Many of > us use WTL because it does what MFC does, but much better. You come to > rely on like for like at the functional level. I would suggest that > something like: > > // override to change idle processing > virtual BOOL OnIdle(int /* nIdleCount */) > { BOOL bIdle = false; > for(int i = 0; i < m_aIdleHandler.GetSize(); i++) > { > CIdleHandler* pIdleHandler = m_aIdleHandler[i]; > if (pIdleHandler != NULL) > bIdle |= pIdleHandler->OnIdle() != 0; > } > return(bIdle); // don't continue > } > Would provide a better solution from the point of compatability, even > better if I've had the time to implement 'nIdleCount'. > > Unfortunately bjarke's suggestion 4 years ago, of a worker thread, isn't > open to us, for historical reason. > > > -- > Rob Marsden > Gistix (Northern) Limited > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/