Re: UI bindings
Re: UI bindings
- Subject: Re: UI bindings
- From: Ariel Feinerman <email@hidden>
- Date: Fri, 17 Feb 2017 01:11:13 +0200
Thank you very much for you response! I know KVC and KVO. I have read on
Cocoa Bindings and really not found what I looked for. I experimented and
realised that bindings set the value to variable (or value in dictionary)
only when you edit the view (text field in my example) but I set default
values in IB (as set title prop) and bindings invalidates them -- the
fields become empty when UI is loaded. Only I wish to save all of them into
plist like collection of dictionaries and arrays when I click the save
button. I need not any interaction I only need to set them from plist when
UI is loaded and save them by request .
Can you give me some advice?
On Fri, Feb 10, 2017 at 7:34 PM, Keary Suska <email@hidden>
wrote:
>
> > On Feb 9, 2017, at 5:52 PM, Ariel Feinerman <email@hidden>
> wrote:
> >
> > I have finished the core of my programme and now I am designing the UI.
> The
> > issue is that it has several tabs and about a hundred fields. I wish to
> > make a mechanism which can gather values and save them in the
> hierarchical
> > structure of NSArrays and NSDictionaries which I can send to core
> library,
> > save as plist or map into XML. And, of course, I should be able to
> restore
> > UI from it .
> >
> > I guess Cocoa Bindings can do all of that. However, I have never used it
> > and do not know where to begin. Any examples and suggestions will be
> highly
> > appreciated.
>
> If you haven’t already, read the Key-Value Coding and Key-Value Observing
> guides. Make sure all of your model classes are compliant with both. Then
> read the Cocoa Bindings Programming Topics guide, which has links to all
> the other docs so you can start there if you prefer. Read through all the
> linked supported docs as well. That will be enough for most
> implementations. If or when you get into issues not addressed in those
> documents you will find most answers in the archives. Cocoa bindings have
> been around for a really long time and have changed very little since their
> inception so any (good) advice on the subject will still be relevant
> regardless of how old. And what is not addressed in the archives can be
> addressed here but please be specific and reference all of the involved
> objects, binding names and key paths.
>
> Oh, and avoid storyboards at this stage as (IMHO) they are unintuitive and
> flout all other MVC documentation.
>
> Keary Suska
> Esoteritech, Inc.
> "Demystifying technology for your home or business"
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
best regards
Ariel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden