Re: Return the value to a pop up window
Re: Return the value to a pop up window
- Subject: Re: Return the value to a pop up window
- From: "Rob Napier" <email@hidden>
- Date: Mon, 17 Mar 2008 16:41:55 -0400
On Mon, Mar 17, 2008 at 9:00 AM, Cocoa <email@hidden> wrote:
> I am trying to sodosomething more than the tutorial - Objective-C
> tutorial.pdf
>
> It's a Currency Converter application
>
> the part of the code is below:
>
> float amount;
> converter = [[Converter alloc]init];
> [converter setSourceCurrencyAmount:[dollarField floatValue]];
> [converter setRate:[rateField floatValue]];
> amount= [converter convertCurrency];
>
> [amountField setFloatValue:amount];
> [rateField selectText:self];
>
>
> amountField is a NSTextField, amount is a (float) returning answer.
>
> Can I declare a NSWindow in IB and build a connection from it to the
> action?
Assuming the above is the action in question, it should generally be
tied either to the input NSTextField or an NSButton. This is not the
kind of action an NSWindow would generally be involved in.
Please spend some time carefully considering your questions. The
readers of this list may often not know what you're talking about when
you refer to "tutorial.pdf" or "the tutorial." There are many out
there. You should explain what you are trying to achieve and what is
failing or what you do not understand. You can certainly declare an
NSWindow in IB and connect it to an action (the question you asked).
It is unlikely that you want to here (the question I believe you
meant).
-Rob
--
"Those who would give up essential liberty to purchase a little
temporary safety, deserve neither liberty nor safety." -- B. Franklin,
Printer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden