Z-order and occlusion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Reinout Heeck-2
On 11/8/2011 1:43 PM, Terry Raymond wrote:

Yes, there is a proper way.

 

Whenever you have a window that is periodically updated to show some

kind of status of a long running process you should open the window in its

own window manager and elevate the priority of the window process.

Additionally, you should make sure to use #uiEventFor: or one of its variations

to communicate with the window process.





What you describe here is low-level multi-processing assembly code.
No-one gets this right on first try.


Where is the sanctioned (tested!) API for this abstraction?



Reinout
-------




 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Jon Paynter [[hidden email]]
Sent: Monday, November 07, 2011 8:45 PM
To: VWNC NC
Cc: Terry Raymond
Subject: Re: [vwnc] Z-order and occlusion

 

Ive used this when i want to guarantee the view updates before returning to my application code.  In particular for a progress indicator or something thats called from some long running application code.  I found too many times the view updates would get put into a queue or batched in some way such that no updates occurred until my long running process was complete.  Which defeats the purpose of any kind of progress indicator.
Using #invalidateRectangle:andRepairNow: true fixed the problem

Is there a better way to accomplish the same thing?

On Mon, Nov 7, 2011 at 5:11 PM, Terry Raymond <[hidden email]> wrote:

I should have been clearer.

 

You want to insure that the model state, and resulting view state, have

been completely updated before any redisplay occurs. If you use repair now

you run the risk that the model or view state has not been completely updated

before being redisplayed.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Terry Raymond
Sent: Monday, November 07, 2011 7:51 PM
To: 'VWNC NC'


Subject: Re: [vwnc] Z-order and occlusion

 

No.

 

Structure the sequence of your events so the update event occurs before

the long running operation.

 

One problem I ran into was I was updating the state of my model/view and it resulted

in the need for the scroll bars to be updated also. Unfortunately, they did a repair

now. The rectangles got combined to form one rectangle encompassing the whole

view and then it decided to do a repair now, in the middle of the state update of

my model. So when the display was rendered it was incorrect because the model

had not finished updating. If the widget used a deferred invalidate, the model

would have completed its update and would have rendered properly.

 

Put it another way, widgets should use deferred invalidate. Your own view

may be able to take liberties with that and do a repair now but I would not

recommend it.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Dave Stevenson [mailto:[hidden email]]
Sent: Monday, November 07, 2011 6:13 PM
To: Terry Raymond; VWNC NC
Subject: Re: [vwnc] Z-order and occlusion

 

Isn't updating a widget before a long-running operation would otherwise get around to it good enough reason to repair now? That case has nothing to do with widget state...
 

Dave Stevenson
[hidden email]

 

 


From: Terry Raymond <[hidden email]>
To: VWNC NC <[hidden email]>
Sent: Mon, November 7, 2011 3:14:53 PM
Subject: Re: [vwnc] Z-order and occlusion


> Side note. I really wish people wouldn't use the
> #invalidateRectangle:andRepairNow: true unless they're sure they need to.
> It may go away, or at least become moot in the future.

+100

IMHO no widgets should require immediate redisplay, all should retain enough
state to display properly via deferred invalidate.

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
===========================================================

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Travis Griggs
> Sent: Monday, November 07, 2011 1:55 PM
> To: Carl Gundel; VWNC NC
> Subject: Re: [vwnc] Z-order and occlusion
>
>
> On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>
> > I thought I already replied to this, but it isn't posted.  :-/
> >
> > I'm not really sure what you mean by "use invalidate".  If you still
> > have that GraphPanePart example I sent you, that is the widget I am
> > placing other widgets on top of.  If I'm doing any particular thing
> > wrong in that implementation, please toss your thoughts my way.
> >
> > Maybe this is the perfect opportunity to post about the proper use of
> > invalidated and isOccluded on that blog you are starting.  ;-)
>
>
> See "Redisplay all or Part of a View" in the GUI Dev Guide.
>
> It's pretty straightforward actually.
>
> A VW widget implements a #displayOn: method where it should use the GC
> handed to it to do all of its drawing. It should use that GC, not another,
and
> shouldn't store the GC for later use.
>
> When you want all or part of a widget to be redrawn, you should send
> #invalidate to it. For complex views, if it's easy to compute a region of
> change, you can use invalidateRectangle: to restrict the scope of change.
>
> If you're stepping outside of those bounds, then you've decided you know
> better than the framework and get to manage it yourself. :)
>
> Side note. I really wish people wouldn't use the
> #invalidateRectangle:andRepairNow: true unless they're sure they need to.
> It may go away, or at least become moot in the future.
>
> --
> Travis Griggs
> Objologist
> I multiply all time estimates by pi, to account for running around in
circles.
>
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

 



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

-- 
*********************************************************************

Dit e-mailbericht is alleen bestemd voor de geadresseerde(n).

Gebruik door anderen is niet toegestaan. Indien u niet degeadresseerde(n) bent wordt u verzocht de verzender hiervan op de hoogte te stellen en het bericht te verwijderen. Door de elektronische verzending kunnen aan de inhoud van dit bericht geen rechten worden ontleend.

Soops B.V. is gevestigd te Amsterdam, Nederland, en is geregistreerd bij de Kamer van Koophandel onder nummer 33240368.
Soops B.V. levert volgens de Fenit voorwaarden, gedeponeerd te Den Haag op 8 december 1994 onder nummer 1994/189.
**********************************************************************

This e-mail message is intended to be exclusively for the addressee.

If you are not the intended recipient you are kindly requested not to make any use whatsoever of the contents and to notify the sender immediately by returning this e-mail message. No rights can be derived from this message.

Soops B.V. is a private limited liability company and has its seat at Amsterdam, The Netherlands and is registered with the Trade Registry of the Chamber of Commerce and Industry under number 33240368.
Soops B.V. delivers according to the General Terms and Conditions of Business of Fenit, registered at The Hague, The Netherlands on December 8th, 1994, under number 1994/189
**********************************************************************


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Dave Stevenson-3
BlockClosure>>uiEventFor: is used all the time, by customer and system code, and has been around for roughly 15 years. What's unsanctioned or untested about it?
 
Why do you need to wrap it in another api call? The simple rule is, if a forked process wants to update some model of the UI, where updating that model would lead to dependency updates of views, use one of
    uiEvent
    uiEventFor:
    uiEventNow
    uiEventNowFor:
so the update happens in the window's UI process, rather than the forked process. Why is that hard to get right?
 
Dave Stevenson
[hidden email]



From: Reinout Heeck <[hidden email]>
To: [hidden email]
Sent: Tue, November 8, 2011 9:07:16 AM
Subject: Re: [vwnc] Z-order and occlusion

On 11/8/2011 1:43 PM, Terry Raymond wrote:

Yes, there is a proper way.

 

Whenever you have a window that is periodically updated to show some

kind of status of a long running process you should open the window in its

own window manager and elevate the priority of the window process.

Additionally, you should make sure to use #uiEventFor: or one of its variations

to communicate with the window process.





What you describe here is low-level multi-processing assembly code.
No-one gets this right on first try.


Where is the sanctioned (tested!) API for this abstraction?



Reinout
-------




 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Jon Paynter [[hidden email]]
Sent: Monday, November 07, 2011 8:45 PM
To: VWNC NC
Cc: Terry Raymond
Subject: Re: [vwnc] Z-order and occlusion

 

Ive used this when i want to guarantee the view updates before returning to my application code.  In particular for a progress indicator or something thats called from some long running application code.  I found too many times the view updates would get put into a queue or batched in some way such that no updates occurred until my long running process was complete.  Which defeats the purpose of any kind of progress indicator.
Using #invalidateRectangle:andRepairNow: true fixed the problem

Is there a better way to accomplish the same thing?

On Mon, Nov 7, 2011 at 5:11 PM, Terry Raymond <[hidden email]> wrote:

I should have been clearer.

 

You want to insure that the model state, and resulting view state, have

been completely updated before any redisplay occurs. If you use repair now

you run the risk that the model or view state has not been completely updated

before being redisplayed.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Terry Raymond
Sent: Monday, November 07, 2011 7:51 PM
To: 'VWNC NC'


Subject: Re: [vwnc] Z-order and occlusion

 

No.

 

Structure the sequence of your events so the update event occurs before

the long running operation.

 

One problem I ran into was I was updating the state of my model/view and it resulted

in the need for the scroll bars to be updated also. Unfortunately, they did a repair

now. The rectangles got combined to form one rectangle encompassing the whole

view and then it decided to do a repair now, in the middle of the state update of

my model. So when the display was rendered it was incorrect because the model

had not finished updating. If the widget used a deferred invalidate, the model

would have completed its update and would have rendered properly.

 

Put it another way, widgets should use deferred invalidate. Your own view

may be able to take liberties with that and do a repair now but I would not

recommend it.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Dave Stevenson [mailto:[hidden email]]
Sent: Monday, November 07, 2011 6:13 PM
To: Terry Raymond; VWNC NC
Subject: Re: [vwnc] Z-order and occlusion

 

Isn't updating a widget before a long-running operation would otherwise get around to it good enough reason to repair now? That case has nothing to do with widget state...
 

Dave Stevenson
[hidden email]

 

 


From: Terry Raymond <[hidden email]>
To: VWNC NC <[hidden email]>
Sent: Mon, November 7, 2011 3:14:53 PM
Subject: Re: [vwnc] Z-order and occlusion


> Side note. I really wish people wouldn't use the
> #invalidateRectangle:andRepairNow: true unless they're sure they need to.
> It may go away, or at least become moot in the future.

+100

IMHO no widgets should require immediate redisplay, all should retain enough
state to display properly via deferred invalidate.

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
===========================================================


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Travis Griggs
> Sent: Monday, November 07, 2011 1:55 PM
> To: Carl Gundel; VWNC NC
> Subject: Re: [vwnc] Z-order and occlusion
>
>
> On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>
> > I thought I already replied to this, but it isn't posted.  :-/
> >
> > I'm not really sure what you mean by "use invalidate".  If you still
> > have that GraphPanePart example I sent you, that is the widget I am
> > placing other widgets on top of.  If I'm doing any particular thing
> > wrong in that implementation, please toss your thoughts my way.
> >
> > Maybe this is the perfect opportunity to post about the proper use of
> > invalidated and isOccluded on that blog you are starting.  ;-)
>
>
> See "Redisplay all or Part of a View" in the GUI Dev Guide.
>
> It's pretty straightforward actually.
>
> A VW widget implements a #displayOn: method where it should use the GC
> handed to it to do all of its drawing. It should use that GC, not another,
and

> shouldn't store the GC for later use.
>
> When you want all or part of a widget to be redrawn, you should send
> #invalidate to it. For complex views, if it's easy to compute a region of
> change, you can use invalidateRectangle: to restrict the scope of change.
>
> If you're stepping outside of those bounds, then you've decided you know
> better than the framework and get to manage it yourself. :)
>
> Side note. I really wish people wouldn't use the
> #invalidateRectangle:andRepairNow: true unless they're sure they need to.
> It may go away, or at least become moot in the future.
>
> --
> Travis Griggs
> Objologist
> I multiply all time estimates by pi, to account for running around in
circles.
>
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

 



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

