Hi Antonio, Previously when I was using iup 3.11 I was not having this issue. The way my code worked was that it called dialog:map() and I had a canvasBox:map_cb() defined which used the rastersize attribute of the canvasBox. I see in the map_cb documentation that there has been a change since 3.14, probably that is what is affecting me. When I debug my main application here is what I see:
1. I create glcanvasbox with an initial rastersize say "50x50" and I print it, it is fine. 2. I create the dialog and then print the rastersize again it is fine "50x50" 3. Now I call dialog:map() 4. This in turn calls canvasBox:map_cb() in which the first statement I have is to print the rastersize. Somehow as soon as it enters map_cb rastersize is set to nil. So to give you a test case I wrote the attached script which shows the problem. If this is the intended behavior then how do I get around it? Thanks, Milind On Tue, May 26, 2015 at 5:18 AM, Antonio Scuri <sc...@tecgraf.puc-rio.br> wrote: > When you create an element its size is not defined. If you not manually > set the size, then it will be available only when the layout of the dialog > is computed. > > The layout is automatically computed when the dialog is shown. If you > need the size before that, then there are alternatives. You can call > IupRefresh to compute the dialog, or you can call IupMap that internally > will call IupRefresh. > > Then size will not return nil/NULL. > > Best, > Scuri > > > On Tue, May 26, 2015 at 4:42 AM, Milind Gupta <milind.gu...@gmail.com> > wrote: > >> Hi, >> I created a glcanvasbox. the rastersize attribute seems to be >> nil when I first access it. In what scenario can the rastersize be nil? >> >> Thanks, >> Milind >> >> >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Iup-users mailing list >> Iup-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/iup-users >> >> > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users > >
glcanvasbox.lua
Description: Binary data
------------------------------------------------------------------------------
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users