[baseten-users] BXDatabaseContext usage
Daniel Brajkovic
daniel at brajkovic.com
Wed May 20 00:52:58 EEST 2009
As far as multiple Nibs are concerned when sharing a single
BXDatabaseContext, is [myBXSynchronizedArrayController fetch:NULL]
within the action that loads the view/window the best way to go?
(seems to work for me).
Dan
On May 19, 2009, at 4:47 PM, Tuukka Norri wrote:
> Réjean Lamy kirjoitti 19.5.2009 kello 23.54:
>> Thanks for your quick answers. Problem effectively seems around how
>> to connect and when.
>> I tried with connectAsync instead of connectSync and now I have the
>> auto-fetch working !
>>
>> Any advises ?
>
> Well, it depends :)
> -connectAsync probably works because your other nib has time to load
> before the connection gets made. Meanwhile, the array controller
> begins to observe connection notifications, and fetches as soon as
> it gets one. I wouldn't count on this behaviour, though.
>
> If it doesn't matter if your application blocks while connecting,
> you can use -connectSync:. If you want to display a progress
> indicator or something like that while connecting, -connectAsync and
> -connect: are better options. Generally, -connectSync: is better
> suited for command line tools.
>
> If all your nibs get loaded before your connection attempt begins,
> it suffices to set your array controllers to fetch on connect. If
> not, you should probably call -fetch: or -
> fetchWithRequest:merge:error: manually instead.
>
> BXDatabaseContext has some delegate methods, which are called when
> the connection gets made. See BXDatabaseContextDelegateProtocol.h
> for details.
> --
> Best regards,
> Tuukka Norri
> MK&C
>
> _______________________________________________
> baseten-users mailing list
> baseten-users at lists.basetenframework.org
> http://lists.basetenframework.org/mailman/listinfo/baseten-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://lists.basetenframework.org/pipermail/baseten-users/attachments/20090519/44b2e589/attachment.bin>
More information about the baseten-users
mailing list