SizeWindow event not occure

Discuss GUI programming with the RapaGUI plugin here

SizeWindow event not occure

Postby lazi » Sat Dec 31, 2016 11:43 am

I want to notified on a rapagui window resize event. When there is two hollywood display is present there it does not send sizewindow events.
While only one display in one windows it works.

I hope this is a bug, and not some limitation because I need a fixed and a variable size hollywood display in the window.

Edit:
It is OS4whateverlatest. Sometimes I got en event, but mostly not.

Code: Select all
@REQUIRE "RapaGUI"
@DISPLAY 1,{Width = 320, Height = 200, color=#RED}
@DISPLAY 2,{width = 320, Height = 32, color=#GREEN}

gui$=[[<?xml version="1.0" encoding="iso-8859-1"?>
      <application id="app">
      <window title="Slarti V1.0 beta 1" activate="true">
         <vgroup>
            <hgroup>
               <hollywood id="hws" display="1"  hide="false" fixwidth="false" fixheight="false"/>
               <hollywood id="timeline" display="2" hide="false" fixwidth="false" fixheight="false"/>
            </hgroup>

         </vgroup>
      </window>
        </application>
    ]]

Function p_resizewindow(msg)
      DebugPrint("^^^^^^^^^^^^^^^^^^^^^")
      DebugPrint("class:",msg.action)
      DebugPrint("attribute:",msg.id)
      DebugPrint("size:",msg.width,msg.height)
      DebugPrint("-----------------------")
EndFunction

moai.CreateApp(gui$)

InstallEventHandler({SizeWindow=p_resizewindow})

Repeat
   WaitEvent
Forever
User avatar
lazi
 
Posts: 268
Joined: Fri Feb 25, 2011 12:08 am

Re: SizeWindow event not occure

Postby airsoftsoftwair » Tue Jan 03, 2017 10:43 pm

Yes, this looks like a bug. Will be fixed, thanks for the report!
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: SizeWindow event not occure

Postby airsoftsoftwair » Sun Mar 26, 2017 6:50 pm

Actually, there is a bug in your script but also in Hollywood :) Display event handlers need to be installed individually for each display, so you'd have to do something like this:

Code: Select all
SelectDisplay(1)
InstallEventHandler({SizeWindow=p_resizewindow})
SelectDisplay(2)
InstallEventHandler({SizeWindow=p_resizewindow})


Unfortunately, this will only get you one SizeWindow event handler because of a bug in Hollywood. But that's fixed now, unfortunately a little too late for Hollywood 7.0 :-)
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to RapaGUI

Who is online

Users browsing this forum: No registered users and 1 guest