-- 
*********************************************************************

Dit e-mailbericht is alleen bestemd voor de geadresseerde(n).

Gebruik door anderen is niet toegestaan. Indien u niet degeadresseerde(n) bent wordt u verzocht de verzender hiervan op de hoogte te stellen en het bericht te verwijderen. Door de elektronische verzending kunnen aan de inhoud van dit bericht geen rechten worden ontleend.

Soops B.V. is gevestigd te Amsterdam, Nederland, en is geregistreerd bij de Kamer van Koophandel onder nummer 33240368.
Soops B.V. levert volgens de Fenit voorwaarden, gedeponeerd te Den Haag op 8 december 1994 onder nummer 1994/189.
**********************************************************************

This e-mail message is intended to be exclusively for the addressee.

If you are not the intended recipient you are kindly requested not to make any use whatsoever of the contents and to notify the sender immediately by returning this e-mail message. No rights can be derived from this message.

Soops B.V. is a private limited liability company and has its seat at Amsterdam, The Netherlands and is registered with the Trade Registry of the Chamber of Commerce and Industry under number 33240368.
Soops B.V. delivers according to the General Terms and Conditions of Business of Fenit, registered at The Hague, The Netherlands on December 8th, 1994, under number 1994/189
**********************************************************************


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Asynchronous updates (Z-order and occlusion)

Reinout Heeck-2
On 11/8/2011 5:04 PM, Dave Stevenson wrote:
BlockClosure>>uiEventFor: is used all the time, by customer and system code, and has been around for roughly 15 years. What's unsanctioned or untested about it?
 
Why do you need to wrap it in another api call? The simple rule is, if a forked process wants to update some model of the UI, where updating that model would lead to dependency updates of views, use one of
    uiEvent
    uiEventFor:
    uiEventNow
    uiEventNowFor:
so the update happens in the window's UI process, rather than the forked process. Why is that hard to get right?

That describes only one 'assembly mnemonic'.

It does not consider the
  "you should open the window in its own window manager"
and
  "elevate the priority of the window process"
bits.


To restate my question:

Where is the (15-years old 'n mature) API for opening my window in  its separate windowmanger cum elevated process and returning to me a reference to pass into #uiEventFor: ?


And a non-answer to your question 'Why is that hard to get right?'
would be to refer you to any recent VisualWorks where the system browsers will not show changes to package state until you click on one of them.

Apparently it is hard -- even  for Cincom.



R
-


On 11/8/2011 1:43 PM, Terry Raymond wrote:

Yes, there is a proper way.

 

Whenever you have a window that is periodically updated to show some

kind of status of a long running process you should open the window in its

own window manager and elevate the priority of the window process.

Additionally, you should make sure to use #uiEventFor: or one of its variations

to communicate with the window process.





What you describe here is low-level multi-processing assembly code.
No-one gets this right on first try.


Where is the sanctioned (tested!) API for this abstraction?



Reinout
-------




 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Jon Paynter [[hidden email]]
Sent: Monday, November 07, 2011 8:45 PM
To: VWNC NC
Cc: Terry Raymond
Subject: Re: [vwnc] Z-order and occlusion

 

Ive used this when i want to guarantee the view updates before returning to my application code.  In particular for a progress indicator or something thats called from some long running application code.  I found too many times the view updates would get put into a queue or batched in some way such that no updates occurred until my long running process was complete.  Which defeats the purpose of any kind of progress indicator.
Using #invalidateRectangle:andRepairNow: true fixed the problem

Is there a better way to accomplish the same thing?

On Mon, Nov 7, 2011 at 5:11 PM, Terry Raymond <[hidden email]> wrote:

I should have been clearer.

 

You want to insure that the model state, and resulting view state, have

been completely updated before any redisplay occurs. If you use repair now

you run the risk that the model or view state has not been completely updated

before being redisplayed.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Terry Raymond
Sent: Monday, November 07, 2011 7:51 PM
To: 'VWNC NC'


Subject: Re: [vwnc] Z-order and occlusion

 

No.

 

Structure the sequence of your events so the update event occurs before

the long running operation.

 

One problem I ran into was I was updating the state of my model/view and it resulted

in the need for the scroll bars to be updated also. Unfortunately, they did a repair

now. The rectangles got combined to form one rectangle encompassing the whole

view and then it decided to do a repair now, in the middle of the state update of

my model. So when the display was rendered it was incorrect because the model

had not finished updating. If the widget used a deferred invalidate, the model

would have completed its update and would have rendered properly.

 

Put it another way, widgets should use deferred invalidate. Your own view

may be able to take liberties with that and do a repair now but I would not

recommend it.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Dave Stevenson [mailto:[hidden email]]
Sent: Monday, November 07, 2011 6:13 PM
To: Terry Raymond; VWNC NC
Subject: Re: [vwnc] Z-order and occlusion

 

Isn't updating a widget before a long-running operation would otherwise get around to it good enough reason to repair now? That case has nothing to do with widget state...
 

Dave Stevenson
[hidden email]

 

 


From: Terry Raymond <[hidden email]>
To: VWNC NC <[hidden email]>
Sent: Mon, November 7, 2011 3:14:53 PM
Subject: Re: [vwnc] Z-order and occlusion


> Side note. I really wish people wouldn't use the
> #invalidateRectangle:andRepairNow: true unless they're sure they need to.
> It may go away, or at least become moot in the future.

+100

IMHO no widgets should require immediate redisplay, all should retain enough
state to display properly via deferred invalidate.

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
===========================================================

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Travis Griggs
> Sent: Monday, November 07, 2011 1:55 PM
> To: Carl Gundel; VWNC NC
> Subject: Re: [vwnc] Z-order and occlusion
>
>
> On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>
> > I thought I already replied to this, but it isn't posted.  :-/
> >
> > I'm not really sure what you mean by "use invalidate".  If you still
> > have that GraphPanePart example I sent you, that is the widget I am
> > placing other widgets on top of.  If I'm doing any particular thing
> > wrong in that implementation, please toss your thoughts my way.
> >
> > Maybe this is the perfect opportunity to post about the proper use of
> > invalidated and isOccluded on that blog you are starting.  ;-)
>
>
> See "Redisplay all or Part of a View" in the GUI Dev Guide.
>
> It's pretty straightforward actually.
>
> A VW widget implements a #displayOn: method where it should use the GC
> handed to it to do all of its drawing. It should use that GC, not another,
and
> shouldn't store the GC for later use.
>
> When you want all or part of a widget to be redrawn, you should send
> #invalidate to it. For complex views, if it's easy to compute a region of
> change, you can use invalidateRectangle: to restrict the scope of change.
>
> If you're stepping outside of those bounds, then you've decided you know
> better than the framework and get to manage it yourself. :)
>
> Side note. I really wish people wouldn't use the
> #invalidateRectangle:andRepairNow: true unless they're sure they need to.
> It may go away, or at least become moot in the future.
>
> --
> Travis Griggs
> Objologist
> I multiply all time estimates by pi, to account for running around in
circles.
>
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

 



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

-- 
*********************************************************************

Dit e-mailbericht is alleen bestemd voor de geadresseerde(n).

Gebruik door anderen is niet toegestaan. Indien u niet degeadresseerde(n) bent wordt u verzocht de verzender hiervan op de hoogte te stellen en het bericht te verwijderen. Door de elektronische verzending kunnen aan de inhoud van dit bericht geen rechten worden ontleend.

Soops B.V. is gevestigd te Amsterdam, Nederland, en is geregistreerd bij de Kamer van Koophandel onder nummer 33240368.
Soops B.V. levert volgens de Fenit voorwaarden, gedeponeerd te Den Haag op 8 december 1994 onder nummer 1994/189.
**********************************************************************

This e-mail message is intended to be exclusively for the addressee.

If you are not the intended recipient you are kindly requested not to make any use whatsoever of the contents and to notify the sender immediately by returning this e-mail message. No rights can be derived from this message.

Soops B.V. is a private limited liability company and has its seat at Amsterdam, The Netherlands and is registered with the Trade Registry of the Chamber of Commerce and Industry under number 33240368.
Soops B.V. delivers according to the General Terms and Conditions of Business of Fenit, registered at The Hague, The Netherlands on December 8th, 1994, under number 1994/189
**********************************************************************



-- 
*********************************************************************

Dit e-mailbericht is alleen bestemd voor de geadresseerde(n).

Gebruik door anderen is niet toegestaan. Indien u niet degeadresseerde(n) bent wordt u verzocht de verzender hiervan op de hoogte te stellen en het bericht te verwijderen. Door de elektronische verzending kunnen aan de inhoud van dit bericht geen rechten worden ontleend.

Soops B.V. is gevestigd te Amsterdam, Nederland, en is geregistreerd bij de Kamer van Koophandel onder nummer 33240368.
Soops B.V. levert volgens de Fenit voorwaarden, gedeponeerd te Den Haag op 8 december 1994 onder nummer 1994/189.
**********************************************************************

This e-mail message is intended to be exclusively for the addressee.

If you are not the intended recipient you are kindly requested not to make any use whatsoever of the contents and to notify the sender immediately by returning this e-mail message. No rights can be derived from this message.

Soops B.V. is a private limited liability company and has its seat at Amsterdam, The Netherlands and is registered with the Trade Registry of the Chamber of Commerce and Industry under number 33240368.
Soops B.V. delivers according to the General Terms and Conditions of Business of Fenit, registered at The Hague, The Netherlands on December 8th, 1994, under number 1994/189
**********************************************************************


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

andre
In reply to this post by Dave Stevenson-3
I'm glad this discussion comes up again. It has never been advisable  
to update or rebuild widgets from a non-UI thread. The only reason  
this sticky misconception is still around is that Smalltalk is so  
forgiving with respect to its "green" multi-threading.

Every OS that is worth its salt will blow your app to pieces sooner or  
later, if you dare to fiddle with UI objects from a secondary thread.  
This is also a reason why the MacOS X VM is rather tricky to  
implement, because the object engine runs on a secondary thread  
despite requirung the UI all the time.

Actually every user interface needs a RecursionLock that protects it  
from being modified (rebuilt) and displayed at the same time.

Andre

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Reinout Heeck-2
On 11/8/2011 5:45 PM, andre wrote:
> I'm glad this discussion comes up again. It has never been advisable
> to update or rebuild widgets from a non-UI thread. The only reason
> this sticky misconception is still around is that Smalltalk is so
> forgiving with respect to its "green" multi-threading.

Hmm.. I don't quite agree with that in the case of VisualWorks.

The WindowManager stuff is still in rather 'alpha' state with various
snippets of code that paper over multi-threading bugs.

This is probably most visible with accesses to the shared variable
WindowManager.ManagerRegistry.
In this shared lives an OrderedCollection that only gets sent add: and
remove: messages with an actual windowmanager as parameter.
Nevertheless all the methods that iterate over this collection have a
guard for nillness.
If you remove these guards your image will hang in no time.

Q: where do those nils come from?
A: from nowhere, the collection is accessed in unprotected ways by
multiple threads


