开发者

No matching function error in Xcode 3

开发者 https://www.devze.com 2022-12-19 05:46 出处:网络
I am trying to compile a custom class in Xcode 3 and I keep getting a no matching function call error although the same custom class compiles fine under Windows. Obviously something is not right regar

I am trying to compile a custom class in Xcode 3 and I keep getting a no matching function call error although the same custom class compiles fine under Windows. Obviously something is not right regarding the use of curly brackets and the XCode compiler. The compiler is choking at the first curly bracket { below:

  : ADataBrowser(inOwnerWindow,inID,inOwner), mEncoding(kTextEncodingMacRoman)
                    {
                        std::memset( mCustomLabels, 0, sizeof(CFStringRef) * kMaxLevelCount);
                    }

Any ideas much appreciated!

//Full source below

#pragma once

#include <ADataBrowser.h>
#include <AControls.h>

enum
{
 kMaxLevelCount = 16
};

class CArray;

class ACustomLabelList :
  public ADataBrowser
{

public:


      ACustomLabelList(
       ControlRef inControl,
       bool inOwner = false)
      : ADataBrowser(inControl, inOwner), mEncoding(kTextEncodingMacRoman)
      {
       std::memset( mCustomLabels, 0, sizeof(CFStringRef) * kMaxLevelCount);
      }

      ACustomLabelList(
       WindowRef inOwnerWindow,
       const ControlID &inID,
       bool inOwner = false)
      : ADataBrowser(inOwnerWindow,inID,inOwner), mEncoding(kTextEncodingMacRoman)
      {
       std::memset( mCustomLabels, 0, sizeof(CFStringRef) * kMaxLevelCount);
      }

      ACustomLabelList(
       WindowRef inOwnerWindow,
       const Rect &inBounds,
       DataBrowserViewStyle inStyle)
      : ADataBrowser(inOwnerWindow, inBounds, inStyle), mEncoding(kTextEncodingMacRoman)
      {
       std::memset( mCustomLabels, 0, sizeof(CFStringRef) * kMaxLevelCount);
      }


 virtual    ~ACustomLabelList();

 void    Initialize(CArray *inArray, const TextStyle &inStyle);

 CFStringRef   GetCurrentSelectionLabelString();
 void    SetCurrentSelectionLabelString(CFStringRef inString);
 void    SetLabelStringAt(CFStringRef inString, DataBrowserItemID inRowID);

 void    ShiftCurrentSelectionUp();
 void    ShiftCurrentSelectionDown();

 void    SendSelectionChangedEvent();

 CFStringRef *  GetLabelList() { return mCustomLabels; }
 void    GetLabelAt(Str15 outString, UInt32 inIndex);

protected:

 virtual void  ItemNotification(
       Item &inItem,
       DataBrowserItemNotification inMessage,
       ItemData &inItemData);

 virtual OSStatus GetItemData(
       Item &inItem,
       DataBrowserPropertyID inProperty,
       ItemData &inItemData);


 virtual OSStatus SetItemData(
       Item &inItem,
       DataBrowserPropertyID inProperty,
       ItemData &inItemData);


 CFStringRef    mCustomLabels[kMaxLevelCount];
 TextEncoding   mEncoding;

private:
       ACustomLabelList(const ACustomLabelList&);
  ACustomLabelList&   operator=(const ACusto开发者_如何学编程mLabelList&);
};


It looks like you're not including the file that declares std::memset.

0

精彩评论

暂无评论...
验证码 换一张
取 消