QuickTime Movies with CB
I wasn't autoreleasing some cells
However the problem persists, the app crashes in the same way.
However the problem persists, the app crashes in the same way.
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
and you're sure that you aren't releasing cells when you shouldn't be?
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote:Originally posted by kelvin
and you're sure that you aren't releasing cells when you shouldn't be?
yes
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
something in one of the cell's subcell arrays is being released somehow. I really can't think of anything else without seeing a code sample.
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Really thank you, I'll made some checks.
Thank you, but at the moment I don't know exactly where the problem is and I should post the whole code
However it's going to be released
Quote:Originally posted by kelvin
I really can't think of anything else without seeing a code sample.
Thank you, but at the moment I don't know exactly where the problem is and I should post the whole code

However it's going to be released
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
I have some cells that are instances of CBCell's subclasses. Can this influence? In their init method they call [super init]. I autorelease them in this way:
Thank you
Code:
cell = [[[MySubclass alloc] init] autorelease];Thank you
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
CB has been known not to play nice with CBCell subclasses in the past. Can you show me the -init method of the subclass?
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
I've two main subclasses. One has this init:
The other is similar.
Thank you
Code:
- (id)initBubble: (KindOfBubble) theKind withView: (CBView*) theView
{
self = [super init];
[self setView:theView];
[self setKind:theKind];
[self setStatus:kNoMove];
[self setKindOfDamage:kFullDamage];
[self setSound:TRUE];
[[self view] addCell:self];
switch([self kind])
{
case kBubbleTwo:
[self setTexture:[[self view] textureNamed:@"bubbleTwo"]];
break;
case kBubbleOne:
default:
[self setTexture:[[self view] textureNamed:@"bubbleOne"]];
break;
}
[self setRegPoint:NSMakePoint([self size].width/2.0,[self size].height/2.0)];
return self;
}The other is similar.
Thank you
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
*thwaps junyx*
ok I know the methods are hidden, but seriously...
*blows steam*
DO NOT mess with the view property! CBCells have their view data managed automatically. -setView: is a hidden method that is used internally. By overriding it you are killing the view hierarchy. Don't mess with the view. The accessor provided will give you the view whose hierarchy contains that cell. Once a cell is added to a subcell of a view the -view accessor will return the view.
Code:
- (id)initBubble: (KindOfBubble) theKind withView: (CBView*) theView
{
if (![super init]) return nil;
[theView addCell:self];
[self setKind:theKind];
[self setStatus:kNoMove];
[self setKindOfDamage:kFullDamage];
[self setSound:TRUE];
switch([self kind])
{
case kBubbleTwo:
[self setTexture:[[self view] textureNamed:@"bubbleTwo"]];
break;
case kBubbleOne:
default:
[self setTexture:[[self view] textureNamed:@"bubbleOne"]];
break;
}
[self setRegPoint:NSMakePoint([self size].width/2.0,[self size].height/2.0)];
return self;
}---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
I'm so sorry... 
So CBView has its own setView: ... Oooops!
You just called [junyx dealloc]
Thank you, I'll correct the code

So CBView has its own setView: ... Oooops!
You just called [junyx dealloc]
Thank you, I'll correct the code
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
You should really name your private methods beginning with an underscore Kelvin, to help avoid mistakes like this
It works now
Thank you
Thank you
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
Quote:Originally posted by OneSadCookieindeed.
You should really name your private methods beginning with an underscore Kelvin, to help avoid mistakes like this![]()
-setView: is a unique case however. it mirrors AppKit functionality where there is an public accessor for a managed property. Most of the other hidden methods are prefixed by an underscore. The main reason I didn't underscore the method was that I was thinking of making it public, but several design pitfalls ended up forcing me to make it private after I had written it.
-setView: is very tempting to the new user to toy with, with very _bad_ results. Even if I fully documented the method unintentional abuse would make it just not worth leaving open.
I was just surprised that junyx over wrote the method when there's a valid accessor. Though not so much in hindsight... I had a similar problem with a stanford grad student who was trying to directly access _view (which by the way doesn't work).
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote:It works now
I was using the old version
It doesn't work. However I decided to use the old version without the movies, because time is running out
if ( [[iDevGames uDevGame] started] )
{
Thought *uDevGameEntry = (Thought*)[[brain thoughts] objectForKey:kUDevGameEntry];
[self setMainProgrammingProject:uDevGameEntry];
}
Time to PANIC!!!!
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| SDL & Quicktime | DM6 | 4 | 2,906 |
Jul 4, 2004 08:22 AM Last Post: Steven |
|

