[baseten-users] BXDatabaseContext usage

Réjean Lamy rejean.lamy at mac.com
Tue May 19 17:21:53 EEST 2009


Correct me if I'am wrong,  my understanding of KVC is:

- We can access object instance variables directly with key-value,  
there is no need to have getter/setter for the variable. The variable  
must be an Object.
- If we provides getter/setter for the variable, key-value will use it.

About IBOutlet, to me, its simply a keyword that provides the variable  
visibility to IB. Actually I don't connect this Outlet in IB to  
anything, but simply bind the variable.
We can remove the IBOutlet keyword from the declaration, the result  
will be the same.

RL

Le 09-05-19 à 09:43, Réjean Lamy a écrit :

>
> Le 09-05-19 à 09:32, Erik Aderstedt a écrit :
>
>> Hi!
>>
>>> 3- Add an NSObject to the nib and change its class to  
>>> "MyAppController"
>>> 4- Bind the BXSynchronizedArrayController's  "Database Context"  
>>> parameter to the MyAppController's "databaseContext" IBOutlet
>>
>> Correct me if I'm wrong, but you seem to be mixing IBOutlets with  
>> bindings? If you want to bind the database context of a  
>> BXSynchronizedArrayController to that of the MyAppController, you  
>> don't need to specify the databaseContext member as an IBOutlet.  
>> What you _do_ need to do is to make MyAppController key-value- 
>> compliant for the key databaseContext, by at least adding a getter  
>> method for the databaseContext (Obj-C 2.0 properties will do nicely  
>> of course).
>>
>
> We can access object instance variables directly with KV. No ?
>
>> As was mentioned before; if you have multiple nibs set up in this  
>> way you'll get a different BXDatabaseContext object in each nib,  
>> which is probably not what you want.
>
> When using multiple nibs, I'am passing the databaseContext via  
> IBoutlet to the nibs File's Owner.
>
>
>>
>> Regards,
>> Erik Aderstedt
>> Aderstedt Software AB
>>
>>
>> _______________________________________________
>> baseten-users mailing list
>> baseten-users at lists.basetenframework.org
>> http://lists.basetenframework.org/mailman/listinfo/baseten-users
>
>
> _______________________________________________
> baseten-users mailing list
> baseten-users at lists.basetenframework.org
> http://lists.basetenframework.org/mailman/listinfo/baseten-users




More information about the baseten-users mailing list