So I guess VW is forgiving because it has to -- to paper over its own
unfinished code.


R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Christian Haider
In reply to this post by Christian Haider
Hi Terry,

Thanks! This actually work pretty well.
I am embarrassed... and promise to read the docs again...

Cheers,
        Christian

> -----Ursprüngliche Nachricht-----
> Von: Terry Raymond [mailto:[hidden email]]
> Gesendet: Dienstag, 8. November 2011 14:01
> An: Christian Haider; 'VWNC NC'
> Betreff: RE: [vwnc] Z-order and occlusion
>
> Christian
>
> First of all the replies should come back using #uiEventFor: , they should not
> do direct updates of the model/view state.
>
> You should consider the state of the model and view as owned by the
> window process and any updates must be done as an asynchronous message
> using a variation of #uiEventFor:. The action being done in the ui block can do
> a simple invalidate which will result in the display being updated. If you are
> concerned about a background process starving the window process then
> you either elevate the priority of the window process or lower the priority of
> the background process.
>
> Terry
>
> ==========================================================
> =
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> ==========================================================
> =
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]] On
> > Behalf Of Christian Haider
> > Sent: Tuesday, November 08, 2011 6:54 AM
> > To: VWNC NC
> > Subject: Re: [vwnc] Z-order and occlusion
> >
> > I am using #invalidateNow for a feedback button and am a bit out of
> > imagination on how to do it differently (while I agree with the point
> > for
> most
> > other occasions).
> >
> > Scenario: I have a button on the toolbar which sends out a bunch of
> requests
> > asynchronously. Whenever a request comes back, I want to inform the
> > user on the number of outstanding requests by repainting the button
> > showing this number. (I do optimize painting by throwing away display
> > requests
> when
> > displaying is in progress). How could you do that with simply
> > invalidation
> -
> > almost nothing will be drawn since the UI doesn't get enough events
> > from the OS? Especially with feedback on asynchronous events, I don't
> > see any other way than to force a redraw...
> >
> > Cheers,
> > Christian
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: [hidden email] [mailto:[hidden email]] Im
> > > Auftrag von Terry Raymond
> > > Gesendet: Montag, 7. November 2011 23:01
> > > An: 'VWNC NC'
> > > Betreff: Re: [vwnc] Z-order and occlusion
> > >
> > >
> > > > Side note. I really wish people wouldn't use the
> > > > #invalidateRectangle:andRepairNow: true unless they're sure they
> > > > need
> > > to.
> > > > It may go away, or at least become moot in the future.
> > >
> > >  +100
> > >
> > > IMHO no widgets should require immediate redisplay, all should
> > > retain enough state to display properly via deferred invalidate.
> > >
> > > Terry
> > >
> > >
> >
> ==========================================================
> > > =
> > > Terry Raymond
> > > Crafted Smalltalk
> > > 80 Lazywood Ln.
> > > Tiverton, RI  02878
> > > (401) 624-4517      [hidden email]
> > >
> >
> ==========================================================
> > > =
> > >
> > > > -----Original Message-----
> > > > From: [hidden email] [mailto:[hidden email]]
> > On
> > > > Behalf Of Travis Griggs
> > > > Sent: Monday, November 07, 2011 1:55 PM
> > > > To: Carl Gundel; VWNC NC
> > > > Subject: Re: [vwnc] Z-order and occlusion
> > > >
> > > >
> > > > On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
> > > >
> > > > > I thought I already replied to this, but it isn't posted.  :-/
> > > > >
> > > > > I'm not really sure what you mean by "use invalidate".  If you
> > > > > still have that GraphPanePart example I sent you, that is the
> > > > > widget I am placing other widgets on top of.  If I'm doing any
> > > > > particular thing wrong in that implementation, please toss your
> > thoughts my way.
> > > > >
> > > > > Maybe this is the perfect opportunity to post about the proper
> > > > > use of invalidated and isOccluded on that blog you are starting.
> > > > > ;-)
> > > >
> > > >
> > > > See "Redisplay all or Part of a View" in the GUI Dev Guide.
> > > >
> > > > It's pretty straightforward actually.
> > > >
> > > > A VW widget implements a #displayOn: method where it should use
> > > > the
> > > GC
> > > > handed to it to do all of its drawing. It should use that GC, not
> > > > another,
> > > and
> > > > shouldn't store the GC for later use.
> > > >
> > > > When you want all or part of a widget to be redrawn, you should
> > > > send #invalidate to it. For complex views, if it's easy to compute
> > > > a region of change, you can use invalidateRectangle: to restrict
> > > > the
> scope of
> > change.
> > > >
> > > > If you're stepping outside of those bounds, then you've decided
> > > > you know better than the framework and get to manage it yourself.
> > > > :)
> > > >
> > > > Side note. I really wish people wouldn't use the
> > > > #invalidateRectangle:andRepairNow: true unless they're sure they
> > > > need
> > > to.
> > > > It may go away, or at least become moot in the future.
> > > >
> > > > --
> > > > Travis Griggs
> > > > Objologist
> > > > I multiply all time estimates by pi, to account for running around
> > > > in
> > > circles.
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > vwnc mailing list
> > > > [hidden email]
> > > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> > >
> > >
> > >
> > > _______________________________________________
> > > vwnc mailing list
> > > [hidden email]
> > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> > >
> >
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Steven Kelly
In reply to this post by andre
andre [[hidden email]] wrote:
> Actually every user interface needs a RecursionLock that protects it
> from being modified (rebuilt) and displayed at the same time.

And every user interface's users want it to be repainted
in a timely fashion during long operations.
"Ay, there's the rub"

In some cases this is simple, and I guess Terry and Dave are thinking of
those cases - e.g. if the entirety of the changes made during the long
operation can be kept isolated from the window's model, and then
installed in one atomic operation at the end.

Often, however, an application hasn't been built in this way from
scratch, and retrofitting it is not easy. VW itself is an example of
such an application - both in its development tools and in the
underlying mechanisms. Most operations are written initially in the UI
process, getting rid of any problem of the UI being refreshed during the
operation. Only when a particular operation becomes too slow do
developers look at pushing it into a lower priority process, and by then
it is often intertwined with the application model, its aspects and
views.

Also, VW apps make good use of object reuse, with multiple views
dependent on the same model, or the same object being referred to deeply
by multiple models. If the display varies depending on the state of that
object, it can be hard to ensure that all views - in their possibly
various Windows and WindowManager processes - update correctly.

In my experience, MultiProcUI/WindowManager solved problems only in the
dev world, where we want browsers and debuggers to work even when our
app is stalled. In a deployed app - which is our focus in this
discussion - its benefits are much smaller. And as Reinout said, there
are plenty of bugs and hacks in the current state of that code - the
worst being #defaultParentWindow and TextCollectorView>>update*.

What we have found works best is for long running operations to open a
dialog with a progress gauge, and fork the operation in a lower-priority
process. During the operation, window refreshes are drawn from the
double-buffering backing store. The modal dialog protects the app from
user clicks or keypresses in windows during the operation.

Steve

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Andres Valloud-6
In reply to this post by Terry Raymond
OOOOOOoooooooooohh... thank you!  I just updated MemoryMonitor to stop
hacking UI updates.

On 11/8/2011 4:50 AM, Terry Raymond wrote:

> Christian
>
> First of all the replies should come back using #uiEventFor: , they should
> not
> do direct updates of the model/view state.
>
> You should consider the state of the model and view as owned by the window
> process and any updates must be done as an asynchronous message using a
> variation of #uiEventFor:. The action being done in the ui block can do a
> simple
> invalidate which will result in the display being updated. If you are
> concerned
> about a background process starving the window process then you either
> elevate
> the priority of the window process or lower the priority of the background
> process.
>
> Terry
>
> ===========================================================
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> ===========================================================
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On
>> Behalf Of Christian Haider
>> Sent: Tuesday, November 08, 2011 6:54 AM
>> To: VWNC NC
>> Subject: Re: [vwnc] Z-order and occlusion
>>
>> I am using #invalidateNow for a feedback button and am a bit out of
>> imagination on how to do it differently (while I agree with the point for
> most
>> other occasions).
>>
>> Scenario: I have a button on the toolbar which sends out a bunch of
> requests
>> asynchronously. Whenever a request comes back, I want to inform the user
>> on the number of outstanding requests by repainting the button showing
>> this number. (I do optimize painting by throwing away display requests
> when
>> displaying is in progress). How could you do that with simply invalidation
> -
>> almost nothing will be drawn since the UI doesn't get enough events from
>> the OS? Especially with feedback on asynchronous events, I don't see any
>> other way than to force a redraw...
>>
>> Cheers,
>> Christian
>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: [hidden email] [mailto:[hidden email]] Im
>>> Auftrag von Terry Raymond
>>> Gesendet: Montag, 7. November 2011 23:01
>>> An: 'VWNC NC'
>>> Betreff: Re: [vwnc] Z-order and occlusion
>>>
>>>
>>>> Side note. I really wish people wouldn't use the
>>>> #invalidateRectangle:andRepairNow: true unless they're sure they
>>>> need
>>> to.
>>>> It may go away, or at least become moot in the future.
>>>
>>>   +100
>>>
>>> IMHO no widgets should require immediate redisplay, all should retain
>>> enough state to display properly via deferred invalidate.
>>>
>>> Terry
>>>
>>>
>> ==========================================================
>>> =
>>> Terry Raymond
>>> Crafted Smalltalk
>>> 80 Lazywood Ln.
>>> Tiverton, RI  02878
>>> (401) 624-4517      [hidden email]
>>>
>> ==========================================================
>>> =
>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]]
>> On
>>>> Behalf Of Travis Griggs
>>>> Sent: Monday, November 07, 2011 1:55 PM
>>>> To: Carl Gundel; VWNC NC
>>>> Subject: Re: [vwnc] Z-order and occlusion
>>>>
>>>>
>>>> On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>>>>
>>>>> I thought I already replied to this, but it isn't posted.  :-/
>>>>>
>>>>> I'm not really sure what you mean by "use invalidate".  If you
>>>>> still have that GraphPanePart example I sent you, that is the
>>>>> widget I am placing other widgets on top of.  If I'm doing any
>>>>> particular thing wrong in that implementation, please toss your
>> thoughts my way.
>>>>>
>>>>> Maybe this is the perfect opportunity to post about the proper use
>>>>> of invalidated and isOccluded on that blog you are starting.  ;-)
>>>>
>>>>
>>>> See "Redisplay all or Part of a View" in the GUI Dev Guide.
>>>>
>>>> It's pretty straightforward actually.
>>>>
>>>> A VW widget implements a #displayOn: method where it should use the
>>> GC
>>>> handed to it to do all of its drawing. It should use that GC, not
>>>> another,
>>> and
>>>> shouldn't store the GC for later use.
>>>>
>>>> When you want all or part of a widget to be redrawn, you should send
>>>> #invalidate to it. For complex views, if it's easy to compute a
>>>> region of change, you can use invalidateRectangle: to restrict the
> scope of
>> change.
>>>>
>>>> If you're stepping outside of those bounds, then you've decided you
>>>> know better than the framework and get to manage it yourself. :)
>>>>
>>>> Side note. I really wish people wouldn't use the
>>>> #invalidateRectangle:andRepairNow: true unless they're sure they
>>>> need
>>> to.
>>>> It may go away, or at least become moot in the future.
>>>>
>>>> --
>>>> Travis Griggs
>>>> Objologist
>>>> I multiply all time estimates by pi, to account for running around
>>>> in
>>> circles.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> vwnc mailing list
>>>> [hidden email]
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>>
>>>
>>>
>>> _______________________________________________
>>> vwnc mailing list
>>> [hidden email]
>>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>>
>>
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Runar Jordahl
In reply to this post by Terry Raymond
I think WPF will actually throw an exception if you violates this principle:

