Professional Web Applications Themes

Bindings and tables .. how? - Mac Programming

I've gone through the examples at: http://developer.apple.com/doentation/Cocoa/Conceptual/CocoaBindings While I'm impressed at how easy it is to make a table with the bindings and controllers, I can't figure out how to connect the tables made with the bindings to actual code. Specifically, what I'd like to do is to alter the finished app made in the Enhanced Currency Converter (example at the above link) so it stores the contents of the tables it fills in an array of objects, with each object holding the dollarsToConvert, exchangeRate, and amountInOtherCurrency values in the appropriate variables. Any pointers on how to do this? -- ...

  1. #1

    Default Bindings and tables .. how?

    I've gone through the examples at:

    http://developer.apple.com/doentation/Cocoa/Conceptual/CocoaBindings

    While I'm impressed at how easy it is to make a table with the
    bindings and controllers, I can't figure out how to connect the tables
    made with the bindings to actual code.

    Specifically, what I'd like to do is to alter the finished app made in
    the Enhanced Currency Converter (example at the above link) so it
    stores the contents of the tables it fills in an array of objects,
    with each object holding the dollarsToConvert, exchangeRate, and
    amountInOtherCurrency values in the appropriate variables.

    Any pointers on how to do this?

    --
    C Lund, www.notam02.no/~clund
    C Guest

  2. #2

    Default Re: Bindings and tables .. how?

    C Lund <no> wrote:
     

    The Enhanced Currency Converter example is already doing exactly that.
    m.

    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

  3. #3

    Default Re: Bindings and tables .. how?

    In article <1g7cf6f.9yb5ul1j7l24yN%com>,
    com (matt neuburg) wrote: [/ref]
     [/ref]
     [/ref]
     [/ref]
     [/ref]
     

    Yeah, but how do I access this array of objects with code? Lets say I
    want to store the above in an NSMutableArray *theList so I can access
    it programmatically. How do I do that?

    --
    C Lund, www.notam02.no/~clund
    C Guest

  4. #4

    Default Re: Bindings and tables .. how?

    C Lund <no> wrote:
     [/ref]
    > [/ref]
    > [/ref]
    > [/ref]
    > [/ref]

    >
    > Yeah, but how do I access this array of objects with code? Lets say I
    > want to store the above in an NSMutableArray *theList so I can access
    > it programmatically. How do I do that?[/ref]

    It is already stored in an NSMutableArray. That is what the
    NSArrayController is managing. That is what its arrangedObjects is. So
    you can access the array through the NSArrayController (RTFM under
    NSArrayController). If you also want this to be some object's
    NSMutableArray theList, bind it through an ObjectController to theList
    (that is what the first half of the tutorial was about, remember?). m.

    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

Similar Threads

  1. Bindings
    By Tobie_Trice in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: March 31st, 05:35 PM
  2. PHP Textbox Bindings
    By Prellyan in forum Dreamweaver AppDev
    Replies: 6
    Last Post: July 7th, 09:14 AM
  3. Ruby bindings
    By Elias Athanasopoulos in forum Ruby
    Replies: 5
    Last Post: November 4th, 06:54 AM
  4. How to use Bindings?
    By microsoft99 webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 18th, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139