Re: Programatically Setting Delegate
Re: Programatically Setting Delegate
- Subject: Re: Programatically Setting Delegate
- From: Alexander Spohr <email@hidden>
- Date: Sun, 6 Dec 2009 16:12:46 +0100
I translate you url for a better understanding for other readers:
You google:
> you forgot to allocate the object before setting it's delegate
The result:
> No results found for "you forgot to allocate the object before setting it's delegate".
So what are you telling us?
Maybe you should have shown code.
The error message is clearly not because you forgot an alloc. The compiler does not check if you pointer is pointing to a valid object or nil or garbage. How should it?
Or I completely misunderstood what you wanted to know. I am sorry then for pointing you to the obvious.
atze
Am 05.12.2009 um 20:57 schrieb Chunk 1978:
> i figured it out. alexander, this would have been more helpful:
> http://tinyurl.com/yjpeljv
>
> On Sat, Dec 5, 2009 at 2:42 PM, Chunk 1978 <email@hidden> wrote:
>> thanks for teaching me how to use google. huge help.
>>
>> unfortunately, since i've imported both UIKit and my controller class
>> into my custom UIImageView class, my question is wasn't what does that
>> error mean, but why am i receiving it.
>>
>> On Sat, Dec 5, 2009 at 6:45 AM, Alexander Spohr <email@hidden> wrote:
>>> http://lmgtfy.com/?q=error+request+for+member+is+something+not+a+structure+of+union
>>>
>>> atze
>>>
>>>
>>> Am 05.12.2009 um 09:12 schrieb Chunk 1978:
>>>
>>>> i have a UIViewController that i'm setting as the delegate for my
>>>> custom UIImageView class. from my custom UIImageView class i want the
>>>> delegate to change it's background color (based on computations
>>>> performed within the UIImageView class).
>>>>
>>>> in my UIViewController i write:
>>>> –––––
>>>> myUIImageViewClass.classDelegate = self;
>>>> –––––
>>>>
>>>> then in my custome UIImageViewClass i synthisize the accessor method
>>>> for the classDelegate, which is of type id. then from within the code
>>>> i try to change the background color of it's delegate with this:
>>>> –––––
>>>> [[classDelegate view] setBackgroundColor:[UIColor greenColor]];
>>>> –––––
>>>>
>>>> if i write it like classDelegate.view.backgroundColor = ... then i
>>>> receive and error saying "error request for member is something not a
>>>> structure of union"
>>>
>>>
>>
> _______________________________________________
>
> 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
_______________________________________________
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