http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcherobject.aspx

Runar

2011/11/8 Terry Raymond <[hidden email]>:
> Christian
>
> First of all the replies should come back using #uiEventFor: , they should
> not
> do direct updates of the model/view state.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Terry Raymond
In reply to this post by Carl Gundel-2

Also, you should look at the section entitled “Window Processes” on page 3-6 of the GUIDevGuide.

 

A simple guideline would be;  any background processes, i.e. one you created via a fork or new process,

must use a form of #uiEventFor: when updating the state of an object that can be displayed.

 

Code that is responding to a user input, i.e. a mouse action or key press, is executing in the window process

and does not use #uiEventFor:.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: Christian Haider [mailto:[hidden email]]
Sent: Monday, November 14, 2011 5:54 AM
To: [hidden email]
Cc: [hidden email]
Subject: AW: Re: [vwnc] Z-order and occlusion

 

Hello,

 

I just searched through the docs which came with vw7.8 and found 2 places where this is discussed:

In the ReleaseNotes7.1.pdf (I am amazed that this change is that old…) on page 15 and 16 “Deferred and Background UI Actions” and in the GUIDevGuide.pdf on page 3-7 and 3-8 “Yielding to Other Processes” and 3-22 to 3-24 “Adding an Event to the UI Event Queue”.

 

To me the docs seem not too bad explaining the proper way of doing things… Maybe an explicit warning against using #invalidateNow and a comment in that method would be good.

 

I remember vaguely that there was some discussion on the mailing lists at the time when the separate UI process was introduced…

 

In essence I think that I should have known…

 

Cheers,

                Christian

 

 

Von: [hidden email] [hidden email]
Gesendet: Montag, 14. November 2011 09:01
An: [hidden email]; Christian Haider
Betreff: WG: Re: [vwnc] Z-order and occlusion

 

Hello Mr. Raymond and Mr. Haider.
Sorry for the short interruption.

The update mechanism by using the #uiEventFor: message sounds quite interesting. But I don't really get it, why and when I should use this practice.
About what kind of events are you talking here?

And Mr. Haider, regarding "the docs". Do you talk about the few pages in the VW GUI Developers guide? Or do you know a more detailed description?

Thank you for your answers.

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m   G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Hermann Gerlinger
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346

----- Weitergeleitet von Tom Gruenewald/Oberkochen/Zeiss/DE am 14.11.2011 08:36 -----

"Christian Haider" <[hidden email]> 
Gesendet von: [hidden email]

08.11.2011 18:57

An

"VWNC NC" <[hidden email]>

Kopie

Thema

Re: [vwnc] Z-order and occlusion

 


Hi Terry,

Thanks! This actually work pretty well.
I am embarrassed... and promise to read the docs again...

Cheers,
Christian

> -----Ursprüngliche Nachricht-----
> Von: Terry Raymond [[hidden email]]
> Gesendet: Dienstag, 8. November 2011 14:01
> An: Christian Haider; 'VWNC NC'
> Betreff: RE: [vwnc] Z-order and occlusion
>
> Christian
>
> First of all the replies should come back using #uiEventFor: , they should not
> do direct updates of the model/view state.
>
> You should consider the state of the model and view as owned by the
> window process and any updates must be done as an asynchronous message
> using a variation of #uiEventFor:. The action being done in the ui block can do
> a simple invalidate which will result in the display being updated. If you are
> concerned about a background process starving the window process then
> you either elevate the priority of the window process or lower the priority of
> the background process.
>
> Terry
>
> ==========================================================
> =
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> ==========================================================
> =
>
> > -----Original Message-----
> > From: [hidden email] [[hidden email]] On
> > Behalf Of Christian Haider
> > Sent: Tuesday, November 08, 2011 6:54 AM
> > To: VWNC NC
> > Subject: Re: [vwnc] Z-order and occlusion
> >
> > I am using #invalidateNow for a feedback button and am a bit out of
> > imagination on how to do it differently (while I agree with the point
> > for
> most
> > other occasions).
> >
> > Scenario: I have a button on the toolbar which sends out a bunch of
> requests
> > asynchronously. Whenever a request comes back, I want to inform the
> > user on the number of outstanding requests by repainting the button
> > showing this number. (I do optimize painting by throwing away display
> > requests
> when
> > displaying is in progress). How could you do that with simply
> > invalidation
> -
> > almost nothing will be drawn since the UI doesn't get enough events
> > from the OS? Especially with feedback on asynchronous events, I don't
> > see any other way than to force a redraw...
> >
> > Cheers,
> > Christian
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: [hidden email] [[hidden email]] Im
> > > Auftrag von Terry Raymond
> > > Gesendet: Montag, 7. November 2011 23:01
> > > An: 'VWNC NC'
> > > Betreff: Re: [vwnc] Z-order and occlusion
> > >
> > >
> > > > Side note. I really wish people wouldn't use the
> > > > #invalidateRectangle:andRepairNow: true unless they're sure they
> > > > need
> > > to.
> > > > It may go away, or at least become moot in the future.
> > >
> > >  +100
> > >
> > > IMHO no widgets should require immediate redisplay, all should
> > > retain enough state to display properly via deferred invalidate.
> > >
> > > Terry
> > >
> > >
> >
> ==========================================================
> > > =
> > > Terry Raymond
> > > Crafted Smalltalk
> > > 80 Lazywood Ln.
> > > Tiverton, RI  02878
> > > (401) 624-4517      [hidden email]
> > >
> >
> ==========================================================
> > > =
> > >
> > > > -----Original Message-----
> > > > From: [hidden email] [[hidden email]]
> > On
> > > > Behalf Of Travis Griggs
> > > > Sent: Monday, November 07, 2011 1:55 PM
> > > > To: Carl Gundel; VWNC NC
> > > > Subject: Re: [vwnc] Z-order and occlusion
> > > >
> > > >
> > > > On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
> > > >
> > > > > I thought I already replied to this, but it isn't posted.  :-/
> > > > >
> > > > > I'm not really sure what you mean by "use invalidate".  If you
> > > > > still have that GraphPanePart example I sent you, that is the
> > > > > widget I am placing other widgets on top of.  If I'm doing any
> > > > > particular thing wrong in that implementation, please toss your
> > thoughts my way.
> > > > >
> > > > > Maybe this is the perfect opportunity to post about the proper
> > > > > use of invalidated and isOccluded on that blog you are starting.
> > > > > ;-)
> > > >
> > > >
> > > > See "Redisplay all or Part of a View" in the GUI Dev Guide.
> > > >
> > > > It's pretty straightforward actually.
> > > >
> > > > A VW widget implements a #displayOn: method where it should use
> > > > the
> > > GC
> > > > handed to it to do all of its drawing. It should use that GC, not
> > > > another,
> > > and
> > > > shouldn't store the GC for later use.
> > > >
> > > > When you want all or part of a widget to be redrawn, you should
> > > > send #invalidate to it. For complex views, if it's easy to compute
> > > > a region of change, you can use invalidateRectangle: to restrict
> > > > the
> scope of
> > change.
> > > >
> > > > If you're stepping outside of those bounds, then you've decided
> > > > you know better than the framework and get to manage it yourself.
> > > > :)
> > > >
> > > > Side note. I really wish people wouldn't use the
> > > > #invalidateRectangle:andRepairNow: true unless they're sure they
> > > > need
> > > to.
> > > > It may go away, or at least become moot in the future.
> > > >
> > > > --
> > > > Travis Griggs
> > > > Objologist
> > > > I multiply all time estimates by pi, to account for running around
> > > > in
> > > circles.
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > vwnc mailing list
> > > > [hidden email]
> > > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> > >
> > >
> > >
> > > _______________________________________________
> > > vwnc mailing list
> > > [hidden email]
> > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> > >
> >
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Andres Valloud-6
Is there anything better than raising the priority of the window process
to ensure regular processes don't preempt window updating?

On 11/14/2011 4:45 AM, Terry Raymond wrote:

