Look over my code please?

Member
Posts: 43
Joined: 2009.02
Post: #1
Could someone please look over my code?

Controller.h: http://pastie.org/511233
Controller.m: http://pastie.org/511234

The main.xib correctly sets up the 'field' IBOutlet (an NSTextView) and -(IBAction)inserted:(id)sender is sent by an NSTextField. Those two things are just about the only thing working >_>

I'm trying to connect to a MUD and send/receive data at the same time.
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #2
Sorry, I can't help, I'm plain C with carbon Smile. But maybe you could try to find the problem - many people have neither the time nor patience to read all of your code?

~ Bring a Pen ~
Quote this message in a reply
Member
Posts: 194
Joined: 2009.02
Post: #3
mikey Wrote:Sorry, I can't help, I'm plain C with carbon Smile. But maybe you could try to find the problem - many people have neither the time nor patience to read all of your code?

This is the most ridiculous reply I've ever seen.
Quote this message in a reply
Member
Posts: 43
Joined: 2009.02
Post: #4
I'm completely lost wikth the errors that gives me. Thats more of the problem. It was late last night (for me, atleast), and it looks like a totally forgot to give any helpful information >_>

EDIT: Sorry, that error is kinda long (It just keeps going, and going.)

The error I'm getting (over...and over... and over...) is this:
Quote:2009-06-14 08:53:49.865 GMC[6892:10b] Vertscroller instantiated.
2009-06-14 08:53:50.795 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1691e0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:50.980 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x160130 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:50.982 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:50.985 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x15fa70 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:50.986 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:50.987 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x11f3d0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:50.988 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x160220 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:50.989 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:50.989 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x11dc30 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:50.990 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:50.991 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x161820 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:50.992 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x16b1d0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:50.993 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:50.994 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x163df0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.004 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.007 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1632b0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.008 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x163da0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.014 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.015 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1209f0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.016 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.017 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x167550 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.017 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1209a0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.018 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.020 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x165ac0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.020 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.021 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x162c10 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.022 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x165a70 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.023 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.024 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x14f0b0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.025 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.025 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x16b0f0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.026 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x14f060 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.027 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.028 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x167710 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.029 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.034 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1405b0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.036 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1676c0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.036 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.037 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x13f930 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.038 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.073 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x167ef0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.075 GMC[6892:3703]
I'm on PowerBook G4 Leopard. I don't plan on shipping out to any other platforms besides possibly intel leopard, so I haven't used any autorelease pools (Objective-c 2.0 takes care of that?).

On a side not: My spacebar is sticking horridly. Sad
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #5
See the NSAutoreleasePool class reference. If your application calls autorelease (directly or indirectly) in a context where no autorelease pool has been allocated for you (for example, in a secondary thread, or in a custom run loop not using NSApplicationMain), you have to manage one yourself by allocating and releasing it at the appropriate times.
Quote this message in a reply
Member
Posts: 43
Joined: 2009.02
Post: #6
Ah thanks. It doesn't look like my input is getting to the MUD tho, or atleast it is and I'm not reading frmo the MUD more than once... Any idea what could be happening?
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #7
Quote:This is the most ridiculous reply I've ever seen.
How? I was just trying to explain that I once posted 500+ lines of code and said:
"Why is this not working?". I just wanted to help. HuhHuh

~ Bring a Pen ~
Quote this message in a reply
Moderator
Posts: 373
Joined: 2006.08
Post: #8
erm, ya, I thought that reply was fine too (although there wasn't too much code posted, so it worked out fine Smile)

Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
It sounds like you think you're using garbage collection with ObjC 2.0; if you're getting this message, then you're not. You'll need to turn on garbage collection in your target settings if that's what you want.
Quote this message in a reply
Post Reply