🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
3 messages
3 total messages Started by steggieeric Eric Fronberg Wed, 29 Jul 1992 16:34
how do outlets work?
#317
Author: steggieeric Eric Fronberg
Date: Wed, 29 Jul 1992 16:34
38 lines
1709 bytes
This may be a naive question.  I'm confused about the workings of
outlets in interface builder. I understand what outlets are supposed
to do -- provide access to instances of other objects, but I'm 
confused how Interface Builder accomplishes this.

So if I have a interface definition to myobject

@interface myobject:Object
{
    id  outlet1;
    id  outlet2;
}
...
@end

I use IB to set outlet1 and outlet2 to some object instances in my 
application. Later when I invoke the app and send a message to 
myobject, outlet1 and outlet2 properly have object instances assigned 
to them.

How does the startup code gain access to what I believe are private 
variables in myobject to initialize them properly?  What syntax would 
I use if I were to try to do this manually?  


Maybe I'm off with some of my assumptions on how ObjectiveC works.  
In any case I'd appreciate if someone could enlighten me.

Thanks,

-- eric


--------------------------------------------------------------
| Eric Fronberg    |  email: eric@steggie.mtview.ca.us       |
| Mountain View CA |        ...!{sun,sgi,ultra}!steggie!eric |
| 415 957-2748     |  vmail: "Hey you!"                      |
--------------------------------------------------------------
Re: how do outlets work?
#324
Author: Scott Anguish
Date: Wed, 29 Jul 1992 19:19
41 lines
1439 bytes
Eric Fronberg writes
> This may be a naive question.  I'm confused about the workings of
> outlets in interface builder. I understand what outlets are supposed
> to do -- provide access to instances of other objects, but I'm 
> confused how Interface Builder accomplishes this.
> 
> So if I have a interface definition to myobject
> 
> @interface myobject:Object
> {
>     id  outlet1;
>     id  outlet2;
> }
> ...
> @end


	That brings up a question that I have about outlets...

	In the preliminary 1.0 documentation interface builder also generated
methods that would initialize these like

- setOutlet1:sender
{
	[ some method call I can't remember ]
	return self;
}

	Is this still supported?  I can't find it anywhere in the current  
documentation.

	If it is still supported, and is pretty certain to be supported in the  
future, I have a few places i could really use this.

	thanks

	scott

-- 
- Scott Anguish -
sanguish@digifix.com (NextMail)
Re: how do outlets work?
#332
Author: Subrata Sircar
Date: Wed, 29 Jul 1992 22:45
30 lines
1802 bytes
>Eric Fronberg writes
>> This may be a naive question.  I'm confused about the workings of
>> outlets in interface builder. I understand what outlets are supposed
>> to do -- provide access to instances of other objects, but I'm 
>> confused how Interface Builder accomplishes this.

Interface Builder actually does something like the following:

	if ([yourObject respondsTo:@selector(setTheOutlet:)])
		[yourObject setTheOutlet:outletID];

Those methods used to be automatically generated by IB, but are not anymore.
If you include them, you can do a lot of neat things in those methods.  They
are particularly useful with FormCells, where you can set the input format
and so forth.

sanguish@digifix.com writes:
>	Is this still supported?  I can't find it anywhere in the current  
>documentation.

It is still supported.  As far as the future goes, your guess is as good as
mine.



-- 
Subrata Sircar | ssircar@canon.com | Prophet & SPAMIT Charter Member
Canon Information Systems and I do not speak for each other on all things.
"I wish people wouldn't instantly assume that I am an idiot." (Valentine)
"A restaurant is a whorehouse that does food instead of sex." (Roger Lustig)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads