Re: [bme-develop] emoticon code in cvs
Status: Planning
Brought to you by:
sirmik
|
From: Simon T. <sim...@ga...> - 2004-04-05 15:15:51
|
> Hi, > > >had to change line 55 in IconManager.cpp, from: > >BBitmap *emoticon = manager->findEmoticon(&subString); > >to > >Emoticon *emoticon = manager->findEmoticon(&subString); > > > Right! my fault!!! I changed the code...and didn't compile all > files....anyway if you pass ":D" it should return a smiling emoticon > in the > emoticon structure....but I haven't tested this yet! I will continue > on the > code this week and hope I will have it finished...one problem though! > I'm > expecting major program crashes because of simultanious accessing > the > BList(via a pointer passed in the message) and the Emoticon > structure....I > think simultanious methods calls will cause that...so we have to test > for > that....I have a solution for the Emoticon Structure....archiving it > into > the message(yeah I know that would increase the memory usage...but if > it > isn't possible in another way...)....the BList of emoticons will be a > problem though...since a BList can't be archived...:S any > suggestions? Had a bit more of a chance to look at the code. I'm a little confused by the ownership model - for example the IconManager gets deleted in the destructor of the IconHandler; but gets constructed somewhere else. Any reason why this can't be created by the IconHandler? Same for some other bits. Hmm the BList shouldn't chage after it's been loaded right? I can't see why there would be a problem with 2 threads accessing the list at the same time (as long as they use different pointers, owned by the threads themselves). Saying that, I don't think you should call BList methods from other threads, but providing the BList doesn;t change, you should be able to pass the pointer returned by BList::Items() along with the number of items returned by BList::CountItems(). I'm know very little about multithreaded issues though, so I may be wrong. > >Haven't really looked at the code yet. > Also it it isn't finished yet :D lol > regards, > > Tim Simon |