RE: Is this a bug I see before my eyes?

"Nenad Stefanovic" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <001201cb18a6$86980aa0$93c81fe0$@com>
Well, I still remember why I wrote it that way :-)

 

Form the experience with MFC - people would too much stuff in OnIdle and
spin it too often, which would result in sluggish apps. Default
implementation in WTL doesn't allow idle processing to continue to prevent
that. If you want to be able to continue idle processing, you can create
your own Module class, and override OnIdle with implementation which takes
return value into account.

 

Cheers,

Nenad

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Rob
Marsden
Sent: Wednesday, June 30, 2010 11:52 PM
To: [email protected]
Subject: Re: [wtl] Is this a bug I see before my eyes?

 

  

> 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





[Non-text portions of this message have been removed]



------------------------------------

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.