Monday, August 19, 2019

#1 2019-05-20 11:02:26 pm

technomorph
Member
Registered: 2017-12-14
Posts: 114

Include Controllers in Frameworks? And IB action values

In most frameworks I've used I've never really seen
View controllers or controllers used.

Often it's always a demo app that then will
Have its own view controller classes implemented

So i figure why not include them in the framework if
The work has already gone into it?

Or is there another way to make methods available
That don't have an IBAction on them?
Available as action outlets.
Rather than just creating a controller class that has
IBActions that just go ahead and then call
The other classes methods. (And gathering appropriate
Values from other sources.

Also could someone explain a bit more about the target action
And target value bindings in a IB control element?

I've been trying to figure out how to gather data I need for
Something like a buttons action.  Where it gathers values either from
Other IB elements (or even from other Objects)

For example when I click a Button
I'd like to also gather two other values from text fields
And include them in the "action" sent.
And should this be available via a sender attribute?

Rhanks

Offline

 

#2 2019-05-21 01:21:55 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5821

Re: Include Controllers in Frameworks? And IB action values

Frameworks, by their nature, are self-contained. That mostly, but not always, precludes a lot of UI stuff.

Rather than just creating a controller class that has
IBActions that just go ahead and then call
The other classes methods. (And gathering appropriate
Values from other sources.



A separate controller is generally considered good design.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Online

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)