• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting started in Cocoa and IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting started in Cocoa and IB


  • Subject: Re: Getting started in Cocoa and IB
  • From: Julien Silland <email@hidden>
  • Date: Tue, 3 Dec 2002 17:37:43 +0100

Le mardi, 3 dic 2002, ` 17:28 Europe/Paris, John Clark a icrit :
>>
>
> Well, one thing that did not seem obvious was how to refer to the
> InterfaceBuilder
> placed TextField object. In your example you refer to the myTextField
> object,
> but how does one make the reference to the IB created instance.
>
> I did connect the text field object to an action, and I get to that
> action when
> I type text and enter return, but at that point I don't have a good
> understanding
> of what is the object's name to then extract the string (or converted
> integer
> numbers next..)
>
> Thanks
> John Clark
>
>
>
In your case, I think the TextField object has to be an Outlet instead
of an Action. You have to connect from your app to the TextField. The
Outlet has to be declared first in your class header :

IBOutlet id myTextField;

The small piece of code I wrote in the previous mail is to be put in an
Action function (which can be triggered by the click on a button). The
user enters some text in the TextView, clicks on a button and then you
can do whatever you want with what the user wrote.

Julien Silland
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Getting started in Cocoa and IB (From: John Clark <email@hidden>)

  • Prev by Date: Re: Debugging Cocoa Apps
  • Next by Date: RE: cocoa-dev digest, Vol 2 #1610 - 14 msgs
  • Previous by thread: Re: Getting started in Cocoa and IB
  • Next by thread: RE: cocoa-dev digest, Vol 2 #1610 - 14 msgs
  • Index(es):
    • Date
    • Thread