[vwnc] Aragon Dataset with dynamic column width

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

[vwnc] Aragon Dataset with dynamic column width

Dziedzic, Peter

 Hello,

I have a problem and i dont know how to solve it.
i use a Aragon Dataset and i want to have a dynamic column-size of the dataset.
i want that when the user makes the window bigger (= resize) then the dataset and each of its columns should become proportional bigger.
in default only the dataset becomes bigger. but the columns still have the same size.

maybe some did this already and knows a good solution?
thanks for your help.

best regards,

Peter
--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




----------------------------------------
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: [vwnc] Aragon Dataset with dynamic column width

Rob Vens-2
This is how I did this. In your application, add this code:

postBuildWith: aBuilder 

super postBuildWith: aBuilder.
...
aBuilder window 
whenAny: #(#bounds)
send: #windowHasResized
to: self

Then you need to implement the following method in your application, of course depending on your dataset your column size determination algorithm will differ.

windowHasResized
| yourWidget |
(self wrapperAt: #yourView) isNil 
ifFalse: 
[yourWidget := self widgetAt: #yourView.
yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
yourWidget invalidateRectangle: yourWidget bounds repairNow: true]

or something similar. I do this a bit differently, because I have embedded applications (subcanvases) but this just means delegating the windowHasResized message to the subcanvas.
Success!


2009/4/23 Dziedzic, Peter <[hidden email]>

 Hello,

I have a problem and i dont know how to solve it.
i use a Aragon Dataset and i want to have a dynamic column-size of the dataset.
i want that when the user makes the window bigger (= resize) then the dataset and each of its columns should become proportional bigger.
in default only the dataset becomes bigger. but the columns still have the same size.

maybe some did this already and knows a good solution?
thanks for your help.

best regards,

Peter
--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




----------------------------------------
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
|

[vwnc] Antwort: Re: Aragon Dataset with dynamic column width

Dziedzic, Peter

hello,

thanks for your solution.
this solution works very nice.
but i have one "little" problem with this solution.
when i change the size of the window then i get the bounds-event very often.
therefore my windowHasResized-method will be called very often and sometimes the column-width will be refreshed quite often.
do you know a  solution for this problem too?


best regards,

Peter

--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346





Rob Vens <[hidden email]>
Gesendet von: [hidden email]

23.04.2009 11:47

An
"Dziedzic, Peter" <[hidden email]>
Kopie
[hidden email]
Thema
Re: [vwnc] Aragon Dataset with dynamic column width





This is how I did this. In your application, add this code:

postBuildWith: aBuilder 

super postBuildWith: aBuilder.
...
aBuilder window 
whenAny: #(#bounds)
send: #windowHasResized
to: self

Then you need to implement the following method in your application, of course depending on your dataset your column size determination algorithm will differ.

windowHasResized
| yourWidget |
(self wrapperAt: #yourView) isNil 
ifFalse: 
[yourWidget := self widgetAt: #yourView.
yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
yourWidget invalidateRectangle: yourWidget bounds repairNow: true]

or something similar. I do this a bit differently, because I have embedded applications (subcanvases) but this just means delegating the windowHasResized message to the subcanvas.
Success!


2009/4/23 Dziedzic, Peter <p.dziedzic@...>

 Hello,


I have a problem and i dont know how to solve it.
i use a Aragon Dataset and i want to have a dynamic column-size of the dataset.
i want that when the user makes the window bigger (= resize) then the dataset and each of its columns should become proportional bigger.
in default only the dataset becomes bigger. but the columns still have the same size.


maybe some did this already and knows a good solution?
thanks for your help.


best regards,

Peter
--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail:
p.dziedzic@...
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




----------------------------------------
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

vwnc@...
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: [vwnc] Aragon Dataset with dynamic column width

Rob Vens-2
A solution is to remember oldBounds and test whether the newBounds is different from oldBounds, and only refresh when there is a significant difference. I am sure there is a way to optimise this even further. I vaguely remember that bounds events can be collapsed, meaning that we only process the event when you are done resizing, not all the while when you are resizing a window. Anyone on the list can help us out with this?

2009/4/27 Dziedzic, Peter <[hidden email]>

hello,

thanks for your solution.
this solution works very nice.
but i have one "little" problem with this solution.
when i change the size of the window then i get the bounds-event very often.
therefore my windowHasResized-method will be called very often and sometimes the column-width will be refreshed quite often.
do you know a  solution for this problem too?



best regards,

Peter

--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346





Rob Vens <[hidden email]>
Gesendet von: [hidden email]

23.04.2009 11:47

An
"Dziedzic, Peter" <[hidden email]>
Kopie
[hidden email]
Thema
Re: [vwnc] Aragon Dataset with dynamic column width





This is how I did this. In your application, add this code:

postBuildWith: aBuilder 

super postBuildWith: aBuilder.
...
aBuilder window 
whenAny: #(#bounds)
send: #windowHasResized
to: self

Then you need to implement the following method in your application, of course depending on your dataset your column size determination algorithm will differ.

windowHasResized
| yourWidget |
(self wrapperAt: #yourView) isNil 
ifFalse: 
[yourWidget := self widgetAt: #yourView.
yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
yourWidget invalidateRectangle: yourWidget bounds repairNow: true]

or something similar. I do this a bit differently, because I have embedded applications (subcanvases) but this just means delegating the windowHasResized message to the subcanvas.
Success!


2009/4/23 Dziedzic, Peter <[hidden email]>

 Hello,


I have a problem and i dont know how to solve it.
i use a Aragon Dataset and i want to have a dynamic column-size of the dataset.
i want that when the user makes the window bigger (= resize) then the dataset and each of its columns should become proportional bigger.
in default only the dataset becomes bigger. but the columns still have the same size.


maybe some did this already and knows a good solution?
thanks for your help.


best regards,

Peter
--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail:
[hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




----------------------------------------
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




----------------------------------------
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: [vwnc] Aragon Dataset with dynamic column width

Steven Kelly

I use the #resize event, not #bounds; maybe #resize events are collapsed whereas #bounds are sent for each pixel?

 

An alternative possible workaround for Windows: Control Panel | Display | Appearance tab | Effects… | Show window contents while dragging: OFF.

 

Steve

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Vens
Sent: 27 April 2009 11:52
Cc: [hidden email]
Subject: Re: [vwnc] Aragon Dataset with dynamic column width

 

A solution is to remember oldBounds and test whether the newBounds is different from oldBounds, and only refresh when there is a significant difference. I am sure there is a way to optimise this even further. I vaguely remember that bounds events can be collapsed, meaning that we only process the event when you are done resizing, not all the while when you are resizing a window. Anyone on the list can help us out with this?

2009/4/27 Dziedzic, Peter <[hidden email]>


hello,

thanks for your solution.
this solution works very nice.
but i have one "little" problem with this solution.
when i change the size of the window then i get the bounds-event very often.
therefore my windowHasResized-method will be called very often and sometimes the column-width will be refreshed quite often.
do you know a  solution for this problem too?




best regards,

Peter

--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




Rob Vens <[hidden email]>
Gesendet von: [hidden email]

23.04.2009 11:47

An

"Dziedzic, Peter" <[hidden email]>

Kopie

[hidden email]

Thema

Re: [vwnc] Aragon Dataset with dynamic column width

 




This is how I did this. In your application, add this code:

postBuildWith: aBuilder 

super postBuildWith: aBuilder.
...
aBuilder window 
whenAny: #(#bounds)
send: #windowHasResized
to: self

Then you need to implement the following method in your application, of course depending on your dataset your column size determination algorithm will differ.

windowHasResized
| yourWidget |
(self wrapperAt: #yourView) isNil 
ifFalse: 
[yourWidget := self widgetAt: #yourView.
yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
yourWidget invalidateRectangle: yourWidget bounds repairNow: true]

or something similar. I do this a bit differently, because I have embedded applications (subcanvases) but this just means delegating the windowHasResized message to the subcanvas.
Success!


2009/4/23 Dziedzic, Peter <[hidden email]>

 Hello,


I have a problem and i dont know how to solve it.
i use a Aragon Dataset and i want to have a dynamic column-size of the dataset.
i want that when the user makes the window bigger (= resize) then the dataset and each of its columns should become proportional bigger.
in default only the dataset becomes bigger. but the columns still have the same size.


maybe some did this already and knows a good solution?
thanks for your help.


best regards,

Peter
--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail:
[hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




----------------------------------------
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




----------------------------------------
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
|

[vwnc] Antwort: Re: Aragon Dataset with dynamic column width

Dziedzic, Peter

hello,

i changed my code.
now i have the following 3 new methods:

1)
postBuildWith: aBuilder
        super postBuildWith: aBuilder.
        aBuilder window whenAny: #(#resize) send: #windowHasResized to: self

2)
windowHasResized
        "Method that delegates the window resize events to the subcanvas-object"        
        | aSubcanvasobject |
        "Does the subcanvas exist?"
        (self wrapperAt: #subc) notNil
                ifTrue:
                        ["Get the subcanvas-object"
                        aSubcanvasobject := self widgetAt: #subC.
                        aSubcanvasobject client notNil
                                ifTrue:
                                        [        "Delegate method call"
                                                aSubcanvasobject client windowHasResized.
                                        ]
                        ]


3)in the subcanvas-class:
windowHasResized
        "Add method to resize the columns when size of the window changed"        
        | aDatasetobject i maxColumn totalWidth columnWidth|
        (self wrapperAt: #theDataSet) isNil
                ifFalse:
                        [aDatasetobject := self widgetAt: #theDataSet.
                        i := 2.
                        "number of the highest column:"
                        maxColumn := 15.
                       
                        "calculate total width without first column which is the row selector"
                        totalWidth := aDatasetobject bounds width - 30.0.
               
                        "set column width of each column. The first column (= row selector)
                        will have always the size of 30 pixels"
                        columnWidth := (( totalWidth / ( maxColumn - 1))) asFloat asInteger.
                        [i <= maxColumn] whileTrue:
                                [
                                aDatasetobject
                                        resizeColumnAt: i
                                        width: columnWidth.
                                        i := i +1.
                                ].
                        aDatasetobject
                                invalidateRectangle: aDatasetobject bounds
                                repairNow: true]


when i use #bounds then i get the change-event very often.
but when i use #resize instead then i get the event when i make the window bigger. but i dont get the event when i make the window smaller again.
do you know a solution?

best regards,

Peter Dziedzic

--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346





"Steven Kelly" <[hidden email]>
Gesendet von: [hidden email]

27.04.2009 12:58

An
<[hidden email]>
Kopie
Thema
Re: [vwnc] Aragon Dataset with dynamic column width





I use the #resize event, not #bounds; maybe #resize events are collapsed whereas #bounds are sent for each pixel?
 
An alternative possible workaround for Windows: Control Panel | Display | Appearance tab | Effects… | Show window contents while dragging: OFF.
 
Steve
 
From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Vens
Sent:
27 April 2009 11:52
Cc:
[hidden email]
Subject:
Re: [vwnc] Aragon Dataset with dynamic column width

 
A solution is to remember oldBounds and test whether the newBounds is different from oldBounds, and only refresh when there is a significant difference. I am sure there is a way to optimise this even further. I vaguely remember that bounds events can be collapsed, meaning that we only process the event when you are done resizing, not all the while when you are resizing a window. Anyone on the list can help us out with this?
2009/4/27 Dziedzic, Peter <p.dziedzic@...>

hello,


thanks for your solution.
this solution works very nice.
but i have one "little" problem with this solution.
when i change the size of the window then i get the bounds-event very often.
therefore my windowHasResized-method will be called very often and sometimes the column-width will be refreshed quite often.
do you know a  solution for this problem too?




best regards,

Peter

--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail:
p.dziedzic@...
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346



Rob Vens <rob@...>
Gesendet von:
rob@...

23.04.2009 11:47


An
"Dziedzic, Peter" <p.dziedzic@...>
Kopie
vwnc@...
Thema
Re: [vwnc] Aragon Dataset with dynamic column width

 







This is how I did this. In your application, add this code:

postBuildWith: aBuilder

super postBuildWith: aBuilder.
...
aBuilder window
whenAny: #(#bounds)
send: #windowHasResized
to: self

Then you need to implement the following method in your application, of course depending on your dataset your column size determination algorithm will differ.

windowHasResized
| yourWidget |
(self wrapperAt: #yourView) isNil
ifFalse:
[yourWidget := self widgetAt: #yourView.
yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
yourWidget invalidateRectangle: yourWidget bounds repairNow: true]

or something similar. I do this a bit differently, because I have embedded applications (subcanvases) but this just means delegating the windowHasResized message to the subcanvas.
Success!


2009/4/23 Dziedzic, Peter <
p.dziedzic@...>

Hello,

I have a problem and i dont know how to solve it.
i use a Aragon Dataset and i want to have a dynamic column-size of the dataset.
i want that when the user makes the window bigger (= resize) then the dataset and each of its columns should become proportional bigger.
in default only the dataset becomes bigger. but the columns still have the same size.

maybe some did this already and knows a good solution?
thanks for your help.

best regards,

Peter
--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail:
p.dziedzic@...
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346




----------------------------------------
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

vwnc@...
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



----------------------------------------
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: [vwnc] Antwort: Re: Aragon Dataset with dynamic column width

Henrik Sperre Johansen
I'm not sure if it translates to your use case, but the Searchlight
package (in public store) includes an example of dealing with excessive
updates. You might want to check out MethodCache class >>
startUpdateInBackground.

Cheers,
Henry

Dziedzic, Peter skrev:

>
> hello,
>
> i changed my code.
> now i have the following 3 new methods:
>
> 1)
> postBuildWith: aBuilder
>         super postBuildWith: aBuilder.
>         aBuilder window whenAny: #(#resize) send: #windowHasResized
> to: self
>
> 2)
> windowHasResized
>         "Method that delegates the window resize events to the
> subcanvas-object"        
>         | aSubcanvasobject |
>         "Does the subcanvas exist?"
>         (self wrapperAt: #subc) notNil
>                 ifTrue:
>                         ["Get the subcanvas-object"
>                         aSubcanvasobject := self widgetAt: #subC.
>                         aSubcanvasobject client notNil
>                                 ifTrue:
>                                         [        "Delegate method call"
>                                                 aSubcanvasobject
> client windowHasResized.
>                                         ]
>                         ]
>
>
> 3)in the subcanvas-class:
> windowHasResized
>         "Add method to resize the columns when size of the window
> changed"        
>         | aDatasetobject i maxColumn totalWidth columnWidth|
>         (self wrapperAt: #theDataSet) isNil
>                 ifFalse:
>                         [aDatasetobject := self widgetAt: #theDataSet.
>                         i := 2.
>                         "number of the highest column:"
>                         maxColumn := 15.
>                        
>                         "calculate total width without first column
> which is the row selector"
>                         totalWidth := aDatasetobject bounds width - 30.0.
>                
>                         "set column width of each column. The first
> column (= row selector)
>                         will have always the size of 30 pixels"
>                         columnWidth := (( totalWidth / ( maxColumn -
> 1))) asFloat asInteger.
>                         [i <= maxColumn] whileTrue:
>                                 [
>                                 aDatasetobject
>                                         resizeColumnAt: i
>                                         width: columnWidth.
>                                         i := i +1.
>                                 ].
>                         aDatasetobject
>                                 invalidateRectangle: aDatasetobject bounds
>                                 repairNow: true]
>
>
> when i use #bounds then i get the change-event very often.
> but when i use #resize instead then i get the event when i make the
> window bigger. but i dont get the event when i make the window smaller
> again.
> do you know a solution?
>
> best regards,
>
> Peter Dziedzic
>
> --------------------------------------
>
> Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
> Softwareentwicklung/Software Development
>
> P e t e r  D z i e d z i c
>
> 73446 Oberkochen, Germany
> e-mail: [hidden email]
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl-Zeiss-Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346
>
>
>
>
>
> *"Steven Kelly" <[hidden email]>*
> Gesendet von: [hidden email]
>
> 27.04.2009 12:58
>
>
> An
> <[hidden email]>
> Kopie
>
> Thema
> Re: [vwnc] Aragon Dataset with dynamic column width
>
>
>
>
>
>
>
>
>
> I use the #resize event, not #bounds; maybe #resize events are
> collapsed whereas #bounds are sent for each pixel?
>  
> An alternative possible workaround for Windows: Control Panel |
> Display | Appearance tab | Effects… | Show window contents while
> dragging: OFF.
>  
> Steve
>  
> *From:* [hidden email] [mailto:[hidden email]] *On
> Behalf Of *Rob Vens*
> Sent:* 27 April 2009 11:52*
> Cc:* [hidden email]*
> Subject:* Re: [vwnc] Aragon Dataset with dynamic column width
>  
> A solution is to remember oldBounds and test whether the newBounds is
> different from oldBounds, and only refresh when there is a significant
> difference. I am sure there is a way to optimise this even further. I
> vaguely remember that bounds events can be collapsed, meaning that we
> only process the event when you are done resizing, not all the while
> when you are resizing a window. Anyone on the list can help us out
> with this?
> 2009/4/27 Dziedzic, Peter <_p.dziedzic@zeiss.de_
> <mailto:[hidden email]>>
>
> hello,
>
> thanks for your solution.
> this solution works very nice.
> but i have one "little" problem with this solution.
> when i change the size of the window then i get the bounds-event very
> often.
> therefore my windowHasResized-method will be called very often and
> sometimes the column-width will be refreshed quite often.
> do you know a  solution for this problem too?
>
>
>
> best regards,
>
> Peter
>
> --------------------------------------
>
> Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
> Softwareentwicklung/Software Development
>
> P e t e r  D z i e d z i c
>
> 73446 Oberkochen, Germany
> e-mail: _p.dziedzic@zeiss.de_ <mailto:[hidden email]>_
> __http://www.zeiss.de/imt_
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl-Zeiss-Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346
>
>
>
> *Rob Vens <**_rob@sepher.nl_* <mailto:[hidden email]>*>*
> Gesendet von: _rob@sepher.nl_ <mailto:[hidden email]>
>
> 23.04.2009 11:47
>
>
> An
> "Dziedzic, Peter" <_p.dziedzic@zeiss.de_ <mailto:[hidden email]>>
> Kopie
> [hidden email].edu_ <mailto:[hidden email]>
> Thema
> Re: [vwnc] Aragon Dataset with dynamic column width
>
>
>  
>
>
>
>
>
>
>
>
>
>
> This is how I did this. In your application, add this code:
>
> postBuildWith: aBuilder
>
> super postBuildWith: aBuilder.
> ...
> aBuilder window
> whenAny: #(#bounds)
> send: #windowHasResized
> to: self
>
> Then you need to implement the following method in your application,
> of course depending on your dataset your column size determination
> algorithm will differ.
>
> windowHasResized
> | yourWidget |
> (self wrapperAt: #yourView) isNil
> ifFalse:
> [yourWidget := self widgetAt: #yourView.
> yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
> yourWidget invalidateRectangle: yourWidget bounds repairNow: true]
>
> or something similar. I do this a bit differently, because I have
> embedded applications (subcanvases) but this just means delegating the
> windowHasResized message to the subcanvas.
> Success!
>
>
> 2009/4/23 Dziedzic, Peter <_p.dziedzic@zeiss.de_
> <mailto:[hidden email]>>
>
> Hello,
>
> I have a problem and i dont know how to solve it.
> i use a Aragon Dataset and i want to have a dynamic column-size of the
> dataset.
> i want that when the user makes the window bigger (= resize) then the
> dataset and each of its columns should become proportional bigger.
> in default only the dataset becomes bigger. but the columns still have
> the same size.
>
> maybe some did this already and knows a good solution?
> thanks for your help.
>
> best regards,
>
> Peter
> --------------------------------------
>
> Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
> Softwareentwicklung/Software Development
>
> P e t e r  D z i e d z i c
>
> 73446 Oberkochen, Germany
> e-mail: _p.dziedzic@zeiss.de_ <mailto:[hidden email]>_
> __http://www.zeiss.de/imt_
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl-Zeiss-Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346
>
>
>
>
> ----------------------------------------
> 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].edu_ <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
>
>
>
> ----------------------------------------
> 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
|

[vwnc] Antwort: Re: Antwort: Re: Aragon Dataset with dynamic column width

Dziedzic, Peter

i solved my problem with the following solution: i safe the size of the window. when i get the bounds-event then i check if the size of the window changed.
if the size changed then i update the column width.

this works very well. thanks.

best regards,

Peter Dziedzic

--------------------------------------

Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
Softwareentwicklung/Software Development

P e t e r  D z i e d z i c

73446 Oberkochen, Germany
e-mail: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346





Henrik Johansen <[hidden email]>
Gesendet von: [hidden email]

30.04.2009 14:32

An
[hidden email]
Kopie
Thema
Re: [vwnc] Antwort: Re:  Aragon Dataset with dynamic column width





I'm not sure if it translates to your use case, but the Searchlight
package (in public store) includes an example of dealing with excessive
updates. You might want to check out MethodCache class >>
startUpdateInBackground.

Cheers,
Henry

Dziedzic, Peter skrev:

>
> hello,
>
> i changed my code.
> now i have the following 3 new methods:
>
> 1)
> postBuildWith: aBuilder
>         super postBuildWith: aBuilder.
>         aBuilder window whenAny: #(#resize) send: #windowHasResized
> to: self
>
> 2)
> windowHasResized
>         "Method that delegates the window resize events to the
> subcanvas-object"        
>         | aSubcanvasobject |
>         "Does the subcanvas exist?"
>         (self wrapperAt: #subc) notNil
>                 ifTrue:
>                         ["Get the subcanvas-object"
>                         aSubcanvasobject := self widgetAt: #subC.
>                         aSubcanvasobject client notNil
>                                 ifTrue:
>                                         [        "Delegate method call"
>                                                 aSubcanvasobject
> client windowHasResized.
>                                         ]
>                         ]
>
>
> 3)in the subcanvas-class:
> windowHasResized
>         "Add method to resize the columns when size of the window
> changed"        
>         | aDatasetobject i maxColumn totalWidth columnWidth|
>         (self wrapperAt: #theDataSet) isNil
>                 ifFalse:
>                         [aDatasetobject := self widgetAt: #theDataSet.
>                         i := 2.
>                         "number of the highest column:"
>                         maxColumn := 15.
>                        
>                         "calculate total width without first column
> which is the row selector"
>                         totalWidth := aDatasetobject bounds width - 30.0.
>                
>                         "set column width of each column. The first
> column (= row selector)
>                         will have always the size of 30 pixels"
>                         columnWidth := (( totalWidth / ( maxColumn -
> 1))) asFloat asInteger.
>                         [i <= maxColumn] whileTrue:
>                                 [
>                                 aDatasetobject
>                                         resizeColumnAt: i
>                                         width: columnWidth.
>                                         i := i +1.
>                                 ].
>                         aDatasetobject
>                                 invalidateRectangle: aDatasetobject bounds
>                                 repairNow: true]
>
>
> when i use #bounds then i get the change-event very often.
> but when i use #resize instead then i get the event when i make the
> window bigger. but i dont get the event when i make the window smaller
> again.
> do you know a solution?
>
> best regards,
>
> Peter Dziedzic
>
> --------------------------------------
>
> Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
> Softwareentwicklung/Software Development
>
> P e t e r  D z i e d z i c
>
> 73446 Oberkochen, Germany
> e-mail: [hidden email]
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl-Zeiss-Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346
>
>
>
>
>
> *"Steven Kelly" <[hidden email]>*
> Gesendet von: [hidden email]
>
> 27.04.2009 12:58
>
>                  
> An
>                  <[hidden email]>
> Kopie
>                  
> Thema
>                  Re: [vwnc] Aragon Dataset with dynamic column width
>
>
>
>                  
>
>
>
>
>
> I use the #resize event, not #bounds; maybe #resize events are
> collapsed whereas #bounds are sent for each pixel?
>  
> An alternative possible workaround for Windows: Control Panel |
> Display | Appearance tab | Effects… | Show window contents while
> dragging: OFF.
>  
> Steve
>  
> *From:* [hidden email] [mailto:[hidden email]] *On
> Behalf Of *Rob Vens*
> Sent:* 27 April 2009 11:52*
> Cc:* [hidden email]*
> Subject:* Re: [vwnc] Aragon Dataset with dynamic column width
>  
> A solution is to remember oldBounds and test whether the newBounds is
> different from oldBounds, and only refresh when there is a significant
> difference. I am sure there is a way to optimise this even further. I
> vaguely remember that bounds events can be collapsed, meaning that we
> only process the event when you are done resizing, not all the while
> when you are resizing a window. Anyone on the list can help us out
> with this?
> 2009/4/27 Dziedzic, Peter <_p.dziedzic@zeiss.de_
> <mailto:[hidden email]>>
>
> hello,
>
> thanks for your solution.
> this solution works very nice.
> but i have one "little" problem with this solution.
> when i change the size of the window then i get the bounds-event very
> often.
> therefore my windowHasResized-method will be called very often and
> sometimes the column-width will be refreshed quite often.
> do you know a  solution for this problem too?
>
>
>
> best regards,
>
> Peter
>
> --------------------------------------
>
> Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
> Softwareentwicklung/Software Development
>
> P e t e r  D z i e d z i c
>
> 73446 Oberkochen, Germany
> e-mail: _p.dziedzic@zeiss.de_ <mailto:[hidden email]>_
> __http://www.zeiss.de/imt_
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl-Zeiss-Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346
>
>
>
> *Rob Vens <**_rob@sepher.nl_* <mailto:[hidden email]>*>*
> Gesendet von: _rob@sepher.nl_ <mailto:[hidden email]>
>
> 23.04.2009 11:47
>
>                  
> An
>                  "Dziedzic, Peter" <_p.dziedzic@zeiss.de_ <mailto:[hidden email]>>
> Kopie
>                  [hidden email].edu_ <mailto:[hidden email]>
> Thema
>                  Re: [vwnc] Aragon Dataset with dynamic column width
>
>
>  
>
>
>
>                  
>
>
>
>
>
>
> This is how I did this. In your application, add this code:
>
> postBuildWith: aBuilder
>
> super postBuildWith: aBuilder.
> ...
> aBuilder window
> whenAny: #(#bounds)
> send: #windowHasResized
> to: self
>
> Then you need to implement the following method in your application,
> of course depending on your dataset your column size determination
> algorithm will differ.
>
> windowHasResized
> | yourWidget |
> (self wrapperAt: #yourView) isNil
> ifFalse:
> [yourWidget := self widgetAt: #yourView.
> yourWidget resizeColumnAt: 5 width: yourWidget bounds width - 530.
> yourWidget invalidateRectangle: yourWidget bounds repairNow: true]
>
> or something similar. I do this a bit differently, because I have
> embedded applications (subcanvases) but this just means delegating the
> windowHasResized message to the subcanvas.
> Success!
>
>
> 2009/4/23 Dziedzic, Peter <_p.dziedzic@zeiss.de_
> <mailto:[hidden email]>>
>
> Hello,
>
> I have a problem and i dont know how to solve it.
> i use a Aragon Dataset and i want to have a dynamic column-size of the
> dataset.
> i want that when the user makes the window bigger (= resize) then the
> dataset and each of its columns should become proportional bigger.
> in default only the dataset becomes bigger. but the columns still have
> the same size.
>
> maybe some did this already and knows a good solution?
> thanks for your help.
>
> best regards,
>
> Peter
> --------------------------------------
>
> Carl Zeiss Industrielle Meßtechnik GmbH/ Industrial Metrology
> Softwareentwicklung/Software Development
>
> P e t e r  D z i e d z i c
>
> 73446 Oberkochen, Germany
> e-mail: _p.dziedzic@zeiss.de_ <mailto:[hidden email]>_
> __http://www.zeiss.de/imt_
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl-Zeiss-Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Hanspeter Mürle
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Amtsgericht Ulm, HRB 501561, USt-IdNr.: DE 811 515 346
>
>
>
>
> ----------------------------------------
> 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].edu_ <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
>
>
>
> ----------------------------------------
> 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



----------------------------------------
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