G
Guest
My query was realated to delegates
My purpose for using delegate is to invoke dynamically a function from a particular class,
It is like thi
Class A
Transaction main clas
Class
Controller class
WINDOWS UI .
final UI
Now I got a kind of requirement like two phase commitment. It means first one is to commit the records into DB, next is to write that data into a magantic strip with a help of hardware. If this writing of data into hardware fails , then this records written to database should be rolled back. But i do not have control to manually commit the records, i have to rely on Class A.
So when called from UI to save the records, first it go to Class A, save the records, then uses delegate. This is invoke class B's method. Because Class B is the one which does the funcationalities of with UI. Here, class B's method is acutally a function pointed by Class A's delegate. Here I am struck. I am not able to invoke like this. But I guess this way it is possible to be done. I am looking for your help at this place
If this is been done, then class B's method will notify Class A whether writing of data to magantic strip was successfull or failure. When Class A finally gets update on this, it can decide on commiting the records or to roll back
Hope to get your updates
Thanks and Regards,
Sach
My purpose for using delegate is to invoke dynamically a function from a particular class,
It is like thi
Class A
Transaction main clas
Class
Controller class
WINDOWS UI .
final UI
Now I got a kind of requirement like two phase commitment. It means first one is to commit the records into DB, next is to write that data into a magantic strip with a help of hardware. If this writing of data into hardware fails , then this records written to database should be rolled back. But i do not have control to manually commit the records, i have to rely on Class A.
So when called from UI to save the records, first it go to Class A, save the records, then uses delegate. This is invoke class B's method. Because Class B is the one which does the funcationalities of with UI. Here, class B's method is acutally a function pointed by Class A's delegate. Here I am struck. I am not able to invoke like this. But I guess this way it is possible to be done. I am looking for your help at this place
If this is been done, then class B's method will notify Class A whether writing of data to magantic strip was successfull or failure. When Class A finally gets update on this, it can decide on commiting the records or to roll back
Hope to get your updates
Thanks and Regards,
Sach