Newsgroups: comp.lang.smalltalk
From: hassnain.malik@cressoft.com.pk (Hassnain Waheed)
Subject: Re: VW2.5 - Incorporating multiple selection to DataSet widget
Date: Tue, 8 Oct 1996 09:56:25 LOCAL
Message-ID: <hassnain.malik.15.0026A000@cressoft.com.pk>
Lines: 91
References: <52u2pq$n8d@ansible.bbt.com> <325927FA.6B19@str.daimler-benz.com> <3258C788.175A@iitb.fhg.de>
Organization: CresSoft
X-Newsreader: Trumpet for Windows [Version 1.0 Rev B.7]
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!portc01.blue.aol.com!news-e2a.gnn.com!howland.erols.net!vixen.cso.uiuc.edu!newsfeed.internetmci.com!newsfeeder.servtech.com!news1.io.org!ki.net!sussi.cressoft.com.pk!cressoft.com.pk!hassnain.malik

In article <3258C788.175A@iitb.fhg.de> "Daniel J. Hutzel" <hutzel@iitb.fhg.de> writes:
>From: "Daniel J. Hutzel" <hutzel@iitb.fhg.de>
>Subject: Re: VW2.5 - Incorporating multiple selection to DataSet widget
>Date: Mon, 07 Oct 1996 11:04:08 +0200

>Volker Wurst wrote:
>> 
>> Wayne Jong wrote:
>> 
>> As far as I know the DataSetView, adding MultiSelection requires at
>> least very big programming effort [...]

>I definitely can confirm this. When I tried to add multi-select
>capabilities to the existing implementation I soon reached a point where
>the whole thing got quite complicated and confused. This was mainly due
>to the fact that DataSetView doesn't inherit from SequenceView, sharing
>the vast amount of behavior, but from SelectionView re-implementing many
>things available in SequenceView. And it does this in a rather
>complicated and awkward way.

>> [...] if not a complete rewrite of the DSV.

>This was the conclusion of the above: I decided to make a new
>implementation of DataSetView which inherits from MultiSelection-
>SequenceView. Additionally, the new implementation supports the
>interface of the old DataSetView, thus allowing it (a) to be created and
>configured in Interface Painter as before and (b) to be used in place of
>any old DataSetView.

>> The DSV has many deficiencies. PP should have programmed it as a
>> framework and not as an unextendable Blackbox-Component.

>Exactly!

>> It is much easier to add MultiSelection capabilities to the TableView.

>I tried this too, but found that TableView ins't very smart either.

>> You might look also into some 3rd party table widgets.
>> 
>> >
>> > Hi,
>> >
>> > I was wondering if anyone has had experience with the above.
>> > The DataSet widget in VW2.5 allows only one row to be selected
>> > at a time, which I feel is a big limitation.  I would appreciate
>> > any replies re. successful solutions to this problem.
>> >
>> > Wayne Jong
>> > wcj@bbt.com

>-- 
>Daniel J. Hutzel
>Fraunhofer-Institut IITB
>Karlsruhe, Germany

>e-mail: hutzel@iitb.fhg.de
>voice:  +49 721 6091-437
>web:    http://pc11.iitb.fhg.de:8000

Hello Daniel
You should have two view classes a) which have capability to deal with single 
SimpleDataSetView and b) which have capability to deal with 
MultiSelectionDataSetView. After that when you build a DataSetView into the 
builder i.e. dispatchTo: policy with: builder, you first of all check 
isMultiSelect if it is true then you should create the 
MultiSelectionDataSetView. This will help to manage the multi selection 
dataset. When you will define the defaultModel method it look like 
defaultModelFor: aBuilder
  self isMultiSelect
       ifTrue: [ MultiDataSetSelectionInList new ]
      iFalse: [ SimpleSelectionInList new ] 

MultiDataSetSelectionInList  class should inherit form SelectionInList. You 
should add some action method like add: remove: etc. in 
MultiDataSetSelectionInList class. 
I hope  this will work.

Regards
Hassnain

**************************************************************************
                          Smalltalk Passion Of Life
                          *************************
Hassnain Waheed                                  hassnain@usa.net
Smalltalk Developer                          ilu@hasnain.brain.net.pk
                                          hassnain.malik@cressoft.com.pk
--------------------------------------------------------------------------
Feet small?  Nose runs?  Hey -- you're upside down!
--------------------------------------------------------------------------
**************************************************************************						
