Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

New crypt. See /usr/news/crypt.


programming / comp.lang.smalltalk.dolphin / Re: Hello View!! can I speak to your re-Presenter?

SubjectAuthor
* Hello View!! can I speak to your re-Presenter?F Bek
`* Re: Hello View!! can I speak to your re-Presenter?john.a...@gmail.com
 `* Re: Hello View!! can I speak to your re-Presenter?F Bek
  `- Re: Hello View!! can I speak to your re-Presenter?F Bek

1
Subject: Hello View!! can I speak to your re-Presenter?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 18 Jan 2021 15:43 UTC
X-Received: by 2002:a05:620a:546:: with SMTP id o6mr155895qko.269.1610984605797;
Mon, 18 Jan 2021 07:43:25 -0800 (PST)
X-Received: by 2002:a9d:5b4:: with SMTP id 49mr72464otd.136.1610984605536;
Mon, 18 Jan 2021 07:43:25 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 18 Jan 2021 07:43:25 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=80.79.148.136; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 80.79.148.136
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <20d161d1-fa74-4972-adbb-f8b5a8a87eb7n@googlegroups.com>
Subject: Hello View!! can I speak to your re-Presenter?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Mon, 18 Jan 2021 15:43:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 20
View all headers
Beginner's question,
Dolphin Smalltalk 7.1.19

Well, now that I have a pretty compact MPV, with a Model composed of a class, a subclass, and an abstract class on top, two corresponding Presenter classes, and an abstract Presenter on top, holding a single View servicing both model classes.

I would like to access some of the View's Number/TextPresenters and even StaticText to vary their properties, and even hide/show them, depending on the calling model. 

I understand that Presenter>>onViewAvailable would be the right place to add such code, but have no idea how to identify each component of the View in order to talk to them. All I've noticed however was that the View components have some sort of id number e.g. (16r100E8E) next to their class names and names.
  
Thank you for reading and eventually answering.
FB
___________________________________________


Subject: Re: Hello View!! can I speak to your re-Presenter?
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 19 Jan 2021 09:40 UTC
References: 1
X-Received: by 2002:a37:4f8e:: with SMTP id d136mr3403664qkb.329.1611049242002;
Tue, 19 Jan 2021 01:40:42 -0800 (PST)
X-Received: by 2002:a05:6808:25a:: with SMTP id m26mr2010911oie.179.1611049241739;
Tue, 19 Jan 2021 01:40:41 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 19 Jan 2021 01:40:41 -0800 (PST)
In-Reply-To: <20d161d1-fa74-4972-adbb-f8b5a8a87eb7n@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.71.185; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.71.185
References: <20d161d1-fa74-4972-adbb-f8b5a8a87eb7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5551a07a-e0fe-4628-a2dd-d63f8b53e6c7n@googlegroups.com>
Subject: Re: Hello View!! can I speak to your re-Presenter?
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Tue, 19 Jan 2021 09:40:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Hi,

Where a view is linked to a presenter (e.g. your Number/TextPresenters) you can just ask the presenter for its view, e.g.

myNumberPresenter view disable

Note you need to do this in your presenter's onViewOpened method rather than onViewAvailable, since the presenter and view are not yet linked at the point onViewAvailable is invoked.

For views without a corresponding presenter (e.g. StaticText), if you name them in the View Composer (set their 'name' aspect to a String) you can look them up by that name, e.g.

(self view viewNamed: 'myLabel') text: 'This is a label'

Hope this helps.

John


On Monday, January 18, 2021 at 3:43:26 PM UTC, fbek...@gmail.com wrote:
Beginner's question,
Dolphin Smalltalk 7.1.19

Well, now that I have a pretty compact MPV, with a Model composed of a class, a subclass, and an abstract class on top, two corresponding Presenter classes, and an abstract Presenter on top, holding a single View servicing both model classes.

I would like to access some of the View's Number/TextPresenters and even StaticText to vary their properties, and even hide/show them, depending on the calling model.

I understand that Presenter>>onViewAvailable would be the right place to add such code, but have no idea how to identify each component of the View in order to talk to them. All I've noticed however was that the View components have some sort of id number e.g. (16r100E8E) next to their class names and names.

Thank you for reading and eventually answering.
FB
___________________________________________


Subject: Re: Hello View!! can I speak to your re-Presenter?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 19 Jan 2021 10:06 UTC
References: 1 2
X-Received: by 2002:a37:76c6:: with SMTP id r189mr3522874qkc.24.1611050790405;
Tue, 19 Jan 2021 02:06:30 -0800 (PST)
X-Received: by 2002:aca:1109:: with SMTP id 9mr2073893oir.131.1611050790106;
Tue, 19 Jan 2021 02:06:30 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 19 Jan 2021 02:06:29 -0800 (PST)
In-Reply-To: <5551a07a-e0fe-4628-a2dd-d63f8b53e6c7n@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=80.79.148.136; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 80.79.148.136
References: <20d161d1-fa74-4972-adbb-f8b5a8a87eb7n@googlegroups.com> <5551a07a-e0fe-4628-a2dd-d63f8b53e6c7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3227cb3e-1ddf-49b0-a82d-e2d8ffd64cb2n@googlegroups.com>
Subject: Re: Hello View!! can I speak to your re-Presenter?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Tue, 19 Jan 2021 10:06:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 50
View all headers
Thanks John, this is great. 
Experimenting!
Regards,
FB
___________________________________________

On Tuesday, January 19, 2021 at 11:40:42 AM UTC+2, john.a...@gmail.com wrote:
Hi,

Where a view is linked to a presenter (e.g. your Number/TextPresenters) you can just ask the presenter for its view, e.g.

myNumberPresenter view disable

Note you need to do this in your presenter's onViewOpened method rather than onViewAvailable, since the presenter and view are not yet linked at the point onViewAvailable is invoked.

For views without a corresponding presenter (e.g. StaticText), if you name them in the View Composer (set their 'name' aspect to a String) you can look them up by that name, e.g.

(self view viewNamed: 'myLabel') text: 'This is a label'

Hope this helps.

John
On Monday, January 18, 2021 at 3:43:26 PM UTC, fbek...@gmail.com wrote:
Beginner's question,
Dolphin Smalltalk 7.1.19

Well, now that I have a pretty compact MPV, with a Model composed of a class, a subclass, and an abstract class on top, two corresponding Presenter classes, and an abstract Presenter on top, holding a single View servicing both model classes.

I would like to access some of the View's Number/TextPresenters and even StaticText to vary their properties, and even hide/show them, depending on the calling model.

I understand that Presenter>>onViewAvailable would be the right place to add such code, but have no idea how to identify each component of the View in order to talk to them. All I've noticed however was that the View components have some sort of id number e.g. (16r100E8E) next to their class names and names.

Thank you for reading and eventually answering.
FB
___________________________________________


Subject: Re: Hello View!! can I speak to your re-Presenter?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 19 Jan 2021 10:37 UTC
References: 1 2 3
X-Received: by 2002:a05:620a:12e5:: with SMTP id f5mr3432057qkl.331.1611052644669;
Tue, 19 Jan 2021 02:37:24 -0800 (PST)
X-Received: by 2002:aca:60d6:: with SMTP id u205mr2128390oib.82.1611052644420;
Tue, 19 Jan 2021 02:37:24 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 19 Jan 2021 02:37:24 -0800 (PST)
In-Reply-To: <3227cb3e-1ddf-49b0-a82d-e2d8ffd64cb2n@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=80.79.148.136; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 80.79.148.136
References: <20d161d1-fa74-4972-adbb-f8b5a8a87eb7n@googlegroups.com>
<5551a07a-e0fe-4628-a2dd-d63f8b53e6c7n@googlegroups.com> <3227cb3e-1ddf-49b0-a82d-e2d8ffd64cb2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <da06a873-ace9-4ec1-b201-68c7512e92e3n@googlegroups.com>
Subject: Re: Hello View!! can I speak to your re-Presenter?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Tue, 19 Jan 2021 10:37:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Works like a charm! Thanks again John!
_____________________________________________
On Tuesday, January 19, 2021 at 12:06:30 PM UTC+2, F Bek wrote:
Thanks John, this is great.
Experimenting!
Regards,
FB
___________________________________________
On Tuesday, January 19, 2021 at 11:40:42 AM UTC+2, john.a...@gmail.com wrote:
Hi,

Where a view is linked to a presenter (e.g. your Number/TextPresenters) you can just ask the presenter for its view, e.g.

myNumberPresenter view disable

Note you need to do this in your presenter's onViewOpened method rather than onViewAvailable, since the presenter and view are not yet linked at the point onViewAvailable is invoked.

For views without a corresponding presenter (e.g. StaticText), if you name them in the View Composer (set their 'name' aspect to a String) you can look them up by that name, e.g.

(self view viewNamed: 'myLabel') text: 'This is a label'

Hope this helps.

John
On Monday, January 18, 2021 at 3:43:26 PM UTC, fbek...@gmail.com wrote:
Beginner's question,
Dolphin Smalltalk 7.1.19

Well, now that I have a pretty compact MPV, with a Model composed of a class, a subclass, and an abstract class on top, two corresponding Presenter classes, and an abstract Presenter on top, holding a single View servicing both model classes.

I would like to access some of the View's Number/TextPresenters and even StaticText to vary their properties, and even hide/show them, depending on the calling model.

I understand that Presenter>>onViewAvailable would be the right place to add such code, but have no idea how to identify each component of the View in order to talk to them. All I've noticed however was that the View components have some sort of id number e.g. (16r100E8E) next to their class names and names.

Thank you for reading and eventually answering.
FB
___________________________________________


1
rocksolid light 0.7.2
clearneti2ptor