Re: Code completion of member functions / attributes?
Re: Code completion of member functions / attributes?
- Subject: Re: Code completion of member functions / attributes?
- From: Chris Ridd <email@hidden>
- Date: Wed, 26 May 2004 07:34:15 +0100
On 25/5/04 9:40 pm, Jonathan del Strother <email@hidden> wrote:
> On 25 May 2004, at 19:59, Chris Espinosa wrote:
>
>> On May 25, 2004, at 10:16 AM, Jonathan del Strother wrote:
>>
>>> I'm programming in C++, and have noticed that auto-complete doesn't
>>> appear to work for the '.' and '->' operator.
>>>
>>> For instance, if I'm trying to access an attribute of a struct, or a
>>> function in a class, it'll complete the struct / class fine, but
>>> won't drill down to the internal component I'm trying to get at.
>>>
>>> Does anyone else have this problem, or is it a standard XCode issue?
>>
>> It works for me here, and I don't find any bug reports about it.
>> Could you try in a different project? I opened
>> /Developer/Examples/Carbon/AppearanceSample, upgraded it to native,
>> turned on Code Completion in the Code Sense panel of the project's Get
>> Info box, then went to SliderPane.cp line 227 and entered
>>
>> DrawPictureProc(pane->
>>
>> and it offered to complete with the fields of the pane class.
>>
>
>
> Odd. That worked.
>
> However, when I go back to my own Carbon project, and put something
> like this:
>
> struct Numbers
> {
> float one;
> int two;
> };
>
> void DoStuff()
> {
> Numbers completeMe;
>
> completeMe.
>
>
> It just tells me that no completions were found. Code completion is
> definitely there - if I start typing 'comp' it will suggest
> 'completeMe' - it's just not looking up the contents of the struct.
>
> I've tried rebuilding the index, and all the relevant items are ticked
> under Code Sense. Any other ideas?
The Carbon example Chris mentioned is C++, and pane is declared as a
'SliderPane *', where SliderPane is a class. That's a bit different from
what you're doing.
Try declaring your completeMe variable as a 'struct Numbers'. IIRC using the
bare name of the struct is a C++ shortcut, although it might be legal in C99
as well.
Cheers,
Chris
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.