> Also, you should look at the section entitled “Window Processes” on page
> 3-6 of the GUIDevGuide.
>
> A simple guideline would be;  any background processes, i.e. one you
> created via a fork or new process,
>
> must use a form of #uiEventFor: when updating the state of an object
> that can be displayed.
>
> Code that is responding to a user input, i.e. a mouse action or key
> press, is executing in the window process
>
> and does not use #uiEventFor:.
>
> Terry
>
> ===========================================================
>
> Terry Raymond
>
> Crafted Smalltalk
>
> 80 Lazywood Ln.
>
> Tiverton, RI 02878
>
> (401) 624-4517 [hidden email]
>
> ===========================================================
>
> *From:*Christian Haider [mailto:[hidden email]]
> *Sent:* Monday, November 14, 2011 5:54 AM
> *To:* [hidden email]
> *Cc:* [hidden email]
> *Subject:* AW: Re: [vwnc] Z-order and occlusion
>
> Hello,
>
> I just searched through the docs which came with vw7.8 and found 2
> places where this is discussed:
>
> In the ReleaseNotes7.1.pdf (I am amazed that this change is that old…)
> on page 15 and 16 “Deferred and Background UI Actions” and in the
> GUIDevGuide.pdf on page 3-7 and 3-8 “Yielding to Other Processes” and
> 3-22 to 3-24 “Adding an Event to the UI Event Queue”.
>
> To me the docs seem not too bad explaining the proper way of doing
> things… Maybe an explicit warning against using #invalidateNow and a
> comment in that method would be good.
>
> I remember vaguely that there was some discussion on the mailing lists
> at the time when the separate UI process was introduced…
>
> In essence I think that I should have known…
>
> Cheers,
>
> Christian
>
> *Von:*[hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] <mailto:[mailto:[hidden email]]>
> *Gesendet:* Montag, 14. November 2011 09:01
> *An:* [hidden email]
> <mailto:[hidden email]>; Christian Haider
> *Betreff:* WG: Re: [vwnc] Z-order and occlusion
>
> Hello Mr. Raymond and Mr. Haider.
> Sorry for the short interruption.
>
> The update mechanism by using the #uiEventFor: message sounds quite
> interesting. But I don't really get it, why and when I should use this
> practice.
> About what kind of events are you talking here?
>
> And Mr. Haider, regarding "the docs". Do you talk about the few pages in
> the VW GUI Developers guide? Or do you know a more detailed description?
>
> Thank you for your answers.
>
> Best regards,
> Tom Grünewald
>
> ________
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Softwareentwicklung/Software Development
>
> T o m G r ü n e w a l d
>
> 73446 Oberkochen, Germany
> tel: +49.7364.20-8541
> fax: +49.7364.20-4800
> email: [hidden email] <mailto:[hidden email]>
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl–Zeiss–Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Hermann Gerlinger
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Handelsregister: Amtsgericht Ulm, HRB 501561
> USt–IdNr.: DE 811 515 346
> ----- Weitergeleitet von Tom Gruenewald/Oberkochen/Zeiss/DE am
> 14.11.2011 08:36 -----
>
> *"Christian Haider" <[hidden email]
> <mailto:[hidden email]>>*
> Gesendet von: [hidden email] <mailto:[hidden email]>
>
> 08.11.2011 18:57
>
>
>
> An
>
>
>
> "VWNC NC" <[hidden email] <mailto:[hidden email]>>
>
> Kopie
>
>
>
> Thema
>
>
>
> Re: [vwnc] Z-order and occlusion
>
>
>
>
> Hi Terry,
>
> Thanks! This actually work pretty well.
> I am embarrassed... and promise to read the docs again...
>
> Cheers,
> Christian
>
>>  -----Ursprüngliche Nachricht-----
>>  Von: Terry Raymond [mailto:[hidden email]]
>>  Gesendet: Dienstag, 8. November 2011 14:01
>>  An: Christian Haider; 'VWNC NC'
>>  Betreff: RE: [vwnc] Z-order and occlusion
>>
>>  Christian
>>
>>  First of all the replies should come back using #uiEventFor: , they
> should not
>>  do direct updates of the model/view state.
>>
>>  You should consider the state of the model and view as owned by the
>>  window process and any updates must be done as an asynchronous message
>>  using a variation of #uiEventFor:. The action being done in the ui
> block can do
>>  a simple invalidate which will result in the display being updated. If
> you are
>>  concerned about a background process starving the window process then
>>  you either elevate the priority of the window process or lower the
> priority of
>>  the background process.
>>
>>  Terry
>>
>>  ==========================================================
>>  =
>>  Terry Raymond
>>  Crafted Smalltalk
>>  80 Lazywood Ln.
>>  Tiverton, RI 02878
>>  (401) 624-4517 [hidden email]
> <mailto:[hidden email]>
>>  ==========================================================
>>  =
>>
>>  > -----Original Message-----
>>  > From: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] On
>>  > Behalf Of Christian Haider
>>  > Sent: Tuesday, November 08, 2011 6:54 AM
>>  > To: VWNC NC
>>  > Subject: Re: [vwnc] Z-order and occlusion
>>  >
>>  > I am using #invalidateNow for a feedback button and am a bit out of
>>  > imagination on how to do it differently (while I agree with the point
>>  > for
>>  most
>>  > other occasions).
>>  >
>>  > Scenario: I have a button on the toolbar which sends out a bunch of
>>  requests
>>  > asynchronously. Whenever a request comes back, I want to inform the
>>  > user on the number of outstanding requests by repainting the button
>>  > showing this number. (I do optimize painting by throwing away display
>>  > requests
>>  when
>>  > displaying is in progress). How could you do that with simply
>>  > invalidation
>>  -
>>  > almost nothing will be drawn since the UI doesn't get enough events
>>  > from the OS? Especially with feedback on asynchronous events, I don't
>>  > see any other way than to force a redraw...
>>  >
>>  > Cheers,
>>  > Christian
>>  >
>>  > > -----Ursprüngliche Nachricht-----
>>  > > Von: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] Im
>>  > > Auftrag von Terry Raymond
>>  > > Gesendet: Montag, 7. November 2011 23:01
>>  > > An: 'VWNC NC'
>>  > > Betreff: Re: [vwnc] Z-order and occlusion
>>  > >
>>  > >
>>  > > > Side note. I really wish people wouldn't use the
>>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
>>  > > > need
>>  > > to.
>>  > > > It may go away, or at least become moot in the future.
>>  > >
>>  > > +100
>>  > >
>>  > > IMHO no widgets should require immediate redisplay, all should
>>  > > retain enough state to display properly via deferred invalidate.
>>  > >
>>  > > Terry
>>  > >
>>  > >
>>  >
>>  ==========================================================
>>  > > =
>>  > > Terry Raymond
>>  > > Crafted Smalltalk
>>  > > 80 Lazywood Ln.
>>  > > Tiverton, RI 02878
>>  > > (401) 624-4517 [hidden email]
> <mailto:[hidden email]>
>>  > >
>>  >
>>  ==========================================================
>>  > > =
>>  > >
>>  > > > -----Original Message-----
>>  > > > From: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]]
>>  > On
>>  > > > Behalf Of Travis Griggs
>>  > > > Sent: Monday, November 07, 2011 1:55 PM
>>  > > > To: Carl Gundel; VWNC NC
>>  > > > Subject: Re: [vwnc] Z-order and occlusion
>>  > > >
>>  > > >
>>  > > > On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>>  > > >
>>  > > > > I thought I already replied to this, but it isn't posted. :-/
>>  > > > >
>>  > > > > I'm not really sure what you mean by "use invalidate". If you
>>  > > > > still have that GraphPanePart example I sent you, that is the
>>  > > > > widget I am placing other widgets on top of. If I'm doing any
>>  > > > > particular thing wrong in that implementation, please toss your
>>  > thoughts my way.
>>  > > > >
>>  > > > > Maybe this is the perfect opportunity to post about the proper
>>  > > > > use of invalidated and isOccluded on that blog you are starting.
>>  > > > > ;-)
>>  > > >
>>  > > >
>>  > > > See "Redisplay all or Part of a View" in the GUI Dev Guide.
>>  > > >
>>  > > > It's pretty straightforward actually.
>>  > > >
>>  > > > A VW widget implements a #displayOn: method where it should use
>>  > > > the
>>  > > GC
>>  > > > handed to it to do all of its drawing. It should use that GC, not
>>  > > > another,
>>  > > and
>>  > > > shouldn't store the GC for later use.
>>  > > >
>>  > > > When you want all or part of a widget to be redrawn, you should
>>  > > > send #invalidate to it. For complex views, if it's easy to compute
>>  > > > a region of change, you can use invalidateRectangle: to restrict
>>  > > > the
>>  scope of
>>  > change.
>>  > > >
>>  > > > If you're stepping outside of those bounds, then you've decided
>>  > > > you know better than the framework and get to manage it yourself.
>>  > > > :)
>>  > > >
>>  > > > Side note. I really wish people wouldn't use the
>>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
>>  > > > need
>>  > > to.
>>  > > > It may go away, or at least become moot in the future.
>>  > > >
>>  > > > --
>>  > > > Travis Griggs
>>  > > > Objologist
>>  > > > I multiply all time estimates by pi, to account for running around
>>  > > > in
>>  > > circles.
>>  > > >
>>  > > >
>>  > > >
>>  > > >
>>  > > > _______________________________________________
>>  > > > vwnc mailing list
>>  > > > [hidden email] <mailto:[hidden email]>
>>  > > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>  > >
>>  > >
>>  > >
>>  > > _______________________________________________
>>  > > vwnc mailing list
>>  > > [hidden email] <mailto:[hidden email]>
>>  > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>  > >
>>  >
>>  >
>>  > _______________________________________________
>>  > vwnc mailing list
>>  > [hidden email] <mailto:[hidden email]>
>>  > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>
>>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email] <mailto:[hidden email]>
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> ----------------------------------------
> This message is intended for a particular addressee only and may contain
> business or company secrets. If you have received this email in error,
> please contact the sender and delete the message immediately. Any use of
> this email, including saving, publishing, copying, replication or
> forwarding of the message or the contents is not permitted.
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Dave Stevenson-3
I would never mess with window process' priorities. They should stay where they are relative to interrupt, input (& etc) process priorities.
 
But you can fork the process below the window process priority:
 
    forkedProcess := [self doStuff] forkAt: Processor userBackgroundPriority.
 
or:
    forkedProcess := [self doStuff] forkAt: Processor userSchedulingPriority - 1.
 
Or, if for some reason it must be equal in priority, periodically #yield. Or, if for some reason it must be higher in priority (say, Processor userSchedulingPriority + 1), periodically do something like the following in the forked process:
 
    Processor activeProcess priority: Processor userSchedulingPriority.
    Processor activeProcess yield.
    Processor activeProcess priority: Processor userSchedulingPriority + 1.
 
or maybe just do the following from the forked process:
 
    [myUI mainWindow displayPendingInvalidation] uiEventNow
 
Or, if there is no way to do something periodically in the high priority forked process, you could have a higher priority process periodically wake up (from a delay) and suspend it. But if the forked process can periodically yield or be suspended without harm, there's probably no reason to have it at or above the UI process priority in the first place. Just fork it at 'Processor userBackgroundPriority', or 'Processor userSchedulingPriority - 1', or some such.
 
Dave Stevenson
[hidden email]



From: Andres Valloud <[hidden email]>
To: VWNC <[hidden email]>
Sent: Mon, November 14, 2011 7:02:36 AM
Subject: Re: [vwnc] Z-order and occlusion

Is there anything better than raising the priority of the window process
to ensure regular processes don't preempt window updating?

On 11/14/2011 4:45 AM, Terry Raymond wrote:

> Also, you should look at the section entitled “Window Processes” on page
> 3-6 of the GUIDevGuide.
>
> A simple guideline would be;  any background processes, i.e. one you
> created via a fork or new process,
>
> must use a form of #uiEventFor: when updating the state of an object
> that can be displayed.
>
> Code that is responding to a user input, i.e. a mouse action or key
> press, is executing in the window process
>
> and does not use #uiEventFor:.
>
> Terry
>
> ===========================================================
>
> Terry Raymond
>
> Crafted Smalltalk
>
> 80 Lazywood Ln.
>
> Tiverton, RI 02878
>
> (401) 624-4517 [hidden email]
>
> ===========================================================
>
> *From:*Christian Haider [mailto:[hidden email]]
> *Sent:* Monday, November 14, 2011 5:54 AM
> *To:* [hidden email]
> *Cc:* [hidden email]
> *Subject:* AW: Re: [vwnc] Z-order and occlusion
>
> Hello,
>
> I just searched through the docs which came with vw7.8 and found 2
> places where this is discussed:
>
> In the ReleaseNotes7.1.pdf (I am amazed that this change is that old…)
> on page 15 and 16 “Deferred and Background UI Actions” and in the
> GUIDevGuide.pdf on page 3-7 and 3-8 “Yielding to Other Processes” and
> 3-22 to 3-24 “Adding an Event to the UI Event Queue”.
>
> To me the docs seem not too bad explaining the proper way of doing
> things… Maybe an explicit warning against using #invalidateNow and a
> comment in that method would be good.
>
> I remember vaguely that there was some discussion on the mailing lists
> at the time when the separate UI process was introduced…
>
> In essence I think that I should have known…
>
> Cheers,
>
> Christian
>
> *Von:*[hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] <mailto:[mailto:[hidden email]]>
> *Gesendet:* Montag, 14. November 2011 09:01
> *An:* [hidden email]
> <mailto:[hidden email]>; Christian Haider
> *Betreff:* WG: Re: [vwnc] Z-order and occlusion
>
> Hello Mr. Raymond and Mr. Haider.
> Sorry for the short interruption.
>
> The update mechanism by using the #uiEventFor: message sounds quite
> interesting. But I don't really get it, why and when I should use this
> practice.
> About what kind of events are you talking here?
>
> And Mr. Haider, regarding "the docs". Do you talk about the few pages in
> the VW GUI Developers guide? Or do you know a more detailed description?
>
> Thank you for your answers.
>
> Best regards,
> Tom Grünewald
>
> ________
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Softwareentwicklung/Software Development
>
> T o m G r ü n e w a l d
>
> 73446 Oberkochen, Germany
> tel: +49.7364.20-8541
> fax: +49.7364.20-4800
> email: [hidden email] <mailto:[hidden email]>
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl–Zeiss–Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Hermann Gerlinger
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Handelsregister: Amtsgericht Ulm, HRB 501561
> USt–IdNr.: DE 811 515 346
> ----- Weitergeleitet von Tom Gruenewald/Oberkochen/Zeiss/DE am
> 14.11.2011 08:36 -----
>
> *"Christian Haider" <[hidden email]
> <mailto:[hidden email]>>*
> Gesendet von: [hidden email] <mailto:[hidden email]>
>
> 08.11.2011 18:57
>
>    
>
> An
>
>    
>
> "VWNC NC" <[hidden email] <mailto:[hidden email]>>
>
> Kopie
>
>    
>
> Thema
>
>    
>
> Re: [vwnc] Z-order and occlusion
>
>    
>
>
> Hi Terry,
>
> Thanks! This actually work pretty well.
> I am embarrassed... and promise to read the docs again...
>
> Cheers,
> Christian
>
>>  -----Ursprüngliche Nachricht-----
>>  Von: Terry Raymond [mailto:[hidden email]]
>>  Gesendet: Dienstag, 8. November 2011 14:01
>>  An: Christian Haider; 'VWNC NC'
>>  Betreff: RE: [vwnc] Z-order and occlusion
>>
>>  Christian
>>
>>  First of all the replies should come back using #uiEventFor: , they
> should not
>>  do direct updates of the model/view state.
>>
>>  You should consider the state of the model and view as owned by the
>>  window process and any updates must be done as an asynchronous message
>>  using a variation of #uiEventFor:. The action being done in the ui
> block can do
>>  a simple invalidate which will result in the display being updated. If
> you are
>>  concerned about a background process starving the window process then
>>  you either elevate the priority of the window process or lower the
> priority of
>>  the background process.
>>
>>  Terry
>>
>>  ==========================================================
>>  =
>>  Terry Raymond
>>  Crafted Smalltalk
>>  80 Lazywood Ln.
>>  Tiverton, RI 02878
>>  (401) 624-4517 [hidden email]
> <mailto:[hidden email]>
>>  ==========================================================
>>  =
>>
>>  > -----Original Message-----
>>  > From: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] On
>>  > Behalf Of Christian Haider
>>  > Sent: Tuesday, November 08, 2011 6:54 AM
>>  > To: VWNC NC
>>  > Subject: Re: [vwnc] Z-order and occlusion
>>  >
>>  > I am using #invalidateNow for a feedback button and am a bit out of
>>  > imagination on how to do it differently (while I agree with the point
>>  > for
>>  most
>>  > other occasions).
>>  >
>>  > Scenario: I have a button on the toolbar which sends out a bunch of
>>  requests
>>  > asynchronously. Whenever a request comes back, I want to inform the
>>  > user on the number of outstanding requests by repainting the button
>>  > showing this number. (I do optimize painting by throwing away display
>>  > requests
>>  when
>>  > displaying is in progress). How could you do that with simply
>>  > invalidation
>>  -
>>  > almost nothing will be drawn since the UI doesn't get enough events
>>  > from the OS? Especially with feedback on asynchronous events, I don't
>>  > see any other way than to force a redraw...
>>  >
>>  > Cheers,
>>  > Christian
>>  >
>>  > > -----Ursprüngliche Nachricht-----
>>  > > Von: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] Im
>>  > > Auftrag von Terry Raymond
>>  > > Gesendet: Montag, 7. November 2011 23:01
>>  > > An: 'VWNC NC'
>>  > > Betreff: Re: [vwnc] Z-order and occlusion
>>  > >
>>  > >
>>  > > > Side note. I really wish people wouldn't use the
>>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
>>  > > > need
>>  > > to.
>>  > > > It may go away, or at least become moot in the future.
>>  > >
>>  > > +100
>>  > >
>>  > > IMHO no widgets should require immediate redisplay, all should
>>  > > retain enough state to display properly via deferred invalidate.
>>  > >
>>  > > Terry
>>  > >
>>  > >
>>  >
>>  ==========================================================
>>  > > =
>>  > > Terry Raymond
>>  > > Crafted Smalltalk
>>  > > 80 Lazywood Ln.
>>  > > Tiverton, RI 02878
>>  > > (401) 624-4517 [hidden email]
> <mailto:[hidden email]>
>>  > >
>>  >
>>  ==========================================================
>>  > > =
>>  > >
>>  > > > -----Original Message-----
>>  > > > From: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]]
>>  > On
>>  > > > Behalf Of Travis Griggs
>>  > > > Sent: Monday, November 07, 2011 1:55 PM
>>  > > > To: Carl Gundel; VWNC NC
>>  > > > Subject: Re: [vwnc] Z-order and occlusion
>>  > > >
>>  > > >
>>  > > > On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>>  > > >
>>  > > > > I thought I already replied to this, but it isn't posted. :-/
>>  > > > >
>>  > > > > I'm not really sure what you mean by "use invalidate". If you
>>  > > > > still have that GraphPanePart example I sent you, that is the
>>  > > > > widget I am placing other widgets on top of. If I'm doing any
>>  > > > > particular thing wrong in that implementation, please toss your
>>  > thoughts my way.
>>  > > > >
>>  > > > > Maybe this is the perfect opportunity to post about the proper
>>  > > > > use of invalidated and isOccluded on that blog you are starting.
>>  > > > > ;-)
>>  > > >
>>  > > >
>>  > > > See "Redisplay all or Part of a View" in the GUI Dev Guide.
>>  > > >
>>  > > > It's pretty straightforward actually.
>>  > > >
>>  > > > A VW widget implements a #displayOn: method where it should use
>>  > > > the
>>  > > GC
>>  > > > handed to it to do all of its drawing. It should use that GC, not
>>  > > > another,
>>  > > and
>>  > > > shouldn't store the GC for later use.
>>  > > >
>>  > > > When you want all or part of a widget to be redrawn, you should
>>  > > > send #invalidate to it. For complex views, if it's easy to compute
>>  > > > a region of change, you can use invalidateRectangle: to restrict
>>  > > > the
>>  scope of
>>  > change.
>>  > > >
>>  > > > If you're stepping outside of those bounds, then you've decided
>>  > > > you know better than the framework and get to manage it yourself.
>>  > > > :)
>>  > > >
>>  > > > Side note. I really wish people wouldn't use the
>>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
>>  > > > need
>>  > > to.
>>  > > > It may go away, or at least become moot in the future.
>>  > > >
>>  > > > --
>>  > > > Travis Griggs
>>  > > > Objologist
>>  > > > I multiply all time estimates by pi, to account for running around
>>  > > > in
>>  > > circles.
>>  > > >
>>  > > >
>>  > > >
>>  > > >
>>  > > > _______________________________________________
>>  > > > vwnc mailing list
>>  > > > [hidden email] <mailto:[hidden email]>
>>  > > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>  > >
>>  > >
>>  > >
>>  > > _______________________________________________
>>  > > vwnc mailing list
>>  > > [hidden email] <mailto:[hidden email]>
>>  > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>  > >
>>  >
>>  >
>>  > _______________________________________________
>>  > vwnc mailing list
>>  > [hidden email] <mailto:[hidden email]>
>>  > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>
>>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email] <mailto:[hidden email]>
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> ----------------------------------------
> This message is intended for a particular addressee only and may contain
> business or company secrets. If you have received this email in error,
> please contact the sender and delete the message immediately. Any use of
> this email, including saving, publishing, copying, replication or
> forwarding of the message or the contents is not permitted.
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Dave Stevenson-3
By the way, I took "regular processes" to mean processes forked by your application. If your app doesn't fork processes, then I would consider the UI processes to be the "regular processes" in VW.
 
Dave Stevenson
[hidden email]



From: Dave Stevenson <[hidden email]>
To: Andres Valloud <[hidden email]>; VWNC <[hidden email]>
Sent: Mon, November 14, 2011 9:03:27 AM
Subject: Re: [vwnc] Z-order and occlusion

I would never mess with window process' priorities. They should stay where they are relative to interrupt, input (& etc) process priorities.
 
But you can fork the process below the window process priority:
 
    forkedProcess := [self doStuff] forkAt: Processor userBackgroundPriority.
 
or:
    forkedProcess := [self doStuff] forkAt: Processor userSchedulingPriority - 1.
 
Or, if for some reason it must be equal in priority, periodically #yield. Or, if for some reason it must be higher in priority (say, Processor userSchedulingPriority + 1), periodically do something like the following in the forked process:
 
    Processor activeProcess priority: Processor userSchedulingPriority.
    Processor activeProcess yield.
    Processor activeProcess priority: Processor userSchedulingPriority + 1.
 
or maybe just do the following from the forked process:
 
    [myUI mainWindow displayPendingInvalidation] uiEventNow
 
Or, if there is no way to do something periodically in the high priority forked process, you could have a higher priority process periodically wake up (from a delay) and suspend it. But if the forked process can periodically yield or be suspended without harm, there's probably no reason to have it at or above the UI process priority in the first place. Just fork it at 'Processor userBackgroundPriority', or 'Processor userSchedulingPriority - 1', or some such.
 
Dave Stevenson
[hidden email]



From: Andres Valloud <[hidden email]>
To: VWNC <[hidden email]>
Sent: Mon, November 14, 2011 7:02:36 AM
Subject: Re: [vwnc] Z-order and occlusion

Is there anything better than raising the priority of the window process
to ensure regular processes don't preempt window updating?

On 11/14/2011 4:45 AM, Terry Raymond wrote:

