[interfacekit] Re: BHandler::fToken


> To answer you Adi, I think we probably had a decision made (and didn't
> realize it) when the original question was posted. Like Erik said, the
> server
> token and BHandler token discussions are separate issues. Erik has already
> implemented the BHandler one, and I've already got the server token one in
> place for now. BWindows will end up contacting the app_server in the
> constructor and end up receiving a token back from the server. BViews will
> have a their token member initialized to -1 in the constructor and when
> made
> known to the server via AddChild to a BWindow, the BView will notify the
> server of its creation and receive a token back. This BView token is
> unique
> and will remain set until its destruction. (heh...destruction... :D )
>

DW, Have you read the emails that Marc sent us???

I think he is absolutely right!

We should use BHandler::fToken on app_server side! PLEASE, read Marc's
emails to see why! BWindow::server_token will be initialized with a value
that BWindow receives in it's constructor, and BView::server_token
in AddChild(); a value that app_server has generated!

In BWindow constructor we send BWindow::fToken, then app_server,
does it's work and in the reply we will get a token witch we will store in
BWindow::server_token!

In BView::AddChild() we send a creation message with BView::fToken
attached to app_server, it does it's work and in the reply we will get a
token witch we will store in BView::server_token!

Messaging goes like this:
app_server->BWindow/BView
    - a message with... let's say
            ServerWindow::clientToken/Layer::clientToken attached.
            ( BHandler::fToken of it's associated BWindow/BView )

BWindow/BView->app_server
    - a message with
            BWindow::server_token/BView::server_token attached
            ( the value that app_server generated and sent to BWindow/BView)

Think about it and you will see that this is the best solution we've got so
far.
And, PEOPLE!, PLEASE! we have to reach a settlement!
I think all kind of solutions have been proposed, it is time to stop
this topic (in case of server tokens)! As Marc said, he, and me also, lost
a lot of time reading and writing emails, instead of writing code!

see ya guys!



Other related posts: