[clean-list] SDI bugs

Peter Achten P.Achten at cs.ru.nl
Thu May 19 15:42:16 MEST 2011


Dear Luciano Vieira,

The first problem you describe is a genuine bug wrt updating check controls and radio controls. It does not occur with any of the other controls. Fortunately, there is a workaround: if you wrap the 
control in a so-called layout control, then positioning and refreshing works fine (I must confess that I find that rather odd). Don't forget to include zero margins in the layout-control attributes. 
So, change the radio control and check control to::

              :+: LayoutControl (RadioControl [("botão1",Nothing,id),
                                ("botão2",Nothing,id),
                                ("botão3",Nothing,id)]
                                (Rows 1) 3 []) [ControlPos (LeftBottom,zero),ControlHMargin 0 0,ControlVMargin 0 0]

              :+: LayoutControl (CheckControl [("botão1",Nothing,NoMark,id),
                                ("botão2",Nothing,Mark,id),
                                ("botão3",Nothing,NoMark,id)]
                                (Columns 3) []) [ControlPos (RightBottom,zero),ControlHMargin 0 0,ControlVMargin 0 0]

I've tested this with SDI and MDI windows, and it works on my machine.

The second problem you describe is actually not a bug, but correct, yet admittedly unexpected, behavior. You write:
    "When we minimize the window and maximize it again, the interface looses the background"
This suggests that you think that once you have drawn an image on the window canvas, it should remain there. However, this is not true in Object I/O. In Object I/O, the look function is responsible 
**all the time** for rendering the entire, correct content of the window (or control). The behaviour that you describe follows from that:

   1. you create a window with a look function that displays a red bitmap image. If you resize this window, it will constantly display this image
   2. if you press the button 'Write a Text!' then its callback function lookText is evaluated. Its effect is that it first draws the second bitmap and changes the look function of the window. The
      effect of the latter operation is that after that moment, all refresh requests will be handled by the function writeLookText
   3. now suppose you resize the window or cause any other reason to refresh part of the window, the function writeLookText redraws the content: it **only** draws the text "Refresh  refresh  " in
      black using font Arial in bold style and point size 20. In particular, it does not redraw the background. So that should be done first.

You can get the desired behavior by:

   1. removing the first line of the lookText function (so the line that draws the bitmap in the window)
   2. add the following line immediately before setting the pen colour to black in writeLookText:

     # picture = drawAt {x=0,y=0} bitmapFundo2 picture

I suppose that you wish to use non-monochrome bitmaps in a later stage. If not, it is much more efficient to either set the pen colour (setPenColour) with the appropriate colour and fill a rectangle 
of the proper size or set the pen background colour (setPenBack) and unfill a rectangle of the proper size.

Hope this helps,
Regards,
Peter


On 5/18/2011 3:41 AM, luciano.vieira.lima at terra.com.br wrote:
>
> I need help to fix problems with SDI interfaces
>
> Hi!
>
> Ireally like to make multimedia applications in CLEAN.
>
> Unfortunately I have someproblems with refresh in SDI interfaces.
>
> I submitted this problem already but I don´t receive any suggestion or help when I send my questions toclean-bugs at cs.ru.nl <mailto:clean-bugs at cs.ru.nl> and clean at cs.ru.nl 
> <mailto:clean at cs.ru.nl>( 2009, 2010 and  January 2011).
>
> I will explain the problems, presenting all details I think important to understand.
>
> I am sending, attached, two single programs to illustrate the bugs.
>
> The first problem is about radio, check ... controls in SDI interfaces.
>
> before1.jpg
>
> When we minimize the interface and maximize again, the objects(check and radio buttons) change place.
>
> Let´s see
>
> after1.jpg
>
> If you enlarge the window,... well, ...everything but popup disappear. Very estrange.
>
> enlarg1.jpg
>
> I don´t understand these problem.
>
> Another problem is about refresh (without check and radio buttons). This problem occurs whem using WindowLook, draw.... in SDI interfaces.
>
> Let´s see
>
> First, we have
>
> before2.jpg
>
> pressing the button "Write a Text!"  We have
>
> midle2.jpg
>
> When we minimize the window and maximize it again, the interface looses the background
>
> after2.jpg
>
> I don´t understand again.
>
> I think thatCLEAN has more potential than academics use.
>
> I really know that.That´s the problem. I need implementation professional SDI interfaces, without bugs.
>
> Please!
>
> Can someone help me?
>
> Best regards
>
> luciano.vieira.lima at terra.com.br <mailto:luciano.vieira.lima at terra.com.br>
>
> Luciano Vieira Lima
>
> _______________________________________________
>
> Prof. Dr. da Faculdade de Engenharia Elétrica (FEELT) da Universidade Federal de Uberlândia
>
> Membro do Núcleo Avançado de Computação Sônica e Multimídia (NACSM)
>
> Membro do Grupo de Inteligência Artificial
>
> Membro do Núcleo de Engenharia de Computação
>
> Membro do Núcleo de Engenharia Biomédica
>
> Membro do Núcleo de Desenvolvimento e Pesquisa em Eletromagnetismo e Sistemas de
>
>     Aterramentos Elétricos
>
> Membro do grupo de EAD da FEELT - UFU
>
> Pesquisador UFU, FINEP, CNPq, FAPEMIG, ANEEL desde 1983
>
> +55 34 3242 1566   34 8823 0008
>
> Curriculum http://lattes.cnpq.br/4147306444287969
>
>
> _______________________________________________
> clean-list mailing list
> clean-list at science.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4495 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0006.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4523 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0007.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4903 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0008.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4903 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0009.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 5010 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0010.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 5711 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/clean-list/attachments/20110519/123534af/attachment-0011.jpe>


More information about the clean-list mailing list