FROM : Alastair Houghton
DATE : Fri Nov 23 18:16:25 2007
On 23 Nov 2007, at 17:03, David Alger wrote:
> This particular app would be a full-screen app. The main window,
> covering most if not all of the screen, would have a background
> image with other controls directly on top of it. They would be
> customized to the extent I could in IB & sub-classed if necessary,
> which I know that I will have to do to achieve the behavior &
> appearance I want in some. Since the NSImage view doesn't support
> sub-views (I'm assuming it doesn't since IB won't let me put any in
> it), I was trying to have the NSImage view behind the other views so
> I wouldn't have to customize a NSView & draw the image manually.
Ah, I see. IB may not let you put subviews inside it, but I think
you'll find that you can add them programmatically, in which case the
normal view machinery will work just fine.
Another (probably easier) way to achieve something similar would be to
use a custom view, set its class to NSImageView, then initialise it
from your -awakeFromNib routine in your application's controller
object. IB *will* let you put views inside a custom view.
I think that should solve the problem for you without needing any
support for overlapped sibling views.
> This will be my very first app written in Cocoa/Obj-C, and I'm very
> used to having compositing views in Carbon. I won't be overlapping
> views like this though if it isn't really supported, since I don't
> want my app to possibly have erratic drawing/refresh behavior.
As I say, child views are pretty much always supported, even though IB
might not let you create them in some cases.
Kind regards,
Alastair.
--
http://alastairs-place.net
DATE : Fri Nov 23 18:16:25 2007
On 23 Nov 2007, at 17:03, David Alger wrote:
> This particular app would be a full-screen app. The main window,
> covering most if not all of the screen, would have a background
> image with other controls directly on top of it. They would be
> customized to the extent I could in IB & sub-classed if necessary,
> which I know that I will have to do to achieve the behavior &
> appearance I want in some. Since the NSImage view doesn't support
> sub-views (I'm assuming it doesn't since IB won't let me put any in
> it), I was trying to have the NSImage view behind the other views so
> I wouldn't have to customize a NSView & draw the image manually.
Ah, I see. IB may not let you put subviews inside it, but I think
you'll find that you can add them programmatically, in which case the
normal view machinery will work just fine.
Another (probably easier) way to achieve something similar would be to
use a custom view, set its class to NSImageView, then initialise it
from your -awakeFromNib routine in your application's controller
object. IB *will* let you put views inside a custom view.
I think that should solve the problem for you without needing any
support for overlapped sibling views.
> This will be my very first app written in Cocoa/Obj-C, and I'm very
> used to having compositing views in Carbon. I won't be overlapping
> views like this though if it isn't really supported, since I don't
> want my app to possibly have erratic drawing/refresh behavior.
As I say, child views are pretty much always supported, even though IB
might not let you create them in some cases.
Kind regards,
Alastair.
--
http://alastairs-place.net
| Related mails | Author | Date |
|---|---|---|
| David Alger | Nov 23, 04:49 | |
| Ricky Sharp | Nov 23, 05:02 | |
| Jon Hess | Nov 23, 08:09 | |
| Scott Anguish | Nov 23, 09:06 | |
| David Alger | Nov 23, 14:22 | |
| Ricky Sharp | Nov 23, 14:27 | |
| Alastair Houghton | Nov 23, 17:01 | |
| David Alger | Nov 23, 18:03 | |
| Ricky Sharp | Nov 23, 18:16 | |
| Alastair Houghton | Nov 23, 18:16 | |
| Jean-Daniel Dupas | Nov 23, 18:16 | |
| David Alger | Nov 23, 18:40 | |
| Jon Hess | Nov 24, 06:06 | |
| Scott Anguish | Nov 24, 08:40 | |
| Uli Kusterer | Nov 24, 11:25 | |
| Uli Kusterer | Nov 24, 11:29 | |
| Scott Anguish | Nov 24, 23:47 | |
| Uli Kusterer | Nov 26, 09:57 |






Cocoa mail archive

