Ask a Question related to Mac Programming, Design and Development.
-
matt #1
message passing via NSViews w/o actual Cocoa calls
Hi, I'm fairly new to Cocoa programming; have been doing a few of the
tutorials in Hillegass' book. I've spent some time with OGL though,
so right now I'm trying to do a simple port of an app written a while
back in glut using glui as a simple GUI interface. This question may
have more to do with simple objective-c than with cocoa, but here
goes.
Here's my situation:
I've managed to get multiple windows with subclasses of NSOpenGLView
up and running and rendering simple polygons. I also have simple
message passing thanks to IB; i.e. clicking an NSButton shows or hides
a polygon. My problem is, thanks to Interface Builder, I can't seem
to access either of the actual NSOpenGLView-subclasses as pointers.
What I would ultimately like to do is be able to pass some information
from one NSOpenGLView subclass to the other one, without having to go
through IBOutlets and IActions. Interface Builder seems to hide quite
a bit of information; i.e. when one creates a window and puts an
NSOpenGLView inside it, where exactly is the pointer to the
NSOpenGLView?
searches for keywords such as "objective-c message passing", etc.
didn't quite turn up what I was looking for, so if anyone has
pointers, comments, or hints I would be much appreciative.
thanks,
matt
matt Guest
-
Getting the actual message being transmitted
I am calling a webmethod using a proxy class generated using WSDL. Is it possible to get the actuall request message that is being submitted during... -
Check the actual FPS and use it as a variable
Hello, Just saw your post about getting the actual FPS in a variable, was wondering if you got the solution. Thanks a lot. -
Parsing the client URL rather than the actual URL
Greetings, I've been reading up on Search Engine optimisation, and I've come across a little gem which makes me realise my pages are probably all... -
actual publishing
I have Publisher 2000. I used the tutorials, which were very helpful. I even did the Nav Bar Wizard. I guess I don't understand how this is... -
Async Message Passing Mechanism Wanted
Is there a Perl module that implements a low-overhead FIFO (order-preserving) async message passing mechanism and works on Windows and Unix? It... -
Paul Mitchum #2
Re: message passing via NSViews w/o actual Cocoa calls
matt <matthew.romaine@jp.sony.com> wrote:
What you're trying to do is no different from trying to get a reference> Hi, I'm fairly new to Cocoa programming; have been doing a few of the
> tutorials in Hillegass' book. I've spent some time with OGL though,
> so right now I'm trying to do a simple port of an app written a while
> back in glut using glui as a simple GUI interface. This question may
> have more to do with simple objective-c than with cocoa, but here
> goes.
>
> Here's my situation:
>
> I've managed to get multiple windows with subclasses of NSOpenGLView
> up and running and rendering simple polygons. I also have simple
> message passing thanks to IB; i.e. clicking an NSButton shows or hides
> a polygon. My problem is, thanks to Interface Builder, I can't seem
> to access either of the actual NSOpenGLView-subclasses as pointers.
> What I would ultimately like to do is be able to pass some information
> from one NSOpenGLView subclass to the other one, without having to go
> through IBOutlets and IActions. Interface Builder seems to hide quite
> a bit of information; i.e. when one creates a window and puts an
> NSOpenGLView inside it, where exactly is the pointer to the
> NSOpenGLView?
>
> searches for keywords such as "objective-c message passing", etc.
> didn't quite turn up what I was looking for, so if anyone has
> pointers, comments, or hints I would be much appreciative.
to any other view on a window. Your button likely has an IBOutlet to
your NSOpenGLView. That's the pointer you're looking for (actually an
id, not a pointer, but the distinction isn't important in this context).
You can set up your controller class (or whatever other class needs it;
maybe the other gl views, maybe the window, and so on) with similar
IBOutlets and then just play snap-together in IB.
Paul Mitchum Guest
-
matt neuburg #3
Re: message passing via NSViews w/o actual Cocoa calls
In <fa39fc69.0308122318.1f3bc5ca@posting.google.com > matt wrote:
There are no "pointers" to anything inside IB. If you create an outlet> when one creates a window and puts an
> NSOpenGLView inside it, where exactly is the pointer to the
> NSOpenGLView
in one instance and connect it to something else, that will be a
"pointer". What's there is what you put there. m.
--
matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
[url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
Subscribe to TidBITS. It's free and smart.
matt neuburg Guest
-
matt #4
Re: message passing via NSViews w/o actual Cocoa calls
[email]usenet@mile23.com[/email] (Paul Mitchum) wrote in message news:<1fzluvb.egrnvn14v03pcN%usenet@mile23.com>...
Paul, thanks. In the examples that I've done, IBOutlets have been> What you're trying to do is no different from trying to get a reference
> to any other view on a window. Your button likely has an IBOutlet to
> your NSOpenGLView. That's the pointer you're looking for (actually an
> id, not a pointer, but the distinction isn't important in this context).
> You can set up your controller class (or whatever other class needs it;
> maybe the other gl views, maybe the window, and so on) with similar
> IBOutlets and then just play snap-together in IB.
attached to NSObjects, such as:
IBOutlet NSButton *button;
IBOutlet NSBox *box;
but in my case, I just want one function in an NSOpenGLView to
immediately call another one in a different NSOpenGLView; so is it
legit to do:
IBOutlet void function_that_calls_IAction_in_other_NSOpenGLVIew;
?
Just want to confirm before I head down this path.
thanks again,
matt
matt Guest



Reply With Quote

