Subject | Re: [IBO] how to use FocusedDataSource? |
---|---|
Author | send2iwan |
Post date | 2008-08-23T04:41:52Z |
i am not fully understand, please help once again.
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 11:29 23/08/2008, you wrote:
> >and the result always nil, why?
>
> Perhaps you are testing at the wrong time, i.e., when no datasource
has focus.
no, i think because my IB_SearchBar1 can ReceiveFocus.
>
>
> >if i use Transaction.IB_Session.FocusedDataset in each form the
> >result is correct.
> >
> >may be i am wrong about ib_session? each Transaction start
ib_session
> >individual by automaticaly?
>
> Transactions don't "start" an ib_session. There should be exactly
one ib_session per thread. It is an object that must be created
first, before all other data-aware objects in the thread. It is a
"minder" for all other data-aware objects.
>
> For the main thread, IBO creates an implicit tib_session in design
time, as soon as you place any data-aware object in any form or
datamodule. If you want to, you can create an explicit ib_session
object for the mainform as your first object, or replace the implicit
one with an explicit one. For a thread module you *must* create an
explicit ib_session.
you mean in each form i must use one transaction component and one
ib_session component?
because if i use just one ib_session and one connection from main
datamodule, result always nil. even i already connect my transaction
component to that ib_session.
>
> Helen
>
thanks for helping us