Quantcast

iPhone: no inner event loops

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

iPhone: no inner event loops

Stefan Csomor
Hi

the iPhone does not have offically supported ways to run an inner event loop
- and if you do a CFRunLoop on your own, important events outside of your
app may go unnoticed, therefore iPhone apps can not have things like
ShowModal, what is the best way for expressing this in our sources,
configure etc. wxUSE_EVENT_LOOPS which would be true for all others and
false for iPhone, and things like ShowModal would then be bracketed by this
?

Thanks,

Stefan

The way to do modal alerts btw is to use our ShowWindowModal API which
avoids the nested event loops problem

_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: iPhone: no inner event loops

Vadim Zeitlin-4
On Sun, 17 May 2009 08:17:17 +0200 Stefan Csomor <[hidden email]> wrote:

SC> the iPhone does not have offically supported ways to run an inner event loop
SC> - and if you do a CFRunLoop on your own, important events outside of your
SC> app may go unnoticed, therefore iPhone apps can not have things like
SC> ShowModal,

 I don't see why: iPhone UI _is_ modal, e.g. typically when you switch to
the next screen you can't do anything else than switch to yet other one or
go back so it seems emulating ShowModal() should be possible.

SC> what is the best way for expressing this in our sources,
SC> configure etc. wxUSE_EVENT_LOOPS which would be true for all others and
SC> false for iPhone,

 If the limitation is really just that you can't create your own
wxEventLoop objects then I think wxUSE_EVENT_LOOP is a natural choice. If
we really can't even have ShowModal() then we need something more
general...

 Regards,
VZ

_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: iPhone: no inner event loops

Stefan Csomor
Hi

On 17.05.09 13:58, "Vadim Zeitlin" <[hidden email]> wrote:

> On Sun, 17 May 2009 08:17:17 +0200 Stefan Csomor <[hidden email]>
> wrote:
>
> SC> the iPhone does not have offically supported ways to run an inner event
> loop
> SC> - and if you do a CFRunLoop on your own, important events outside of your
> SC> app may go unnoticed, therefore iPhone apps can not have things like
> SC> ShowModal,
>
>  I don't see why: iPhone UI _is_ modal, e.g. typically when you switch to
> the next screen you can't do anything else than switch to yet other one or
> go back so it seems emulating ShowModal() should be possible.

apparently the one and only event loop has to do everything at least in the
current OS versions, that also why things like the UIAlertView has to be
used via a delegate that deals with the buttons clicked, so everything is
based on call-backs.

People have tried working around it but the solutions are all hacks, having
some very strange problems which I'd really like to avoid

> SC> what is the best way for expressing this in our sources,
> SC> configure etc. wxUSE_EVENT_LOOPS which would be true for all others and
> SC> false for iPhone,
>
>  If the limitation is really just that you can't create your own
> wxEventLoop objects then I think wxUSE_EVENT_LOOP is a natural choice. If
> we really can't even have ShowModal() then we need something more
> general...

yes, it is not only our own code, but also the alerts that cannot spin their
own event loops

Best,

Stefan

_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re[2]: iPhone: no inner event loops

Vadim Zeitlin-4
On Sun, 17 May 2009 18:39:17 +0200 Stefan Csomor <[hidden email]> wrote:

SC> > SC> what is the best way for expressing this in our sources,
SC> > SC> configure etc. wxUSE_EVENT_LOOPS which would be true for all others and
SC> > SC> false for iPhone,
SC> >
SC> >  If the limitation is really just that you can't create your own
SC> > wxEventLoop objects then I think wxUSE_EVENT_LOOP is a natural choice. If
SC> > we really can't even have ShowModal() then we need something more
SC> > general...
SC>
SC> yes, it is not only our own code, but also the alerts that cannot spin their
SC> own event loops

 I think we should call it wxHAS_LOCAL_EVENT_LOOP (as usual with wxHAS_XXX,
defined or not, unlike wxUSE_YYY which are always defined as either 0 or
1) then.

 Thanks,
VZ

_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev

attachment0 (194 bytes) Download Attachment
Loading...