Board index » delphi » Multiple form views/single BO interaction design?

Multiple form views/single BO interaction design?

All,

I'm at a crossroads in my design and thought I'd turn to this group.

I am designing an IDE and I wish to have two views of the same BO.  The BO
is a list of all the current elements (think of them as components), as
stored in TElementList.  The two views are an element browser, basically a
treeview of all elements, and then the preview, which is the actual
rendering of the elements.
My question is what is a good way for all these things to interact?  If I
select something in the browser I wish the preview to reflect that, and
vice-versa.  I can add\remove as well.  The two views are independent
though, meaning basically two non-modal forms.  You can view just the
preview, just the browser, both, or none.  The TElementList is always in
memory though, loaded from a file.

I have a few ideas but wanted some other views.

Simian

 

Re:Multiple form views/single BO interaction design?


Quote
"Simian Jones" <simianjo...@hotmail.com> wrote in message

news:3a5e1a7a$1_2@dnews...

Quote
> I am designing an IDE and I wish to have two views of the same BO.  The BO
> is a list of all the current elements (think of them as components), as
> stored in TElementList.  The two views are an element browser, basically a
> treeview of all elements, and then the preview, which is the actual
> rendering of the elements.

I use a basic form that holds a reference to a BO. this means I can inherit
as many different views azs I wish, but the underlying OK/Cancel/Apply logic
is in the base form class.

--
Joanna Carter
Remove .Hat to reply

Re:Multiple form views/single BO interaction design?


Hi Joanna,

Quote
> I use a basic form that holds a reference to a BO. this means I can
inherit
> as many different views azs I wish, but the underlying OK/Cancel/Apply
logic
> is in the base form class.

This sounds quite interesting.  Is it possible to show us an example of
this, maybe with some code ?

Best regards,

Stefaan

Re:Multiple form views/single BO interaction design?


Quote
> This sounds quite interesting.  Is it possible to show us an example of
> this, maybe with some code ?

The very simple framework I published in Attachments had an example of this,
called BaseDetails.

Philip Brown

Re:Multiple form views/single BO interaction design?


Quote
"Stefaan Lesage" <Stefaan_Les...@Peopleware.be> wrote in message

news:3a5eb734_2@dnews...

Quote
> This sounds quite interesting.  Is it possible to show us an example of
> this, maybe with some code ?

Here is the class declaration :

  TPDProperties = class(TForm)
    pcProperties: TPageControl;
    tsGeneral: TTabSheet;
    pnlButtons: TPanel;
    btnOK: TButton;
    btnCancel: TButton;
    btnApply: TButton;
    procedure btnOKClick(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
    procedure btnApplyClick(Sender: TObject);
  private
    fObject: TPDObject;
    fDirty: Boolean;
    procedure SetDirty(const Value: Boolean);
    property Dirty: Boolean
             read fDirty
             write SetDirty;
  protected
    function GetObject: TPDObject;
    procedure ReadProperties; virtual; abstract;
    procedure WriteProperties; virtual;
  public
    constructor Create(AObject: TPDObject); reintroduce; virtual;
  published
    procedure edtChange(Sender: TObject);
  end;

--
Joanna Carter
Remove .Hat to reply

Re:Multiple form views/single BO interaction design?


Quote
"Philip Brown" <notinsofham.p...@informatica.uk.com> wrote in message

news:3a5ed478_2@dnews...

Quote

> The very simple framework I published in Attachments had an example of
this,
> called BaseDetails.

> Philip Brown

Hi Phil,
Well, I seem to have the same problems as many others here.  During the last
two weeks I've been trying to find your post in the Attachments newsgroup
but without luck.

Best regards,

Stefaan

Re:Multiple form views/single BO interaction design?


Simian - seems like the above answers have gone down a totally different
route.

I think you need some form of subject observer mechanism.  Have you ever
played with Bold?  They've implemented this bit _really_ well.  Your list
form and your preview form observe the 'current_index' on the list BO.  The
list form sets it, and uses the observer_notify to set the visual index
pointer.  The preview form uses the observer_notify to change the BO element
it is displaying.  This was you could have any number of forms viewing the
list in different ways, all tied to the current element changes made in
other forms.

Bryan

Quote
"Simian Jones" <simianjo...@hotmail.com> wrote in message

news:3a5e1a7a$1_2@dnews...
Quote
> All,

> I'm at a crossroads in my design and thought I'd turn to this group.

> I am designing an IDE and I wish to have two views of the same BO.  The BO
> is a list of all the current elements (think of them as components), as
> stored in TElementList.  The two views are an element browser, basically a
> treeview of all elements, and then the preview, which is the actual
> rendering of the elements.

> My question is what is a good way for all these things to interact?  If I
> select something in the browser I wish the preview to reflect that, and
> vice-versa.  I can add\remove as well.  The two views are independent
> though, meaning basically two non-modal forms.  You can view just the
> preview, just the browser, both, or none.  The TElementList is always in
> memory though, loaded from a file.

> I have a few ideas but wanted some other views.

> Simian

Other Threads