Thursday, 21 April 2011

Multiple XIBs connecting to the same Object?


hey guys,

i'm working on objective c project multiple xibs. keep project simple, i've put of processing within myprojectappdelegate file. make connection of iboutlets view objects, added nsobject each xib , set class myprojectappdelegate. thought link them same instance of appdelegate, hasn't. appears it's creating different instance each of xib files. question is, possible link 3 xibs same instance of myprojectappdelegate, or class matter?
 

i believe architecture of objective c/cocoa on mac doesn't allow that. idea 1 controller instance per model. write controller every instance of works same instance of model (dirty way: singleton, better way: database of kind transactions , locks). there lot of issues can come when writing data if not done properly. if make 1 view can manipulate data @ time, makes life lot easier. might want data binding view , model together. databinding isn't "normal" os x development thing can done. been helpful me on windows side of things displaying , editing data multiple views or multiple parts of window.


cocoa databinding:
http://cocoaconvert.net/2009/05/31/two-way-data-binding-in-cocoa/
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment