[7.8]Dialog window with tab control

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

[7.8]Dialog window with tab control

Carl Gundel-2
I created a window with TabControl and all was fine, but when I open
it as a dialog like so, the widgets inside the tabs do not get built.

PreferencesWindow new openDialogInterface: #windowSpec

Any thoughts?

-Carl Gundel
http://www.libertybasic.com
http://www.runbasic.com
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.8]Dialog window with tab control

Mark Pirogovsky-3
Carl,

One thing comes to mind if you use the postBuildWith: or postOpenWith:
to repaint or rebuild your interface you may need to assign those action
to the postbuildBlocks

something along the lines:

     dialog preBuildBlock: [:model :dialogBuilder | self preBuildWith:
dialogBuilder].

     dialog postBuildBlock: [:model :dialogBuilder | self postBuildWith:
dialogBuilder].

      dialog postOpenBlock: [:dlg :bld | anEditor postOpenWith: bld].


Or You may need to re-implement the method for your class as follow:


openDialogInterface: aSymbol

dialog := SimpleDialog new.
     builder := dialog builder.
     dialog postOpenBlock: [:dlg :bld |
         self postOpenWith: bld].
     dialog openFor: self interface: aSymbol


Hope this helps.

--Mark

Carl Gundel wrote:

> I created a window with TabControl and all was fine, but when I open
> it as a dialog like so, the widgets inside the tabs do not get built.
>
> PreferencesWindow new openDialogInterface: #windowSpec
>
> Any thoughts?
>
> -Carl Gundel
> http://www.libertybasic.com
> http://www.runbasic.com
> _______________________________________________
> 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: [7.8]Dialog window with tab control

Maarten Mostert

Hi Carl,

 

I exactly this in this method:

 

Hope that helps:

 

Regards,

 

Maarten,

 

 

taskDialogOpen: aTask


| taskModel taskBuilder taskDialog |

taskModel := SimpleDialog new.

taskBuilder := taskModel builder.

taskDialog := TaskDialog new initialize.

taskDialog builder: taskBuilder.

taskDialog parent: self.

taskDialog postActions.

self getUndoManager

beginTransaction: self parent

querySelectBeforeUndo: true

item: nil.

taskModel postOpenBlock:

[:dlg :bld |

(dlg widgetAt: #tabbing) client: taskDialog spec: #mainSpec "widget"].

(taskModel openFor: taskDialog interface: #windowSpecDialog)

ifFalse:

["Cancel"

self getUndoManager endTransaction.

self getUndoManager undo]

ifTrue:

["accept"

self getUndoManager endTransaction]

 


 

 

 

Author Said: "Mark Pirogovsky" <[hidden email]> |

> Carl,


>
> One thing comes to mind if you use the postBuildWith: or postOpenWith:
> to repaint or rebuild your interface you may need to assign those action
> to the postbuildBlocks
>
> something along the lines:
>
> dialog preBuildBlock: [:model :dialogBuilder | self preBuildWith:
> dialogBuilder].
>
> dialog postBuildBlock: [:model :dialogBuilder | self postBuildWith:
> dialogBuilder].
>
> dialog postOpenBlock: [:dlg :bld | anEditor postOpenWith: bld].
>
>
> Or You may need to re-implement the method for your class as follow:
>
>
> openDialogInterface: aSymbol
>
> dialog := SimpleDialog new.
> builder := dialog builder.
> dialog postOpenBlock: [:dlg :bld |
> self postOpenWith: bld].
> dialog openFor: self interface: aSymbol
>
>
> Hope this helps.
>
> --Mark
>
> Carl Gundel wrote:
> > I created a window with TabControl and all was fine, but when I open
> > it as a dialog like so, the widgets inside the tabs do not get built.
> >
> > PreferencesWindow new openDialogInterface: #windowSpec
> >
> > Any thoughts?
> >
> > -Carl Gundel
> > http://www.libertybasic.com
> > http://www.runbasic.com
> > _______________________________________________
> > 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: [7.8]Dialog window with tab control

Steven Kelly
At least in 7.7.1 #client:spec: is broken - use "client:spec:builder: bigBuilder newSubBuilder" instead. You probably want to send it in the postBuild phase. Like Mark, I follow Cincom's example and make openDialogInterface: set the pre/post blocks to just redirect to the appropriate pre/post*With: method.
 
HTH,
Steve


From: [hidden email] on behalf of [hidden email]
Sent: Mon 05/03/2012 20:26
To: [hidden email]; vwnc; Mark Pirogovsky
Subject: Re: [vwnc] [7.8]Dialog window with tab control

Hi Carl,

 

I exactly this in this method:

 

Hope that helps:

 

Regards,

 

Maarten,

 

 

taskDialogOpen: aTask


| taskModel taskBuilder taskDialog |

taskModel := SimpleDialog new.

taskBuilder := taskModel builder.

taskDialog := TaskDialog new initialize.

taskDialog builder: taskBuilder.

taskDialog parent: self.

taskDialog postActions.

self getUndoManager

beginTransaction: self parent

querySelectBeforeUndo: true

item: nil.

taskModel postOpenBlock:

[:dlg :bld |

(dlg widgetAt: #tabbing) client: taskDialog spec: #mainSpec "widget"].

(taskModel openFor: taskDialog interface: #windowSpecDialog)

ifFalse:

["Cancel"

self getUndoManager endTransaction.

self getUndoManager undo]

ifTrue:

["accept"

self getUndoManager endTransaction]

 


 

 

 

Author Said: "Mark Pirogovsky" <[hidden email]> |

> Carl,


>
> One thing comes to mind if you use the postBuildWith: or postOpenWith:
> to repaint or rebuild your interface you may need to assign those action
> to the postbuildBlocks
>
> something along the lines:
>
> dialog preBuildBlock: [:model :dialogBuilder | self preBuildWith:
> dialogBuilder].
>
> dialog postBuildBlock: [:model :dialogBuilder | self postBuildWith:
> dialogBuilder].
>
> dialog postOpenBlock: [:dlg :bld | anEditor postOpenWith: bld].
>
>
> Or You may need to re-implement the method for your class as follow:
>
>
> openDialogInterface: aSymbol
>
> dialog := SimpleDialog new.
> builder := dialog builder.
> dialog postOpenBlock: [:dlg :bld |
> self postOpenWith: bld].
> dialog openFor: self interface: aSymbol
>
>
> Hope this helps.
>
> --Mark
>
> Carl Gundel wrote:
> > I created a window with TabControl and all was fine, but when I open
> > it as a dialog like so, the widgets inside the tabs do not get built.
> >
> > PreferencesWindow new openDialogInterface: #windowSpec
> >
> > Any thoughts?
> >
> > -Carl Gundel
> > http://www.libertybasic.com
> > http://www.runbasic.com
> > _______________________________________________
> > 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