Don't worry, the allocation seems working now. A few autorelease pools did
the trick. I know just the most basic stuff and don't intend to learn more
simply because I'm not planning to use it at all. The simple layer only
calls other functions made in C++. That's all I need.

Anyway we are getting out of the topic. Does anyone here know why the modal
windows work in a plugin (in a normal application) and not from a console
application?

And 2 more things - the main view in the window still doesn't receive
keyboard input (I subclassed NSWindow adding canBecomeKeyWindow and
canBecomeMainWindow, both return true) and the cursor cannot be changed.
Any ideas?

Thanks.
Vojtech

Dne 1. listopadu 2011 22:58 Jens Alfke <j...@mooseyard.com> napsal(a):

>
> On Nov 1, 2011, at 11:41 AM, Vojtěch Meluzín wrote:
>
> Yaj, ok, can you explain a little more? I don't know much about Objective
> C, how should the MStringToNSString be implemented to create the
> autoreleased NSString? (sorry for lack of knowledge, but I just don't plan
> any further development in objc, just want the small layer...)
>
>
> If you don’t understand how to return an autoreleased string, then you
> really should go and learn more about Objective-C before you try to get
> your app running. Seriously, that is literally one of the first interview
> questions I ask candidates for entry-level Mac/iOS programming jobs. I
> wouldn’t want anyone who didn’t know the answer to that working on any
> Cocoa code I was using.
>
> I don’t mean to be rude, but it’s like you're saying “I don’t understand
> what malloc or free do, but I need help because my C program crashes when I
> call free”. Your chances of writing reliable code are pretty slim if you
> don’t know what you’re doing here, and we’re not likely to be able to help
> figure out a crash if it’s indirectly caused by something you’re doing
> wrong elsewhere in your code (which is what it sounds like is happening
> here.)
>
> If you’re really not willing to learn Cocoa, you could find a contract
> programmer who does, who can do just this piece of work for you.
>
> —Jens
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to