presenterNamed: ....

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

presenterNamed: ....

talios@gmail.com
I'm sure I'm missing something ( as usual ), I'm trying to find a
presenter on my view to call ensureVisible on for a Wizard container,
however, I keep getting NotFoundError's.

My view has two presenters on it ( has more, but two in this example ):
smtpHost ( TextPresenter text editor ) and defaultLabel ( StaticText
TextPresenter ).

Inspecting

  SMSComposerSettingsShell new presenterNamed: 'smtpHost'

opens the inspector on the object fine, but

  SMSComposerSettingsShell new presenterNamed: 'defaultOutlookLabel'

Why would one presenter be there and not the other?

Looking at 'SMSComposerSettingsShell new subPresenters' gives an array
of presenters that DOESN'T include any containers or the static text
presenters.

Should I be accessing these differently somehow?


Reply | Threaded
Open this post in threaded view
|

Re: presenterNamed: ....

talios@gmail.com
Mark Derricutt wrote:

> I'm sure I'm missing something ( as usual ), I'm trying to find a
> presenter on my view to call ensureVisible on for a Wizard container,
> however, I keep getting NotFoundError's.
>
> My view has two presenters on it ( has more, but two in this example
> ): smtpHost ( TextPresenter text editor ) and defaultLabel (
> StaticText TextPresenter ).

Bah -solved that - it only gives me access to those Presenters I
explicitly create in #createComponents as opposed to just presenters on
the view...


Reply | Threaded
Open this post in threaded view
|

Re: presenterNamed: ....

Don Rylander-5
Mark,
"Mark Derricutt" <[hidden email]> wrote in message
news:cq7tce$[hidden email]...

> Mark Derricutt wrote:
>
>> I'm sure I'm missing something ( as usual ), I'm trying to find a
>> presenter on my view to call ensureVisible on for a Wizard container,
>> however, I keep getting NotFoundError's.
>>
>> My view has two presenters on it ( has more, but two in this example ):
>> smtpHost ( TextPresenter text editor ) and defaultLabel ( StaticText
>> TextPresenter ).
>
> Bah -solved that - it only gives me access to those Presenters I
> explicitly create in #createComponents as opposed to just presenters on
> the view...
For that, try #viewNamed:

HTH,

Don


Reply | Threaded
Open this post in threaded view
|

Re: presenterNamed: ....

Chris Uppal-3
In reply to this post by talios@gmail.com
Mark Derricutt wrote:

> [...] I'm trying to find a
> presenter on my view to call ensureVisible on for a Wizard container,

If you already have a reference to the View (or are using Don's suggestion of
#viewNamed), then you can send #ensureVisible directly to that view.  (All that
Presenter>>ensureVisible does is forward to the view).

    -- chris