FROM : António P.F.Almeida
DATE : Mon Feb 04 21:02:33 2008
I'm using Objective-C 2.0, in Mac Os X "Leopard" - does bindings work on it ?
Yes, I've created an NSButton, tagged it with IBOutlet and connected the outlet in IB.
I really mean "instance method"- and cannot assign value to the variable (contained in "if"-"else" statement) accordingly the checkbox is selected or not.
Must say that I never had such a problem in other languages (Java, C++) which I've used before.
Kyle Sluder wrote:
> On Feb 4, 2008 7:04 AM, "António P. F. Almeida"
> <<email_removed>> wrote:
>
>> I want to use a checkbox to set a value to a variable accordingly its
>> state .
>>
>
> Take a look at bindings. It's designed to do precisely what you want.
> Barring that, you can use target/action as you seem to be doing.
>
>
>> That checkbox is declared in header file and working fine.
>>
>
> Just to clarify: you've created an NSButton ivar, tagged it with
> IBOutlet, and connected the outlet in IB, correct?
>
>
>> However, if I use it inside a function, the checkbox state is ignored
>> and the variable value is always assigned as that statement doesn't
>> exist.
>>
>
> This sentence doesn't really make sense.
> 1) I'm guessing by "function" you mean "instance method" based on the
> code you provide.
> 2) Which variable is assigned what value?
> 3) Statements can't "not exist". Not really sure what you meant here.
>
> --Kyle Sluder
>
>
>
--
António P.F.Almeida
DATE : Mon Feb 04 21:02:33 2008
I'm using Objective-C 2.0, in Mac Os X "Leopard" - does bindings work on it ?
Yes, I've created an NSButton, tagged it with IBOutlet and connected the outlet in IB.
I really mean "instance method"- and cannot assign value to the variable (contained in "if"-"else" statement) accordingly the checkbox is selected or not.
Must say that I never had such a problem in other languages (Java, C++) which I've used before.
Kyle Sluder wrote:
> On Feb 4, 2008 7:04 AM, "António P. F. Almeida"
> <<email_removed>> wrote:
>
>> I want to use a checkbox to set a value to a variable accordingly its
>> state .
>>
>
> Take a look at bindings. It's designed to do precisely what you want.
> Barring that, you can use target/action as you seem to be doing.
>
>
>> That checkbox is declared in header file and working fine.
>>
>
> Just to clarify: you've created an NSButton ivar, tagged it with
> IBOutlet, and connected the outlet in IB, correct?
>
>
>> However, if I use it inside a function, the checkbox state is ignored
>> and the variable value is always assigned as that statement doesn't
>> exist.
>>
>
> This sentence doesn't really make sense.
> 1) I'm guessing by "function" you mean "instance method" based on the
> code you provide.
> 2) Which variable is assigned what value?
> 3) Statements can't "not exist". Not really sure what you meant here.
>
> --Kyle Sluder
>
>
>
--
António P.F.Almeida
| Related mails | Author | Date |
|---|---|---|
| António P.F.Almeid… | Feb 4, 13:04 | |
| Kyle Sluder | Feb 4, 17:08 | |
| António P.F.Almeid… | Feb 4, 21:02 | |
| I. Savant | Feb 4, 21:37 | |
| António P.F.Almeid… | Feb 5, 01:18 | |
| I. Savant | Feb 5, 01:39 | |
| Kyle Sluder | Feb 5, 05:07 |






Cocoa mail archive

