Thank you for you reply dean,
My class definition is:
TBStructure.h:
---------------------
#include <PalmOS.h>
#include <PalmTypes.h>
#include <PalmCompatibility.h>
#include <System/SystemPublic.h>
#include <UI/UIPublic.h>
#ifndef TBSTRUCTURE_H
#define TBSTRUCTURE_H

class TBStructure{
public:

    TBStructure();
    virtual ~TBStructure();
    TBStructure(int x, int y, int width, int height, int id);

    FieldPtr drawTextbox(FormType *frm);
    void setSingleLine(bool sl);
    void setNumerical(bool num);
    void setScrollbar(bool scroll);
    void setResizable(bool resize);
    void setUID(UInt16 UID);
    void loadText(FormType *frm, DmOpenRef dbP);
    void saveText(FormType *frm, DmOpenRef dbP);
    void TBStructure::setUIDText(char uid[5]);
    FormType *returnForm();

};

#endif // TBSTRUCTURE_H
---------------------------------



This is what I thought was a constructor:
TBStructure.cpp
---------------------------------
#include "TBStructure.h"

typedef struct{
    UInt16 UID;
    char Text[500];
} DataRec;
typedef DataRec* DataRecPtr;

int x;
int y;
int width;
int height;
int id;
int underlineType;
int maxchar;
UInt16 UID;
Char* Text;
char UIDText[5];
static DataRec dataRecord;

bool singleLine;
bool resizable;
bool scrollbar;
bool numerical;
FormPtr frmP;

.....

TBStructure::TBStructure(int xI,  int yI, int widthI, int heightI, int idI)
{
    x = xI;
    y = yI;
    id = idI;
    width = widthI;
    height = heightI;

    //default settings
    maxchar = 20;
    singleLine = true;
    resizable = false;
    scrollbar = false;
    numerical = false;
    underlineType = grayUnderline;
    Text = NULL;
}

....
------------------------------

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to