discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One question about subclass


From: Markus Hitter
Subject: Re: One question about subclass
Date: Thu, 25 Sep 2008 02:12:07 +0200


Am 25.09.2008 um 00:44 schrieb Germán Arias:

For example, I create a subclass of NSImageView, I set its methods and all OK. But when my app is running and I alloc and init my subclass I don't see the object's instance. I don't get any error. Can somebody tell me what is the
problem?

As always, code snippets are great ...

Interesting would be, why you create a subclass. Subclassing is in Obj-C a lot less in fashion (= rarely used) than in C++, as Obj-C has categories (extensions to a class) and GNUstep/Cocoa makes a lot of use of this capability.

Back to your question: Where would you expect to "see" something? If you mean like appearing on the screen, then you have to connect this view to a window somehow. Typically as a subview of the window's contentView. Gorm would do this connection automatically when dragging an NSImageView from the palette into a window.


MarKus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/








reply via email to

[Prev in Thread] Current Thread [Next in Thread]