# Error: cannot convert argument 2 from 'FString (\_\_cdecl FMyClassDetails::\* )(void) const' to 'FString (\_\_cdecl IPropertyHandle::\* )(void) const'

**URL:** <https://forums.unrealengine.com/t/error-cannot-convert-argument-2-from-fstring-__cdecl-fmyclassdetails-void-const-to-fstring-__cdecl-ipropertyhandle-void-const/482651>\
**Category:** UI\
**Tags:** error, convert, fstring, unreal-engine, slate, question\
**Created:** [April 29, 2021, 10:08am UTC](https://forums.unrealengine.com/t/error-cannot-convert-argument-2-from-fstring-__cdecl-fmyclassdetails-void-const-to-fstring-__cdecl-ipropertyhandle-void-const/482651 "2021-04-29T10:08:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crakmaks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crakmaks](https://forums.unrealengine.com/u/Crakmaks)\
**Post date:** [April 29, 2021, 10:08am UTC](https://forums.unrealengine.com/t/error-cannot-convert-argument-2-from-fstring-__cdecl-fmyclassdetails-void-const-to-fstring-__cdecl-ipropertyhandle-void-const/482651/1 "2021-04-29T10:08:52Z")

</div>

Hey everyone,  
What does this error mean?

```
Error C2664 'SObjectPropertyEntryBox::FArguments::WidgetArgsType &SObjectPropertyEntryBox::FArguments::ObjectPath<IPropertyHandle>(TSharedRef<IPropertyHandle,ESPMode::NotThreadSafe>,FString (__cdecl IPropertyHandle::* )(void) const)': cannot convert argument 2 from 'FString (__cdecl FMyClasssDetails::* )(void) const' to 'FString (__cdecl IPropertyHandle::* )(void) const'	

```

Just to give some context, I’m trying to provide a SObjectPropertyEntryBox with a .ObjectPath() wich takes the following as arguments:

```
ObjectPath(TSharedRef<UserClass> InUserObjectRef, TDelegate<FString>::TSPMethodDelegate_Const<UserClass>::FMethodPtr Infunc)

```

So I’m trying to provide the FString with my Delegate

```
FString GetModelPath() const;

```

But that doesn’t seem to do the trick, since I get the error above. Please help me understand what is the problem here. I’m stuck on it for days. Thank you!!!

---

<div class="post-metadata">

**Author:** ![Grim\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/grim_1/32/88715_2.png) [@Grim\_1](https://forums.unrealengine.com/u/Grim_1)\
**Post date:** [April 30, 2021, 3:57am UTC](https://forums.unrealengine.com/t/error-cannot-convert-argument-2-from-fstring-__cdecl-fmyclassdetails-void-const-to-fstring-__cdecl-ipropertyhandle-void-const/482651/2 "2021-04-30T03:57:23Z")

</div>

ObjectPath takes a pointer to member function of IPropertyHandle but you are giving it a pointer to member function of FMyClasssDetails. If your class actually inherits from IPropertyHandle you can cast it like so:

```
static_cast<FString (IPropertyHandle::*)() const>(&FMyClasssDetails::GetModelPath);
```

---

<div class="post-metadata">

**Author:** ![Crakmaks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crakmaks](https://forums.unrealengine.com/u/Crakmaks)\
**Post date:** [May 17, 2021, 9:27pm UTC](https://forums.unrealengine.com/t/error-cannot-convert-argument-2-from-fstring-__cdecl-fmyclassdetails-void-const-to-fstring-__cdecl-ipropertyhandle-void-const/482651/3 "2021-05-17T21:27:20Z")

</div>

Thank you for your explanation!
