Ask Your Question
1

listeners when impress runs in 'default' window type (solved)

asked 2017-11-23 16:55:27 +0200

Pansmanser gravatar image

updated 2017-12-05 23:09:34 +0200

Impress runs in 'Default' or 'Window' mode. In Window mode, the presentation is displayed in the same window as the main impress design app. (I'm not sure of the correct terminology here). In Default mode, the presentation runs in its own (usually full-screen) window. A presentation is usually made in Default mode, because in Window mode, the screen or external monitor displays the control app panels and menus as well as the presentation slide, which is obviously not wanted.

Now the problem ... When a listener is set in basic macro, it receives broadcasts in Window mode, but apparently not in Default mode.C:\fakepath\TestListner.odp

Diagnostics are difficult, because in Default mode msgbox and print statements do not appear (and they are dodgy in window mode). Could it be that in Default mode the presentation app is no longer 'ThisComponent'? If so, is it possible to make the actual presentation a listener? Or is the problem something else?

The attached document contains some macros. When 'StartMusicAndShow is run, the presentation begins at the first slide, plays some music in vlc, and kills the music when the first slide ends. I works in Window mode, but in Default mode it fails to kill the music.

edit retag flag offensive close merge delete

Comments

For diagnostics, the most reliable way is to log messages to a text file. And yes, it does sound like the problem is ThisComponent. If so, get other components by enumerating oComponents = oDesktop.getComponents().

Jim K gravatar imageJim K ( 2017-11-23 19:50:26 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-12-05 23:09:18 +0200

Pansmanser gravatar image

I now have this working. The order of statements setting up the listener seems rather critical, but unfortunately the problem solved itself when I was fixing something else, and I am not sure what made the difference. The attached file reads a file prefix of slide 0, constructs a play list, begins playing randomly, and stops when slide 0 ends.C:\fakepath\testListen.odp

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-11-23 16:55:27 +0200

Seen: 20 times

Last updated: Dec 05 '17