PDA

View Full Version : How can set label value of window B from window A?




newformac
May 26, 2011, 01:28 AM
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
May 26, 2011, 04:50 AM
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
May 26, 2011, 05:15 AM
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
May 26, 2011, 12:21 PM
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.

newformac
May 27, 2011, 06:36 AM
can u please explain me with any example.

ehoui
May 27, 2011, 07:45 AM
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
May 27, 2011, 11:02 AM
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.

newformac
Jun 10, 2011, 12:07 AM
thanks.