Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 26, 2011, 02:28 AM   #1
newformac
Banned
 
Join Date: May 2011
How can set label value of window B from window A?

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.
newformac is offline   0 Reply With Quote
Old May 26, 2011, 05:50 AM   #2
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by Learner View Post
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?
gnasher729 is offline   0 Reply With Quote
Old May 26, 2011, 06:15 AM   #3
newformac
Thread Starter
Banned
 
Join Date: May 2011
Quote:
Originally Posted by gnasher729 View Post
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.
newformac is offline   0 Reply With Quote
Old May 26, 2011, 01:21 PM   #4
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
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.
gnasher729 is offline   0 Reply With Quote
Old May 27, 2011, 07:36 AM   #5
newformac
Thread Starter
Banned
 
Join Date: May 2011
can u please explain me with any example.
newformac is offline   0 Reply With Quote
Old May 27, 2011, 08:45 AM   #6
ehoui
macrumors regular
 
Join Date: Jan 2011
Quote:
Originally Posted by Learner View Post
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.
ehoui is offline   0 Reply With Quote
Old May 27, 2011, 12:02 PM   #7
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by Learner View Post
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.
gnasher729 is offline   0 Reply With Quote
Old Jun 10, 2011, 01:07 AM   #8
newformac
Thread Starter
Banned
 
Join Date: May 2011
thanks.
newformac is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Any way to set custom window sizes for different displays? Traverse Mac Basics and Help 10 Jul 6, 2014 08:40 AM
entire window moves when attempting to click and drag element in window HELP chlc MacBook Pro 0 Feb 10, 2014 05:08 PM
I have a new Mail message window opened. How to set it's Subject via Applescript? madsylar Mac Programming 1 Aug 30, 2013 04:45 AM
Would love icons on finder window to incrementally bump window width 1611mac OS X 10.8 Mountain Lion 0 Jan 30, 2013 02:41 PM
Window flickers in Safari when resizing window Pegbiter OS X 0 Jun 13, 2012 09:14 AM

Forum Jump

All times are GMT -5. The time now is 07:32 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC