New to Dolphin - Default view ???

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

New to Dolphin - Default view ???

Dan Antion
I am new to Dolphin, and I have what I hope is a simple "getting
started" type question. Or, perhaps, I'm heading down the wrong road.
In any case, I would appreciate some advice.

I have a model, a view and a presenter.  In the view, I defined a
context menu.  If I test the presenter, all is well.  I see the elements
I have defined, and the menu.

What I want to do is add an unknown number of these presenters to a
container view with a grid layout.  when I do that, creating each
presenter with 'new', I get the information I expect, but not the menu.
  Is there a way to add the default view of a presenter to the container
view.  When I try to force that, I get a separate window for each
instance (but the menu works :)

Thanks for your help
Dan


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Bill Schwab-2
Dan,

> I am new to Dolphin

Welcome aboard.


> I have a model, a view and a presenter.  In the view, I defined a
> context menu.  If I test the presenter, all is well.  I see the elements
> I have defined, and the menu.

It sounds like you've met the ViewComposer.  It's job is to build, edit and
then serialize (using Dolphin's binary filer) a prototype (as in the Gang of
Four's Prototype pattern) instance of a view.  Each prototype instance
appears to us as as a "view resource" and associated with the presenter by
the name you give it when saving in the VC.


> What I want to do is add an unknown number of these presenters to a
> container view with a grid layout.  when I do that, creating each
> presenter with 'new', I get the information I expect, but not the menu.
>   Is there a way to add the default view of a presenter to the container
> view.  When I try to force that, I get a separate window for each
> instance (but the menu works :)

I'm somewhat surprised that it works that well :)  You might want to have a
look at my Pane Holders package that you can find on my web site.  It
provides various approaches to dynamic MVP.  One of them might be what you
want, or you might be able to adapt it to get the behavior you want.

You seem  to be well on your way, but if you haven't done so already, you
might want to follow one or more of the MVP tutorials that are available to
see how Dolphin's MVP framework "thinks".  That will help you to understand
where and how it might be fighting you a little.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Dan Antion
Thanks,

I'll have a look at Pane Holders.

I mentioned that I am new to Dolphin, but I'm not new to Smalltalk.
Maybe I should have started by asking how people really work with
Dolphin.  I know with VisualAge, there's the stuff you get from IBM,
then there's all the stuff you buy to make life easier.  The View
Composer seemed like a simple way to create the composits of the stuff
that I had written, extended, etc..  Now it seems like that's not the
way to go.

Assuming my project looks like this:

        MyObjects

        Views on my objects

        Composit views of those views, menus, buttons and lists

Where (if anywhere) would the ViewComposer become useful? Is it ever
necessary?  Is there a better way of presenting the view to the user if
I want that view to have custom functionality.

Thanks again
Dan

Bill Schwab wrote:

> Dan,
>
>
>>I am new to Dolphin
>
>
> Welcome aboard.
>
>
>
>>I have a model, a view and a presenter.  In the view, I defined a
>>context menu.  If I test the presenter, all is well.  I see the elements
>>I have defined, and the menu.
>
>
> It sounds like you've met the ViewComposer.  It's job is to build, edit and
> then serialize (using Dolphin's binary filer) a prototype (as in the Gang of
> Four's Prototype pattern) instance of a view.  Each prototype instance
> appears to us as as a "view resource" and associated with the presenter by
> the name you give it when saving in the VC.
>
>
>
>>What I want to do is add an unknown number of these presenters to a
>>container view with a grid layout.  when I do that, creating each
>>presenter with 'new', I get the information I expect, but not the menu.
>>  Is there a way to add the default view of a presenter to the container
>>view.  When I try to force that, I get a separate window for each
>>instance (but the menu works :)
>
>
> I'm somewhat surprised that it works that well :)  You might want to have a
> look at my Pane Holders package that you can find on my web site.  It
> provides various approaches to dynamic MVP.  One of them might be what you
> want, or you might be able to adapt it to get the behavior you want.
>
> You seem  to be well on your way, but if you haven't done so already, you
> might want to follow one or more of the MVP tutorials that are available to
> see how Dolphin's MVP framework "thinks".  That will help you to understand
> where and how it might be fighting you a little.
>
> Have a good one,
>
> Bill
>
> --
> Wilhelm K. Schwab, Ph.D.
> [hidden email]
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Bill Schwab-2
Dan,

> I'll have a look at Pane Holders.
>
> I mentioned that I am new to Dolphin, but I'm not new to Smalltalk.

I suspected as much.  Still, the MVP tutorials will help you understand the
framework and help you better convince it to do what you want.


> Maybe I should have started by asking how people really work with
> Dolphin.  I know with VisualAge, there's the stuff you get from IBM,
> then there's all the stuff you buy to make life easier.

Go to Ian Bartholomew's web site for the Chunk Browser.  You'll also want to
get either his news archive browser or DSDN which he and I built together.
Either tool will allow you to search the newsgroup archives that you'll find
on Ian's web site - don't miss out :)

Beyond that, there's a lot of other nice stuff available.  The Dolphin web
ring will get you going, as will a good search engine.


> The View
> Composer seemed like a simple way to create the composits of the stuff
> that I had written, extended, etc..  Now it seems like that's not the
> way to go.

That depends.  Picture the grass on the other side of the fence.  The VC is
great for some tasks, and something to be avoided for others.  Look at
ViewGenerator in my goodies.  It is the basis for something that I use to
generate a seriously big (700+ controls, and that simply counts them once
but many are repeated) user interface for one of our research projects.  I'd
hate to think about drag and drop as way to construct it, but, there is a
lot of meta data that a ViewGenerator subclass can parse to do the dirty
work.

In favor of the VC, I've been doing a lot of experimental prodding with
Squeak, and suspect that many of its user interface elements would be a lot
nicer in appearance if a drag and drop tool were available for assembling
Morphic interfaces.  Ideally a system should make it easy to build GUIs by
code alone and by drag and drop so one can choose.  You'll find both
approaches represented in Dolphin with the right goodies installed.


> Assuming my project looks like this:
>
> MyObjects
> Views on my objects
> Composit views of those views, menus, buttons and lists
>
> Where (if anywhere) would the ViewComposer become useful? Is it ever
> necessary?

Try the various tutorials.  The VC is perhaps never truly necessary, but
there are many situations when you would want to use it.  Its role would be
to build (generally composite) views for the presenters.


> Is there a better way of presenting the view to the user if
> I want that view to have custom functionality.

You might be referring to creating your own subclasses of View.  I seem to
do that mostly for graphics vs. text interfaces.  Even then, the VC can be
useful for putting the custom view into other composites, or even just in a
shell to be displayed to the end user.  This kind of thing will probably be
easier to kick around in the context of a specific problem.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Dan Antion
Thanks for the leads.  I've been through some of the tutorials and I've
crawled through some of the samples. I think if I was putting together a
viewer to work with one instance at a time, I'd be fine.  For lack of a
better descriptor, I'm trying to present a thumbnail view of (n)
objects.  What I want to present doesn't fit well in columns, so I
wanted to have a series of little form parts in a grid.  I could get
that to work, I just couldn't get the menus to work, because, as you
suspected, I added the context menu in the ViewComposer.

For now, I've solved my problem by adding the context menu to the views
as I create the instances.  I'm not sure that's the best way to go, but
I't seems to work.

Right now, I'm creating all the windows from code in a workspace. I have

Shell
   ScrollingDecorator
     ContainerView (grid layout)

I am adding my views to the ContainerView

I need to be able to change the attributes of the containerView, as
items get added to or dropped from the list, and to enable some
different viewing options.

Of course, I also want to add a bunch of menu options, some status
stuff, ect.  I'm assumming that I can use the ViewComposer for the
static stuff, and the window layout down to the container. I could then
reference the container and take care of everything else in code.  Is
that wishful thinking on my part ?

Thanks again
Dan





Bill Schwab wrote:

> Dan,
>
>
>>I'll have a look at Pane Holders.
>>
>>I mentioned that I am new to Dolphin, but I'm not new to Smalltalk.
>
>
> I suspected as much.  Still, the MVP tutorials will help you understand the
> framework and help you better convince it to do what you want.
>
>
>
>>Maybe I should have started by asking how people really work with
>>Dolphin.  I know with VisualAge, there's the stuff you get from IBM,
>>then there's all the stuff you buy to make life easier.
>
>
> Go to Ian Bartholomew's web site for the Chunk Browser.  You'll also want to
> get either his news archive browser or DSDN which he and I built together.
> Either tool will allow you to search the newsgroup archives that you'll find
> on Ian's web site - don't miss out :)
>
> Beyond that, there's a lot of other nice stuff available.  The Dolphin web
> ring will get you going, as will a good search engine.
>
>
>
>>The View
>>Composer seemed like a simple way to create the composits of the stuff
>>that I had written, extended, etc..  Now it seems like that's not the
>>way to go.
>
>
> That depends.  Picture the grass on the other side of the fence.  The VC is
> great for some tasks, and something to be avoided for others.  Look at
> ViewGenerator in my goodies.  It is the basis for something that I use to
> generate a seriously big (700+ controls, and that simply counts them once
> but many are repeated) user interface for one of our research projects.  I'd
> hate to think about drag and drop as way to construct it, but, there is a
> lot of meta data that a ViewGenerator subclass can parse to do the dirty
> work.
>
> In favor of the VC, I've been doing a lot of experimental prodding with
> Squeak, and suspect that many of its user interface elements would be a lot
> nicer in appearance if a drag and drop tool were available for assembling
> Morphic interfaces.  Ideally a system should make it easy to build GUIs by
> code alone and by drag and drop so one can choose.  You'll find both
> approaches represented in Dolphin with the right goodies installed.
>
>
>
>>Assuming my project looks like this:
>>
>>MyObjects
>>Views on my objects
>>Composit views of those views, menus, buttons and lists
>>
>>Where (if anywhere) would the ViewComposer become useful? Is it ever
>>necessary?
>
>
> Try the various tutorials.  The VC is perhaps never truly necessary, but
> there are many situations when you would want to use it.  Its role would be
> to build (generally composite) views for the presenters.
>
>
>
>>Is there a better way of presenting the view to the user if
>>I want that view to have custom functionality.
>
>
> You might be referring to creating your own subclasses of View.  I seem to
> do that mostly for graphics vs. text interfaces.  Even then, the VC can be
> useful for putting the custom view into other composites, or even just in a
> shell to be displayed to the end user.  This kind of thing will probably be
> easier to kick around in the context of a specific problem.
>
> Have a good one,
>
> Bill
>
> --
> Wilhelm K. Schwab, Ph.D.
> [hidden email]
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Ian Bartholomew-18
Dan,

>                For lack of a
> better descriptor, I'm trying to present a thumbnail view of (n)
> objects.  What I want to present doesn't fit well in columns, so I
> wanted to have a series of little form parts in a grid.

I had a similar problem when I wrote the ImageLibrary.  I wanted to display
all the icons/cursors/bitmaps in the library, organised into rows and the
whole collection to be scrollable.  I needed to fit as many images on a row
as I could with the height of a row being defined by the height of the
tallest item within each row.  In the end I defined a new View subclass that
knew how to position the images it was passed (it just draws them on the
view's canvas, no subviews needed) and put this view within a scrolling
container to look after that aspect.  It's available as part of my
ImageLibrary goodie if you want a look.

I've also got a Thumbnail viewer but that doesn't quite work in the way you
want - it always displays a maximum of 16 sub views and scrolls through more
images by shifting the displayed images through the subviews.  Mail me if
you'd like a look at the package - it might give you some ideas.

On the topic of using the ViewComposer.  I have to say that (offhand) I
cannot recall any situation where I needed to resort to creating views
dynamically, the ViewComposer and MVP framework, along with the occasional
new View/Presenter subclasses, have always been enough.

Ian
http://www.idb.me.uk


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Dan Antion
Ian Bartholomew wrote:

> Dan,
>
>
>>               For lack of a
>>better descriptor, I'm trying to present a thumbnail view of (n)
>>objects.  What I want to present doesn't fit well in columns, so I
>>wanted to have a series of little form parts in a grid.
>
>
> I had a similar problem when I wrote the ImageLibrary.  I wanted to display
> all the icons/cursors/bitmaps in the library, organised into rows and the
> whole collection to be scrollable.  I needed to fit as many images on a row
> as I could with the height of a row being defined by the height of the
> tallest item within each row.  In the end I defined a new View subclass that
> knew how to position the images it was passed (it just draws them on the
> view's canvas, no subviews needed) and put this view within a scrolling
> container to look after that aspect.  It's available as part of my
> ImageLibrary goodie if you want a look.
>
I have downloaded your ImageLibrary, I'll have a look through there

> I've also got a Thumbnail viewer but that doesn't quite work in the way you
> want - it always displays a maximum of 16 sub views and scrolls through more
> images by shifting the displayed images through the subviews.  Mail me if
> you'd like a look at the package - it might give you some ideas.
>
Yes,  I would like to support a variable number of items.  The good part
is they are all the same size, the bad part is I want them to scroll and
scale.  I fixed the number of columns, so I can resize the views inside
the grid as the container grows.  Actually, I think I got over some of
my early hurtles by reviewing posts regarding your Thumbnail viewer.

> On the topic of using the ViewComposer.  I have to say that (offhand) I
> cannot recall any situation where I needed to resort to creating views
> dynamically, the ViewComposer and MVP framework, along with the occasional
> new View/Presenter subclasses, have always been enough.
>
That's good to hear. So is it possible to create a view/presenter
combination and add it dynamically during program operation, with all
the defined features (like menus)?  A more concrete example is an
applicaiton I have done in VAST.  I have a system that can be configured
to monitor/alter certain control parameters.  The parameters are in
groups. The initial view of the system is the most basic group only, as
a single tab in a notebook style part.  The user can select up to 4
additional tabs, which are different views entirely.  Once they save
their settings, that's how the part will open.  Each time, as the part
opens, I add the tabs they have selected.  The views aren't hidden, they
simply aren't added until requested.  The users can also rearrange the
order and, if they wanted to, they could add multiple copies of one part.

In VisualAge, these parts are built on forms, and I can add them to the
windows of other parts.  The forms can be created in code, or using the
VAST editor (complete with it's own set of issues ;)  That's the kind of
behavior I was trying to provide.  I just couldn't seem to add a named
view to an existing window at runtime.

Thanks for your help
Dan

> Ian
> http://www.idb.me.uk
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Bill Schwab
In reply to this post by Dan Antion
Dan,

> I think if I was putting together a
> viewer to work with one instance at a time, I'd be fine.  For lack of a
> better descriptor, I'm trying to present a thumbnail view of (n)
> objects.

This is the area in which Dolphin's MVP framework is the least prepared to
help.  That's not to say that you can't get it done, but I'm not aware of
anything in Dolphin as delivered that solves the problem.


> What I want to present doesn't fit well in columns, so I
> wanted to have a series of little form parts in a grid.  I could get
> that to work, I just couldn't get the menus to work, because, as you
> suspected, I added the context menu in the ViewComposer.

Do you mean "form" in the sense of VB or Smalltalk-80?  Put another way, is
it a composite presenter or is it a picture?  When dealing with arrays of
composite presenters, I typically use the vertical lists in Pane Holders.
If it's a bunch of thumbnail images, there is nothing to stop you from
drawing them in their correct places, hit testing which gets clicked, and
asking it for a menu to display.  The more I do things like that, the
happier my users get because the result is faster and more reliable.  I'm
leaving out some intermediate steps of course, but you can set up the
one-off test fairly easily.


> For now, I've solved my problem by adding the context menu to the views
> as I create the instances.  I'm not sure that's the best way to go, but
> I't seems to work.

There is nothing wrong with it.  If you go with the Pane Holders/vertical
list (or your own derivative) approach, you could put the menus in the view
resources and associate the view resources with the elements in the list.


> Right now, I'm creating all the windows from code in a workspace. I have
>
> Shell
>    ScrollingDecorator
>      ContainerView (grid layout)
>
> I am adding my views to the ContainerView
>
> I need to be able to change the attributes of the containerView, as
> items get added to or dropped from the list, and to enable some
> different viewing options.

Look for #viewNamed:.  Ian has made some nice use of it in at least a couple
of his goodies.  Prior to learning that trick from Ian, I named the
container view and attached a CompositePresenter (which would for Dolphin>=5
be Presenter) to it in #createComponents.  Either approach works.  The
latter approach automatically caches the result, but you can do the same
thing yourself by simply not calling #viewNamed: inside loops etc., or by
adding an instance variable that you assign once, probably in #onViewOpened.


> Of course, I also want to add a bunch of menu options, some status
> stuff, ect.  I'm assumming that I can use the ViewComposer for the
> static stuff, and the window layout down to the container. I could then
> reference the container and take care of everything else in code.  Is
> that wishful thinking on my part ?

It will probably work.  You might not like the results for very large
numbers of objects though.  That's what finally pushed me over the edge
toward realizing that native widgets ultimately produce colored pixels on
the screen, and if I can do that more efficiently some other way, the result
is happier users and probably more portable code too.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Ian Bartholomew-18
In reply to this post by Dan Antion
Dan,

> That's good to hear. So is it possible to create a view/presenter
> combination and add it dynamically during program operation, with all
> the defined features (like menus)?  A more concrete example is an
> applicaiton I have done in VAST.  I have a system that can be configured
> to monitor/alter certain control parameters.  The parameters are in
> groups. The initial view of the system is the most basic group only, as
> a single tab in a notebook style part.  The user can select up to 4
> additional tabs, which are different views entirely.  Once they save
> their settings, that's how the part will open.  Each time, as the part
> opens, I add the tabs they have selected.  The views aren't hidden, they
> simply aren't added until requested.  The users can also rearrange the
> order and, if they wanted to, they could add multiple copies of one part.

Have a look at the package at http://www.idb.me.uk/test.pac

It's not quite what you describe (you can have as many pages as you like and
they can't be reordered) but is, I think, pretty close?

The 4 Presenter subclasses are separate MVP components.  One, TestPage, is
used as a default page and is always present.  The others can be added "on
the fly" by selecting the appropriate button.  Each tab is separate so edits
to one don't affect any of the other tabs which may be the of same class.
Pressing the save button saves the state of the main shell and the contents
of each page - opening a new shell reloads these values.

I wasn't sure how you wanted to connect all these up to a model, or models,
so I've left that part out.  You'd obviously incorporate the persistence
mechanism (I've just used a file) into that.

Each page (except the default - because I forgot) has a context menu with
two items.  One is local and executes a method in the appropriate presenter
and the other is global and executes a method in the main shell.

This is all a bit (oh alright - very) rough but might give you some ideas.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Dan Antion
Thanks!

I'll let you know how I get on with this, but I feel better knowing
which way(s) I can go and which I should avoid.

Ian Bartholomew wrote:

> Dan,
>
>
>>That's good to hear. So is it possible to create a view/presenter
>>combination and add it dynamically during program operation, with all
>>the defined features (like menus)?  A more concrete example is an
>>applicaiton I have done in VAST.  I have a system that can be configured
>>to monitor/alter certain control parameters.  The parameters are in
>>groups. The initial view of the system is the most basic group only, as
>>a single tab in a notebook style part.  The user can select up to 4
>>additional tabs, which are different views entirely.  Once they save
>>their settings, that's how the part will open.  Each time, as the part
>>opens, I add the tabs they have selected.  The views aren't hidden, they
>>simply aren't added until requested.  The users can also rearrange the
>>order and, if they wanted to, they could add multiple copies of one part.
>
>
> Have a look at the package at http://www.idb.me.uk/test.pac
>
> It's not quite what you describe (you can have as many pages as you like and
> they can't be reordered) but is, I think, pretty close?
>
> The 4 Presenter subclasses are separate MVP components.  One, TestPage, is
> used as a default page and is always present.  The others can be added "on
> the fly" by selecting the appropriate button.  Each tab is separate so edits
> to one don't affect any of the other tabs which may be the of same class.
> Pressing the save button saves the state of the main shell and the contents
> of each page - opening a new shell reloads these values.
>
> I wasn't sure how you wanted to connect all these up to a model, or models,
> so I've left that part out.  You'd obviously incorporate the persistence
> mechanism (I've just used a file) into that.
>
> Each page (except the default - because I forgot) has a context menu with
> two items.  One is local and executes a method in the appropriate presenter
> and the other is global and executes a method in the main shell.
>
> This is all a bit (oh alright - very) rough but might give you some ideas.
>
> Ian
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Dan Antion
In reply to this post by Bill Schwab
Bill Schwab wrote:

> Dan,
>
>
>>I think if I was putting together a
>>viewer to work with one instance at a time, I'd be fine.  For lack of a
>>better descriptor, I'm trying to present a thumbnail view of (n)
>>objects.
>
>
> This is the area in which Dolphin's MVP framework is the least prepared to
> help.  That's not to say that you can't get it done, but I'm not aware of
> anything in Dolphin as delivered that solves the problem.
>
I'm not sure I can fault them, I don't guess it's a common feature.
These are the things you do because the users want them "just that way",
but satifying those results is what keeps me employed.


>
>
>>What I want to present doesn't fit well in columns, so I
>>wanted to have a series of little form parts in a grid.  I could get
>>that to work, I just couldn't get the menus to work, because, as you
>>suspected, I added the context menu in the ViewComposer.
>
>
> Do you mean "form" in the sense of VB or Smalltalk-80?  Put another way, is
> it a composite presenter or is it a picture?  When dealing with arrays of
> composite presenters, I typically use the vertical lists in Pane Holders.
> If it's a bunch of thumbnail images, there is nothing to stop you from
> drawing them in their correct places, hit testing which gets clicked, and
> asking it for a menu to display.  The more I do things like that, the
> happier my users get because the result is faster and more reliable.  I'm
> leaving out some intermediate steps of course, but you can set up the
> one-off test fairly easily.
>
The form is just a composite presenter that can be added to other windows.
It's just a way of grouping some parts and their behavior. In this case,
there is an image, but it's not the only part.


>
>>For now, I've solved my problem by adding the context menu to the views
>>as I create the instances.  I'm not sure that's the best way to go, but
>>I't seems to work.
>
>
> There is nothing wrong with it.  If you go with the Pane Holders/vertical
> list (or your own derivative) approach, you could put the menus in the view
> resources and associate the view resources with the elements in the list.
>
>
>
>>Right now, I'm creating all the windows from code in a workspace. I have
>>
>>Shell
>>   ScrollingDecorator
>>     ContainerView (grid layout)
>>
>>I am adding my views to the ContainerView
>>
>>I need to be able to change the attributes of the containerView, as
>>items get added to or dropped from the list, and to enable some
>>different viewing options.
>
>
> Look for #viewNamed:.  Ian has made some nice use of it in at least a couple
> of his goodies.  Prior to learning that trick from Ian, I named the
> container view and attached a CompositePresenter (which would for Dolphin>=5
> be Presenter) to it in #createComponents.  Either approach works.  The
> latter approach automatically caches the result, but you can do the same
> thing yourself by simply not calling #viewNamed: inside loops etc., or by
> adding an instance variable that you assign once, probably in #onViewOpened.
>
>
>
>>Of course, I also want to add a bunch of menu options, some status
>>stuff, ect.  I'm assumming that I can use the ViewComposer for the
>>static stuff, and the window layout down to the container. I could then
>>reference the container and take care of everything else in code.  Is
>>that wishful thinking on my part ?
>
>
> It will probably work.  You might not like the results for very large
> numbers of objects though.  That's what finally pushed me over the edge
> toward realizing that native widgets ultimately produce colored pixels on
> the screen, and if I can do that more efficiently some other way, the result
> is happier users and probably more portable code too.
>
> Have a good one,
>
> Bill

Thanks, and thanks for the speed with which you replied.  It has
definetly kept me from getting frustrated.  Between your help and Ian's
I think I'm on my way.

Take care
Dan



>
> --
> Wilhelm K. Schwab, Ph.D.
> [hidden email]
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Andy Bower
In reply to this post by Dan Antion
Dan,

> >>That's good to hear. So is it possible to create a view/presenter
> >>combination and add it dynamically during program operation, with all
> >>the defined features (like menus)?

There was a recent thread (28/11/02) entitled "Better MVP Resources" where I
posted a reply that showed how to dynamically create a scrollable array of
sub-components. This may (or may not) be the sort of thing you're looking
for. For the attached code you'll have to be using a news server that
supports attachments (news.totallyobjects.com is one).

> >>A more concrete example is an
> >>applicaiton I have done in VAST.  I have a system that can be configured
> >>to monitor/alter certain control parameters.  The parameters are in
> >>groups. The initial view of the system is the most basic group only, as
> >>a single tab in a notebook style part.  The user can select up to 4
> >>additional tabs, which are different views entirely.  Once they save
> >>their settings, that's how the part will open.  Each time, as the part
> >>opens, I add the tabs they have selected.  The views aren't hidden, they
> >>simply aren't added until requested.  The users can also rearrange the
> >>order and, if they wanted to, they could add multiple copies of one
part.

In Dolphin, you'll probably want to override #onViewOpened in the parent
presenter so you can build the child tabs that you need. Bear in mind that
the PublishedAspectInspector used by Flipper and the ViewComposer
essentially does something similar to show the appropriate tabs each time an
aspect is selected. Take a look at
PublishedAspectInpector>>createAspectPresenters:.

Best Regards,

Andy Bower
Dolphin Support
http://www.object-arts.com
---
Are you trying too hard?
http://www.object-arts.com/Relax.htm
---


Reply | Threaded
Open this post in threaded view
|

Re: New to Dolphin - Default view ???

Dan Antion
Andy Bower wrote:

> Dan,
>
>
>>>>That's good to hear. So is it possible to create a view/presenter
>>>>combination and add it dynamically during program operation, with all
>>>>the defined features (like menus)?
>>>
>
> There was a recent thread (28/11/02) entitled "Better MVP Resources" where I
> posted a reply that showed how to dynamically create a scrollable array of
> sub-components. This may (or may not) be the sort of thing you're looking
> for. For the attached code you'll have to be using a news server that
> supports attachments (news.totallyobjects.com is one).
>
>
>>>>A more concrete example is an
>>>>applicaiton I have done in VAST.  I have a system that can be configured
>>>>to monitor/alter certain control parameters.  The parameters are in
>>>>groups. The initial view of the system is the most basic group only, as
>>>>a single tab in a notebook style part.  The user can select up to 4
>>>>additional tabs, which are different views entirely.  Once they save
>>>>their settings, that's how the part will open.  Each time, as the part
>>>>opens, I add the tabs they have selected.  The views aren't hidden, they
>>>>simply aren't added until requested.  The users can also rearrange the
>>>>order and, if they wanted to, they could add multiple copies of one
>>>
> part.
>
> In Dolphin, you'll probably want to override #onViewOpened in the parent
> presenter so you can build the child tabs that you need. Bear in mind that
> the PublishedAspectInspector used by Flipper and the ViewComposer
> essentially does something similar to show the appropriate tabs each time an
> aspect is selected. Take a look at
> PublishedAspectInpector>>createAspectPresenters:.
>

This is exactly what I ended up doing, it's good to realize it was an
acceptable choice.  The hardest thing with adapting to a new language is
learning the right way to do things.  I'm sure that Dolphin, like every
language I've ever dealt with, allows you to do things that work, but
probably aren't good things to do.  I've learned a lot from the tips and
  code provided here, and I am very glad you guys stepped in so fast.

Thanks to all who replied
Dan

> Best Regards,
>
> Andy Bower
> Dolphin Support
> http://www.object-arts.com
> ---
> Are you trying too hard?
> http://www.object-arts.com/Relax.htm
> ---
>
>