RE: Blocking Method Return
RE: Blocking Method Return
- Subject: RE: Blocking Method Return
- From: "Josh Ferguson" <email@hidden>
- Date: Fri, 2 Dec 2005 08:19:20 -0600
- Thread-topic: Blocking Method Return
I'm actually writing a cross-platform library. On the windows side, when
a user calls into a function, that function does not return until all
operations are complete. This is the behavior I'm simulating on the Mac
library. In fact, I've gotten it nearly working except for some event
handling oddities:
Using NSWidnow's nextEventMatchingMask: method, I'm grabbing all events
and simulating a modal window. This modal window contains a WebView that
can display arbitrary content. I'm running into a situation where, when
I click out of my window into another window (outside my app) that can
take keyboard input, I've lost keyboard input permanently. I even get
focus rings around the appropriate text fields and still receive mouse
events, but all keyboard events are sent to the window/app that I
clicked into. How do I make sure that I can regain that focus?
Josh
-----Original Message-----
From: j o a r [
mailto:email@hidden]
Sent: Friday, December 02, 2005 8:01 AM
To: Josh Ferguson
Cc: email@hidden
Subject: Re: Blocking Method Return
On 1 dec 2005, at 20.30, Josh Ferguson wrote:
>
I'm currently writing a library that implements some asynchronous
>
networking code and performs a series of tasks. I want the entrypoint
>
for this library to be synchronous - so that the method doesn't return
>
until all the networking is done.
Why do you need this functionality to be synchronous? To me it seems
like unnecessary complication. You should be able to change your
design ever so slightly, and just wait for the network operations to
complete before continuing.
j o a r
_______________________________________________
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