Skip to content

Codesense not working all the time in XCode 3.2 #3

@timknapen

Description

@timknapen

The Auto Suggestion feature of XCode3.2 doesn't work "sometimes"...
If you add a class to ProjectFolder/src/ the auto completion works, but the exact same code for one of the standard library classes in Arduino.app doesn't trigger the auto completion correctly.

example:

ArduinoProgram.h

#ifndef ARDUINO_PROGRAM_H
#define ARDUINO_PROGRAM_H

#include "WProgram.h"
#include "Stepper.h"    // in Arduino.app
#include "TestThing.h"  // in Projectfolder/src/ 

class ArduinoProgram {
public:

    void setup();
    void loop();

    // variables
    TestThing thing1;
    TestThing* thingPointer1;

    Stepper stepper1;
    Stepper* stepperPointer1;

};

#endif

ArduinoProgram.cpp

#include "ArduinoProgram.h"

void ArduinoProgram::setup(){

    // These work
    thing1.doSomething(0);          // CodeSense suggested void doSomething(int variable)

    thingPointer1->doSomething(0);  // CodeSense suggested void doSomething(int variable)

    TestThing thing2;
    thing2.doSomething(0);          // CodeSense suggested void doSomething(int variable)

    TestThing* thingPointer2;       
    thingPointer2->doSomething(0);  // CodeSense suggested void doSomething(int variable)


    // These fail:
    stepper1.step(0);               // CodeSense says "No completions found"

    stepperPointer1->step(0);       // CodeSense says "No completions found"

    // These Work:
    Stepper stepper2;
    stepper2.step(0);               //CodeSense suggested void step(int number_of_steps)

    Stepper * stepperPointer2;
    stepperPointer2->step(0);       //CodeSense suggested void step(int number_of_steps)

}


void ArduinoProgram::loop(){
    //
}

TestThing.h

#ifndef TEST_THING
#define TEST_THING

#include "WProgram.h"

class TestThing{
public:
    void doSomething(int variable);

};

#endif

TestThing.cpp:

#include "TestThing.h"

void TestThing::doSomething(int variable){
    // do something
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions