Re: Levure - flicker prior to displaying UI stack on iOS

2018-06-08 Thread Trevor DeVore via use-livecode
On Fri, Jun 8, 2018 at 4:19 AM, Ralf Bitter via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Trevor,
>
> wonderful, it works! Thanks a lot for looking into it.
>

 You’re welcome. I’ve added the change to the master branch.


> Now I am at risk to get addicted to Levure though.
>

I hope you enjoy using it!

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Levure - flicker prior to displaying UI stack on iOS

2018-06-08 Thread Ralf Bitter via use-livecode
Hi Trevor,

wonderful, it works! Thanks a lot for looking into it.
Now I am at risk to get addicted to Levure though.


Ralf



> On 7. Jun 2018, at 23:02, Trevor DeVore via use-livecode 
>  wrote:
> 
> Try changing line 507 (or thereabouts) in `levure.livecodescript` to the
> following:
> 
> ```
> if the platform is "macos" then
>  send "levureFinishLoadingApplication" to me in 10 milliseconds
> else
>  levureFinishLoadingApplication
> end if
> ```
> 
> In my tests this removes the flicker without breaking the macOS behavior.
> If it works for you then I will submit a fix to the master branch of Levure.
> 
> -- 
> Trevor DeVore
> ScreenSteps
> www.screensteps.com 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure - flicker prior to displaying UI stack on iOS

2018-06-07 Thread Trevor DeVore via use-livecode
On Tue, Jun 5, 2018 at 12:36 PM, Ralf Bitter via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> Unfortunately I am observing an annoying screen flicker
> during the startup sequence while the UI stack is opened
> and the Levure standalone is closed.
> The iOS splash screen, as defined in settings, is shown,
> then for a fraction of a second the screen is black just before
> the UI stack becomes visible. This happens not only in the
> simulator but on a real device (iPad Pro) too.
>
> Did tests using a very simple UI stack, no code included, just
> one card showing an image which is the same as the splash
> screen so that the transition from the splash screen to the
> UI stack should not be noticeable.


I've tracked down what is causing the flicker.

1) When the `startup` message is received the
`levureInitializeAndRunApplication` is called. This handler loads your
configuration files.
2) Next, the `levureRunApplication` handler is called in time (`0
milliseconds`).
3) `levureRunApplication` processes command line arguments and dispatches
the `InitializeApplication` message to your app. It then calls
`levureFinishLoadingApplication` in time (`10 milliseconds`).
4) `levureFinishLoadingApplication ` dispatches `OpenApplication` to your
application. This is where you display the "testUI" stack of your app.

The flicker occurs due to the `send in time` that occurs in step 3,
`levureRunApplication`. I just did a test where I called
`levureFinishLoadingApplication` inline and the flicker goes away. So now
 the only issue is to find a fix and I think there is an easy one.

In the comments I made for myself in the source code it says that the
reason `levureFinishLoadingApplication` is called in time is so that
appleEvents can be sent before the application is loaded. This allows URLs
that launched application to be tucked away in "process url" levure
property and used in `OpenApplication`. Since appleEvents only exist on
macOS `in time` only needs to be used on macOS.

Try changing line 507 (or thereabouts) in `levure.livecodescript` to the
following:

```
if the platform is "macos" then
  send "levureFinishLoadingApplication" to me in 10 milliseconds
else
  levureFinishLoadingApplication
end if
```

In my tests this removes the flicker without breaking the macOS behavior.
If it works for you then I will submit a fix to the master branch of Levure.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure - flicker prior to displaying UI stack on iOS

2018-06-05 Thread Trevor DeVore via use-livecode
On Tue, Jun 5, 2018 at 4:57 PM, Ralf Bitter via use-livecode <
use-livecode@lists.runrev.com> wrote:

> thanks a lot for offering your help. The test project
> to demonstrate the issue is available at:
>
> https://spideroak.com/browse/share/soRabit/trevorSharing


I’ve go the file Ralf. I’ll take a look at it tomorrow and let you know
what I find out.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Levure - flicker prior to displaying UI stack on iOS

2018-06-05 Thread Ralf Bitter via use-livecode
Hi Trevor,

thanks a lot for offering your help. The test project
to demonstrate the issue is available at:


https://spideroak.com/browse/share/soRabit/trevorSharing

Ralf

> On 5. Jun 2018, at 21:15, Trevor DeVore via use-livecode 
>  wrote:
> 
> Can you upload a test stack for me to look at? If it is easy for me to
> replicate I should be able to figure out what is going on.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Levure - flicker prior to displaying UI stack on iOS

2018-06-05 Thread Trevor DeVore via use-livecode
On Tue, Jun 5, 2018 at 12:36 PM, Ralf Bitter via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Currently I am developing an iOS app for iPad using
> Trevor DeVore’s awesome Levure framework.
>

I’m glad you like it.


> Unfortunately I am observing an annoying screen flicker
> during the startup sequence while the UI stack is opened
> and the Levure standalone is closed.
> The iOS splash screen, as defined in settings, is shown,
> then for a fraction of a second the screen is black just before
> the UI stack becomes visible. This happens not only in the
> simulator but on a real device (iPad Pro) too.
>
>
Can you upload a test stack for me to look at? If it is easy for me to
replicate I should be able to figure out what is going on.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode