Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newformac

macrumors regular
Original poster
May 24, 2011
107
0
Hi all,

i am having two window form Window A and Window B.

i m open Window B from Window A,now i want to set text label value of Window B from Window A .

please tell me how can i do this?

thanks in advance.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
Hi all,

i am having two window form Window A and Window B.

i m open Window B from Window A,now i want to set text label value of Window B from Window A .

please tell me how can i do this?

thanks in advance.

Could you explain what you mean by "set text label value of Window B from Window A"?

And could you further explain how we can know whether you are writing for MacOS X, using Cocoa or Carbon, iOS, which version, Linux, Windows or whatever?
 

newformac

macrumors regular
Original poster
May 24, 2011
107
0
Could you explain what you mean by "set text label value of Window B from Window A"?

And could you further explain how we can know whether you are writing for MacOS X, using Cocoa or Carbon, iOS, which version, Linux, Windows or whatever?

i m working on mac 10.5 and xcode4 3.2
i m new for this.

i am creating two window form from interface builder,

1. is Window A or Parent Window
2. is Window B or Child Window

Child window open over the parent window,child window have one label view and i want to display some text here

so please tell me how can i do this?

thanks in advance.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
Open the NSTextField reference. (Developer Documentation in the Help menu). Enter NSTextField.

Look through the methods that are available. Anything like "title" or "value" or something like that that looks right?

If you can't find anything, look at the top if the NSTextField class reference where it says "Inherits from NSControl : NSView : NSResponder : NSObject". So try clicking on NSControl. Or look at "Companion Guide Text fields" and click on that.

You should find what you are looking for in the NSControl reference. Now that method is useful if you want to change or set the text when the program runs. If it is fixed, go into Interface Builder and look for a place to enter the property that you just found.
 

ehoui

macrumors regular
Jan 27, 2011
217
0
can u please explain me with any example.

Learner: your question, while precise to your particular application, is fairly generic and covered by Apple's documentation. It's exciting that you are learning Cocoa / Objective C, and we want you to succeed, but learn to use the available resources -- there is a wealth of information and examples there.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
can u please explain me with any example.

I gave you an example. Open the NSTextField class reference document. There are probably hundred other class reference documents that you can open for other things. I gave you an example what to search for, I gave you an example where to look further when you don't find things. I suggest you just go and follow my example step by step.

Alternatively, you can install GotoMyPC, give me access to your machine, and I'll do it all for you. I'll charge £100 per hour.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.