Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!pacbell.com!amdahl.com!netcomsv!uu4news.netcom.com!telesoft!east.alsys.com!news
From: "David K. Hacker" <dkh@aonix.com>
Subject: Re: VA dynamic dialogs and connections
Content-Type: text/plain; charset=us-ascii
Message-ID: <331B40F6.3760@aonix.com>
Sender: news@thomsoft.com
Reply-To: dkh@aonix.com
Content-Transfer-Encoding: 7bit
Organization: Aonix
References: <5f2i62$fko@proxy5.ozemail.com.au>
Mime-Version: 1.0
Date: Mon, 3 Mar 1997 21:21:58 GMT
X-Mailer: Mozilla 3.0 (Win95; I)
Lines: 56

magoo wrote:
> 
> Hi,
> 
> I have been trying to dynamically create new subdialogs. The idea is,
> that when a user selectes an items from a list, the application then
> opens a dialog  with a view on the selected object. The number of
> objects in the list will vary.
> 
> I've managed to start the dialogs, but am having trouble linking or
> passing down the object. Initially I tried to 'set' the subcomponent
> variable which holds the reference to the chosen object. That didn't
> work. So then I tried setting up a dynamic connection and that doesn't
> seem to work either.
> 
> Obviously, I've missed something.
> 
> the code I've been playing around with looks like :-
> 
>         self subpartNamed: windowName ifAbsent: [
>                 self subpartNamed: windowName
>                         put: [ v: = AbtAppBldrViewWrapper newPart abtAttachPart).
>                         v viewPartClass: LmQueueView.
>         ( nc := AbttributeToAttributeConnection new
>                 connectSource: (self subPartNamed: 'currLmSystemObjs')
>                 featureName: #self
>                 feature: AbtVariable IS_self
>                 toTarget: v
>                 featureName: #lmSystemObjects
>                 feature: LmQueueView IS_lmSystemObjects ).
>         nc connect; initializeConnection.
> 
>         v abtPerformActionNamed: #openWidget.
> 
> The window comes up, but the connection does not 'fire'. I tried a
> variation, where the source was a local instance variable referencing
> the source object.
> Is there any good documentation (other than the examples in the
> generated abtBuildInternals ?
> 
> thanks
>         Mike
Mike;

If I understand your question properly, I have done lots of the kind of
thing you are describing.

I would staticly create a dialog for each class of object that you have
in the list. Pass in the selected item from the list to the dialog, and
open the dialog. You will need a way of mapping the domain object class
to the dialog part class, then open the dialog. Doing things this way
there is no "dynamic" component.

Let me know if I missed the point, or if I can help further.

Dave