> Also, you should look at the section entitled “Window Processes” on page
> 3-6 of the GUIDevGuide.
>
> A simple guideline would be;  any background processes, i.e. one you
> created via a fork or new process,
>
> must use a form of #uiEventFor: when updating the state of an object
> that can be displayed.
>
> Code that is responding to a user input, i.e. a mouse action or key
> press, is executing in the window process
>
> and does not use #uiEventFor:.
>
> Terry
>
> ===========================================================
>
> Terry Raymond
>
> Crafted Smalltalk
>
> 80 Lazywood Ln.
>
> Tiverton, RI 02878
>
> (401) 624-4517 [hidden email]
>
> ===========================================================
>
> *From:*Christian Haider [mailto:[hidden email]]
> *Sent:* Monday, November 14, 2011 5:54 AM
> *To:* [hidden email]
> *Cc:* [hidden email]
> *Subject:* AW: Re: [vwnc] Z-order and occlusion
>
> Hello,
>
> I just searched through the docs which came with vw7.8 and found 2
> places where this is discussed:
>
> In the ReleaseNotes7.1.pdf (I am amazed that this change is that old…)
> on page 15 and 16 “Deferred and Background UI Actions” and in the
> GUIDevGuide.pdf on page 3-7 and 3-8 “Yielding to Other Processes” and
> 3-22 to 3-24 “Adding an Event to the UI Event Queue”.
>
> To me the docs seem not too bad explaining the proper way of doing
> things… Maybe an explicit warning against using #invalidateNow and a
> comment in that method would be good.
>
> I remember vaguely that there was some discussion on the mailing lists
> at the time when the separate UI process was introduced…
>
> In essence I think that I should have known…
>
> Cheers,
>
> Christian
>
> *Von:*[hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] <mailto:[mailto:[hidden email]]>
> *Gesendet:* Montag, 14. November 2011 09:01
> *An:* [hidden email]
> <mailto:[hidden email]>; Christian Haider
> *Betreff:* WG: Re: [vwnc] Z-order and occlusion
>
> Hello Mr. Raymond and Mr. Haider.
> Sorry for the short interruption.
>
> The update mechanism by using the #uiEventFor: message sounds quite
> interesting. But I don't really get it, why and when I should use this
> practice.
> About what kind of events are you talking here?
>
> And Mr. Haider, regarding "the docs". Do you talk about the few pages in
> the VW GUI Developers guide? Or do you know a more detailed description?
>
> Thank you for your answers.
>
> Best regards,
> Tom Grünewald
>
> ________
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Softwareentwicklung/Software Development
>
> T o m G r ü n e w a l d
>
> 73446 Oberkochen, Germany
> tel: +49.7364.20-8541
> fax: +49.7364.20-4800
> email: [hidden email] <mailto:[hidden email]>
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl–Zeiss–Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Hermann Gerlinger
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Handelsregister: Amtsgericht Ulm, HRB 501561
> USt–IdNr.: DE 811 515 346
> ----- Weitergeleitet von Tom Gruenewald/Oberkochen/Zeiss/DE am
> 14.11.2011 08:36 -----
>
> *"Christian Haider" <[hidden email]
> <mailto:[hidden email]>>*
> Gesendet von: [hidden email] <mailto:[hidden email]>
>
> 08.11.2011 18:57
>
>    
>
> An
>
>    
>
> "VWNC NC" <[hidden email] <mailto:[hidden email]>>
>
> Kopie
>
>    
>
> Thema
>
>    
>
> Re: [vwnc] Z-order and occlusion
>
>    
>
>
> Hi Terry,
>
> Thanks! This actually work pretty well.
> I am embarrassed... and promise to read the docs again...
>
> Cheers,
> Christian
>
>>  -----Ursprüngliche Nachricht-----
>>  Von: Terry Raymond [mailto:[hidden email]]
>>  Gesendet: Dienstag, 8. November 2011 14:01
>>  An: Christian Haider; 'VWNC NC'
>>  Betreff: RE: [vwnc] Z-order and occlusion
>>
>>  Christian
>>
>>  First of all the replies should come back using #uiEventFor: , they
> should not
>>  do direct updates of the model/view state.
>>
>>  You should consider the state of the model and view as owned by the
>>  window process and any updates must be done as an asynchronous message
>>  using a variation of #uiEventFor:. The action being done in the ui
> block can do
>>  a simple invalidate which will result in the display being updated. If
> you are
>>  concerned about a background process starving the window process then
>>  you either elevate the priority of the window process or lower the
> priority of
>>  the background process.
>>
>>  Terry
>>
>>  ==========================================================
>>  =
>>  Terry Raymond
>>  Crafted Smalltalk
>>  80 Lazywood Ln.
>>  Tiverton, RI 02878
>>  (401) 624-4517 [hidden email]
> <mailto:[hidden email]>
>>  ==========================================================
>>  =
>>
>>  > -----Original Message-----
>>  > From: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] On
>>  > Behalf Of Christian Haider
>>  > Sent: Tuesday, November 08, 2011 6:54 AM
>>  > To: VWNC NC
>>  > Subject: Re: [vwnc] Z-order and occlusion
>>  >
>>  > I am using #invalidateNow for a feedback button and am a bit out of
>>  > imagination on how to do it differently (while I agree with the point
>>  > for
>>  most
>>  > other occasions).
>>  >
>>  > Scenario: I have a button on the toolbar which sends out a bunch of
>>  requests
>>  > asynchronously. Whenever a request comes back, I want to inform the
>>  > user on the number of outstanding requests by repainting the button
>>  > showing this number. (I do optimize painting by throwing away display
>>  > requests
>>  when
>>  > displaying is in progress). How could you do that with simply
>>  > invalidation
>>  -
>>  > almost nothing will be drawn since the UI doesn't get enough events
>>  > from the OS? Especially with feedback on asynchronous events, I don't
>>  > see any other way than to force a redraw...
>>  >
>>  > Cheers,
>>  > Christian
>>  >
>>  > > -----Ursprüngliche Nachricht-----
>>  > > Von: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]] Im
>>  > > Auftrag von Terry Raymond
>>  > > Gesendet: Montag, 7. November 2011 23:01
>>  > > An: 'VWNC NC'
>>  > > Betreff: Re: [vwnc] Z-order and occlusion
>>  > >
>>  > >
>>  > > > Side note. I really wish people wouldn't use the
>>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
>>  > > > need
>>  > > to.
>>  > > > It may go away, or at least become moot in the future.
>>  > >
>>  > > +100
>>  > >
>>  > > IMHO no widgets should require immediate redisplay, all should
>>  > > retain enough state to display properly via deferred invalidate.
>>  > >
>>  > > Terry
>>  > >
>>  > >
>>  >
>>  ==========================================================
>>  > > =
>>  > > Terry Raymond
>>  > > Crafted Smalltalk
>>  > > 80 Lazywood Ln.
>>  > > Tiverton, RI 02878
>>  > > (401) 624-4517 [hidden email]
> <mailto:[hidden email]>
>>  > >
>>  >
>>  ==========================================================
>>  > > =
>>  > >
>>  > > > -----Original Message-----
>>  > > > From: [hidden email] <mailto:[hidden email]>
> [mailto:[hidden email]]
>>  > On
>>  > > > Behalf Of Travis Griggs
>>  > > > Sent: Monday, November 07, 2011 1:55 PM
>>  > > > To: Carl Gundel; VWNC NC
>>  > > > Subject: Re: [vwnc] Z-order and occlusion
>>  > > >
>>  > > >
>>  > > > On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
>>  > > >
>>  > > > > I thought I already replied to this, but it isn't posted. :-/
>>  > > > >
>>  > > > > I'm not really sure what you mean by "use invalidate". If you
>>  > > > > still have that GraphPanePart example I sent you, that is the
>>  > > > > widget I am placing other widgets on top of. If I'm doing any
>>  > > > > particular thing wrong in that implementation, please toss your
>>  > thoughts my way.
>>  > > > >
>>  > > > > Maybe this is the perfect opportunity to post about the proper
>>  > > > > use of invalidated and isOccluded on that blog you are starting.
>>  > > > > ;-)
>>  > > >
>>  > > >
>>  > > > See "Redisplay all or Part of a View" in the GUI Dev Guide.
>>  > > >
>>  > > > It's pretty straightforward actually.
>>  > > >
>>  > > > A VW widget implements a #displayOn: method where it should use
>>  > > > the
>>  > > GC
>>  > > > handed to it to do all of its drawing. It should use that GC, not
>>  > > > another,
>>  > > and
>>  > > > shouldn't store the GC for later use.
>>  > > >
>>  > > > When you want all or part of a widget to be redrawn, you should
>>  > > > send #invalidate to it. For complex views, if it's easy to compute
>>  > > > a region of change, you can use invalidateRectangle: to restrict
>>  > > > the
>>  scope of
>>  > change.
>>  > > >
>>  > > > If you're stepping outside of those bounds, then you've decided
>>  > > > you know better than the framework and get to manage it yourself.
>>  > > > :)
>>  > > >
>>  > > > Side note. I really wish people wouldn't use the
>>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
>>  > > > need
>>  > > to.
>>  > > > It may go away, or at least become moot in the future.
>>  > > >
>>  > > > --
>>  > > > Travis Griggs
>>  > > > Objologist
>>  > > > I multiply all time estimates by pi, to account for running around
>>  > > > in
>>  > > circles.
>>  > > >
>>  > > >
>>  > > >
>>  > > >
>>  > > > _______________________________________________
>>  > > > vwnc mailing list
>>  > > > [hidden email] <mailto:[hidden email]>
>>  > > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>  > >
>>  > >
>>  > >
>>  > > _______________________________________________
>>  > > vwnc mailing list
>>  > > [hidden email] <mailto:[hidden email]>
>>  > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>  > >
>>  >
>>  >
>>  > _______________________________________________
>>  > vwnc mailing list
>>  > [hidden email] <mailto:[hidden email]>
>>  > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>
>>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email] <mailto:[hidden email]>
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> ----------------------------------------
> This message is intended for a particular addressee only and may contain
> business or company secrets. If you have received this email in error,
> please contact the sender and delete the message immediately. Any use of
> this email, including saving, publishing, copying, replication or
> forwarding of the message or the contents is not permitted.
>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Z-order and occlusion

Terry Raymond
In reply to this post by Andres Valloud-6
Andres

I assume by your comment you really are referring to the possibility of a
background process starving the window process and not with multiple
processes accessing the same data.

For the most part we lower the priority of our background processes, however
for some of our progress-like-dialogs we raise the priority to 51. You can
safely raise the window process priority up to UserInterruptPriority - 2.

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
===========================================================

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Andres Valloud
> Sent: Monday, November 14, 2011 8:03 AM
> To: VWNC
> Subject: Re: [vwnc] Z-order and occlusion
>
> Is there anything better than raising the priority of the window process
to

