[vwnc] Re-2: Re-2: DragAndDrop with datasets

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

[vwnc] Re-2: Re-2: DragAndDrop with datasets

Frank Urbach
The patch work for adjusting the width of the column very well. Thanks for the fast response.
I have some trouble to reinstall the interface. To illustrate this the following mehthod:

MyApplicationModel>>reInstallInterface
        "Install the receiver's user interface again. Keep the same window.
        This happens when changing projects, restarting, and look and feel
        changes."
       
        | spec window wid oldDate|
     
      oldDate := (builder componentAt: #datumSpinner) widget controller text.
        wid := builder componentAt: #datumSpinner.
        self datumGiessplan removeDependent: wid widget.
        builder composite removeComponent: wid.
        window := self builder window.
        window component release.
     
      window controller reInstallEventDispatcher.
        builder := UIBuilder new.
        builder setWindow: window.
        builder source: self.
        spec := self class interfaceSpecFor: #windowSpec.
        self preBuildWith: builder.
        builder add: spec.
        self postBuildWith: builder.
        builder doFinalHookup.
        self postOpenWith: builder.
      window refresh.
        ^builder

When I do this I get a DNU
VisualPart>>graphicsContextFor: aVisualObject
        "Forward the graphicsContextFor message up the hierarchy to find a graphics context for aView."

        ^container graphicsContextFor: self

is missing the container. Inspecting the container shows nil. This behavior I recognize in the old DataSet when I use the option to show the columnheader as a Button. After canceled this behavior in the GUI-Painter this error goes away.
This is also far behind my knowledge.
And again many thanks for your response.

Cheers,

Frank

-------- Original Message --------
Subject: Re: [vwnc] Re-2:  DragAndDrop with datasets (09-Sep-2008 13:21)
From:    Reinout Heeck <[hidden email]>
To:      [hidden email]

> Frank Urbach wrote:
> > Hi Reinout,
> >
> > many thanks for the tip. Did you ever tried this with vwnc 7.6.
> >  
> Using the new dataset: yes.
> Using at as a drag source: no.
>
> > There are some glitches within changing the column width by users. I get a
> > DNU in
> > #poll>>
> >   ...
> >  self sensor pollForActivity.
> >  
> Ah. We have a gazillion patches on the new dataset, but most of these
> are for extending functionality -- I expected the parcel would work out
> of the box for you.
>
>
> However I did find we override #poll with the following:
>
> poll
>     "Announce that we are iterating through the polling loop. If
>     there has been no input for a significant time, wait on a semaphore"
>
>     self view isOpen
>         ifFalse: ["if the view was closed or the top component is closed"
>                 WindowManager closedWindowSignal
>                     raiseRequestFrom: self view topComponent controller].
>     self view topComponent windowManager processNextEvent
>
>
> it seems the method comment above is not entirely correct anymore ;-)
>
>
> Let us know if you encounter other problems,
>
> R
> -
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


To: [hidden email]
Cc: [hidden email]

Edelstahlwerke Schmees GmbH
Geschftsleitung Clemens Schmees
Sitz D-01796 Pirna
Handelsregister Dresden HRB 54
E-Mail: [hidden email]
WEB:     www.schmees.com
 
Diese E-Mail enthlt vertrauliche und/oder rechtlich geschtzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtmlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
 
This e-mail may contain confidental and/or privileged information. If you are not intended recipient or have received this e-mail in error, please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



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

Re: [vwnc] Re-2: Re-2: DragAndDrop with datasets

Reinout Heeck-2
Frank Urbach wrote:

> The patch work for adjusting the width of the column very well. Thanks for the fast response.
> I have some trouble to reinstall the interface. To illustrate this the following mehthod:
>
> MyApplicationModel>>reInstallInterface
> "Install the receiver's user interface again. Keep the same window.
> This happens when changing projects, restarting, and look and feel
> changes."
>
> | spec window wid oldDate|
>      
>       oldDate := (builder componentAt: #datumSpinner) widget controller text.
> wid := builder componentAt: #datumSpinner.
> self datumGiessplan removeDependent: wid widget.
> builder composite removeComponent: wid.
> window := self builder window.
> window component release.
>      
>       window controller reInstallEventDispatcher.
> builder := UIBuilder new.
> builder setWindow: window.
> builder source: self.
> spec := self class interfaceSpecFor: #windowSpec.
> self preBuildWith: builder.
> builder add: spec.
> self postBuildWith: builder.
> builder doFinalHookup.
> self postOpenWith: builder.
>       window refresh.
> ^builder
>
> When I do this I get a DNU
> VisualPart>>graphicsContextFor: aVisualObject
> "Forward the graphicsContextFor message up the hierarchy to find a graphics context for aView."
>
> ^container graphicsContextFor: self
>
> is missing the container. Inspecting the container shows nil. This behavior I recognize in the old DataSet when I use the option to show the columnheader as a Button. After canceled this behavior in the GUI-Painter this error goes away.
> This is also far behind my knowledge.
> And again many thanks for your response.
>  
Well.... #reInstallInterface is an abomination in general :-(

If you look at the implementation of VisualLauncher>>reInstallInterface
you'll see that it does:

1) remove a widget from the component hierarchy
2) ask the topComponent to #release all widgets (obviously except the
one that was removed above).
3) build a new component hierarchy
4) swap one of the newly built widgets with the removed one above.


If you look at your code you'll see that you keep the datumSpinner
widget around but don't hook it up into the newly built UI (step 4).
So I presume the datumSpinner (or its controller or model) is still
dependent on something that changed. After the change it tries to
repaint but since it is not sitting in a valid component hierarchy it DNUs.



Just a guess, if this doesn't help please send a copy of the stack dump
you get.

R
-








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