> ensure regular processes don't preempt window updating?
>
> On 11/14/2011 4:45 AM, Terry Raymond wrote:
> > Also, you should look at the section entitled “Window Processes” on
> > page
> > 3-6 of the GUIDevGuide.
> >
> > A simple guideline would be;  any background processes, i.e. one you
> > created via a fork or new process,
> >
> > must use a form of #uiEventFor: when updating the state of an object
> > that can be displayed.
> >
> > Code that is responding to a user input, i.e. a mouse action or key
> > press, is executing in the window process
> >
> > and does not use #uiEventFor:.
> >
> > Terry
> >
> >
> ==========================================================
> =
> >
> > Terry Raymond
> >
> > Crafted Smalltalk
> >
> > 80 Lazywood Ln.
> >
> > Tiverton, RI 02878
> >
> > (401) 624-4517 [hidden email]
> >
> >
> ==========================================================
> =
> >
> > *From:*Christian Haider
> > [mailto:[hidden email]]
> > *Sent:* Monday, November 14, 2011 5:54 AM
> > *To:* [hidden email]
> > *Cc:* [hidden email]
> > *Subject:* AW: Re: [vwnc] Z-order and occlusion
> >
> > Hello,
> >
> > I just searched through the docs which came with vw7.8 and found 2
> > places where this is discussed:
> >
> > In the ReleaseNotes7.1.pdf (I am amazed that this change is that old…)
> > on page 15 and 16 “Deferred and Background UI Actions” and in the
> > GUIDevGuide.pdf on page 3-7 and 3-8 “Yielding to Other Processes” and
> > 3-22 to 3-24 “Adding an Event to the UI Event Queue”.
> >
> > To me the docs seem not too bad explaining the proper way of doing
> > things… Maybe an explicit warning against using #invalidateNow and a
> > comment in that method would be good.
> >
> > I remember vaguely that there was some discussion on the mailing lists
> > at the time when the separate UI process was introduced…
> >
> > In essence I think that I should have known…
> >
> > Cheers,
> >
> > Christian
> >
> > *Von:*[hidden email] <mailto:[hidden email]>
> > [mailto:[hidden email]] <mailto:[mailto:[hidden email]]>
> > *Gesendet:* Montag, 14. November 2011 09:01
> > *An:* [hidden email]
> > <mailto:[hidden email]>; Christian Haider
> > *Betreff:* WG: Re: [vwnc] Z-order and occlusion
> >
> > Hello Mr. Raymond and Mr. Haider.
> > Sorry for the short interruption.
> >
> > The update mechanism by using the #uiEventFor: message sounds quite
> > interesting. But I don't really get it, why and when I should use this
> > practice.
> > About what kind of events are you talking here?
> >
> > And Mr. Haider, regarding "the docs". Do you talk about the few pages
> > in the VW GUI Developers guide? Or do you know a more detailed
> description?
> >
> > Thank you for your answers.
> >
> > Best regards,
> > Tom Grünewald
> >
> > ________
> >
> > Carl Zeiss Industrielle Messtechnik GmbH Softwareentwicklung/Software
> > Development
> >
> > T o m G r ü n e w a l d
> >
> > 73446 Oberkochen, Germany
> > tel: +49.7364.20-8541
> > fax: +49.7364.20-4800
> > email: [hidden email] <mailto:[hidden email]>
> > http://www.zeiss.de/imt
> >
> > Carl Zeiss Industrielle Messtechnik GmbH Carl–Zeiss–Straße 22, 73447
> > Oberkochen
> > Aufsichtsratsvorsitzender: Dr. Hermann Gerlinger
> > Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger Sitz
> > der Gesellschaft: 73446 Oberkochen, Deutschland
> > Handelsregister: Amtsgericht Ulm, HRB 501561
> > USt–IdNr.: DE 811 515 346
> > ----- Weitergeleitet von Tom Gruenewald/Oberkochen/Zeiss/DE am
> > 14.11.2011 08:36 -----
> >
> > *"Christian Haider" <[hidden email]
> > <mailto:[hidden email]>>*
> > Gesendet von: [hidden email]
> > <mailto:[hidden email]>
> >
> > 08.11.2011 18:57
> >
> >
> >
> > An
> >
> >
> >
> > "VWNC NC" <[hidden email] <mailto:[hidden email]>>
> >
> > Kopie
> >
> >
> >
> > Thema
> >
> >
> >
> > Re: [vwnc] Z-order and occlusion
> >
> >
> >
> >
> > Hi Terry,
> >
> > Thanks! This actually work pretty well.
> > I am embarrassed... and promise to read the docs again...
> >
> > Cheers,
> > Christian
> >
> >>  -----Ursprüngliche Nachricht-----
> >>  Von: Terry Raymond [mailto:[hidden email]]
> >>  Gesendet: Dienstag, 8. November 2011 14:01
> >>  An: Christian Haider; 'VWNC NC'
> >>  Betreff: RE: [vwnc] Z-order and occlusion
> >>
> >>  Christian
> >>
> >>  First of all the replies should come back using #uiEventFor: , they
> > should not
> >>  do direct updates of the model/view state.
> >>
> >>  You should consider the state of the model and view as owned by the
> >> window process and any updates must be done as an asynchronous
> >> message  using a variation of #uiEventFor:. The action being done in
> >> the ui
> > block can do
> >>  a simple invalidate which will result in the display being updated.
> >> If
> > you are
> >>  concerned about a background process starving the window process
> >> then  you either elevate the priority of the window process or lower
> >> the
> > priority of
> >>  the background process.
> >>
> >>  Terry
> >>
> >>
> ==========================================================
> >>  =
> >>  Terry Raymond
> >>  Crafted Smalltalk
> >>  80 Lazywood Ln.
> >>  Tiverton, RI 02878
> >>  (401) 624-4517 [hidden email]
> > <mailto:[hidden email]>
> >>
> ==========================================================
> >>  =
> >>
> >>  > -----Original Message-----
> >>  > From: [hidden email] <mailto:vwnc-
> [hidden email]>
> > [mailto:[hidden email]] On
> >>  > Behalf Of Christian Haider
> >>  > Sent: Tuesday, November 08, 2011 6:54 AM  > To: VWNC NC  >
> >> Subject: Re: [vwnc] Z-order and occlusion  >  > I am using
> >> #invalidateNow for a feedback button and am a bit out of  >
> >> imagination on how to do it differently (while I agree with the point
> >> > for  most  > other occasions).
> >>  >
> >>  > Scenario: I have a button on the toolbar which sends out a bunch
> >> of  requests  > asynchronously. Whenever a request comes back, I want
> >> to inform the  > user on the number of outstanding requests by
> >> repainting the button  > showing this number. (I do optimize painting
> >> by throwing away display  > requests  when  > displaying is in
> >> progress). How could you do that with simply  > invalidation
> >>  -
> >>  > almost nothing will be drawn since the UI doesn't get enough
> >> events  > from the OS? Especially with feedback on asynchronous
> >> events, I don't  > see any other way than to force a redraw...
> >>  >
> >>  > Cheers,
> >>  > Christian
> >>  >
> >>  > > -----Ursprüngliche Nachricht-----  > > Von:
> >> [hidden email] <mailto:[hidden email]>
> > [mailto:[hidden email]] Im
> >>  > > Auftrag von Terry Raymond
> >>  > > Gesendet: Montag, 7. November 2011 23:01  > > An: 'VWNC NC'
> >>  > > Betreff: Re: [vwnc] Z-order and occlusion  > >  > >  > > > Side
> >> note. I really wish people wouldn't use the  > > >
> >> #invalidateRectangle:andRepairNow: true unless they're sure they  > >
> >> > need  > > to.
> >>  > > > It may go away, or at least become moot in the future.
> >>  > >
> >>  > > +100
> >>  > >
> >>  > > IMHO no widgets should require immediate redisplay, all should
> >> > > retain enough state to display properly via deferred invalidate.
> >>  > >
> >>  > > Terry
> >>  > >
> >>  > >
> >>  >
> >>
> ==========================================================
> >>  > > =
> >>  > > Terry Raymond
> >>  > > Crafted Smalltalk
> >>  > > 80 Lazywood Ln.
> >>  > > Tiverton, RI 02878
> >>  > > (401) 624-4517 [hidden email]
> > <mailto:[hidden email]>
> >>  > >
> >>  >
> >>
> ==========================================================
> >>  > > =
> >>  > >
> >>  > > > -----Original Message-----
> >>  > > > From: [hidden email] <mailto:vwnc-
> [hidden email]>
> > [mailto:[hidden email]]
> >>  > On
> >>  > > > Behalf Of Travis Griggs
> >>  > > > Sent: Monday, November 07, 2011 1:55 PM
> >>  > > > To: Carl Gundel; VWNC NC
> >>  > > > Subject: Re: [vwnc] Z-order and occlusion
> >>  > > >
> >>  > > >
> >>  > > > On Nov 7, 2011, at 9:54 AM, Carl Gundel wrote:
> >>  > > >
> >>  > > > > I thought I already replied to this, but it isn't posted. :-/
> >>  > > > >
> >>  > > > > I'm not really sure what you mean by "use invalidate". If you
> >>  > > > > still have that GraphPanePart example I sent you, that is the
> >>  > > > > widget I am placing other widgets on top of. If I'm doing any
> >>  > > > > particular thing wrong in that implementation, please toss
your
> >>  > thoughts my way.
> >>  > > > >
> >>  > > > > Maybe this is the perfect opportunity to post about the proper
> >>  > > > > use of invalidated and isOccluded on that blog you are
starting.

> >>  > > > > ;-)
> >>  > > >
> >>  > > >
> >>  > > > See "Redisplay all or Part of a View" in the GUI Dev Guide.
> >>  > > >
> >>  > > > It's pretty straightforward actually.
> >>  > > >
> >>  > > > A VW widget implements a #displayOn: method where it should use
> >>  > > > the
> >>  > > GC
> >>  > > > handed to it to do all of its drawing. It should use that GC,
not
> >>  > > > another,
> >>  > > and
> >>  > > > shouldn't store the GC for later use.
> >>  > > >
> >>  > > > When you want all or part of a widget to be redrawn, you should
> >>  > > > send #invalidate to it. For complex views, if it's easy to
compute
> >>  > > > a region of change, you can use invalidateRectangle: to restrict
> >>  > > > the
> >>  scope of
> >>  > change.
> >>  > > >
> >>  > > > If you're stepping outside of those bounds, then you've decided
> >>  > > > you know better than the framework and get to manage it
yourself.

> >>  > > > :)
> >>  > > >
> >>  > > > Side note. I really wish people wouldn't use the
> >>  > > > #invalidateRectangle:andRepairNow: true unless they're sure they
> >>  > > > need
> >>  > > to.
> >>  > > > It may go away, or at least become moot in the future.
> >>  > > >
> >>  > > > --
> >>  > > > Travis Griggs
> >>  > > > Objologist
> >>  > > > I multiply all time estimates by pi, to account for running
around

> >>  > > > in
> >>  > > circles.
> >>  > > >
> >>  > > >
> >>  > > >
> >>  > > >
> >>  > > > _______________________________________________
> >>  > > > vwnc mailing list
> >>  > > > [hidden email] <mailto:[hidden email]>
> >>  > > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >>  > >
> >>  > >
> >>  > >
> >>  > > _______________________________________________
> >>  > > vwnc mailing list
> >>  > > [hidden email] <mailto:[hidden email]>
> >>  > > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >>  > >
> >>  >
> >>  >
> >>  > _______________________________________________
> >>  > vwnc mailing list
> >>  > [hidden email] <mailto:[hidden email]>
> >>  > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >>
> >>
> >>
> >
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email] <mailto:[hidden email]>
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >
> >
> > ----------------------------------------
> > This message is intended for a particular addressee only and may contain
> > business or company secrets. If you have received this email in error,
> > please contact the sender and delete the message immediately. Any use of
> > this email, including saving, publishing, copying, replication or
> > forwarding of the message or the contents is not permitted.
> >
> >
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
12