# Error when attempting to instantiate an ABC compliant CLASS - Baffled & beaten!

**URL:** <https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507>\
**Category:** questions\
**Tags:** c11, c10\
**Created:** [September 24, 2021, 1:37pm UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507 "2021-09-24T13:37:39Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![JohnM](https://clarionhub.com/user_avatar/clarionhub.com/johnm/32/6203_2.png) [@JohnM](https://clarionhub.com/u/JohnM)\
**Post date:** [September 29, 2021, 6:41am UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/21 "2021-09-29T06:41:45Z")

</div>

> [@totalhip](#):
>
> I am firmly of the belief to avoid the SQL Advanced tab, simply create this type of view on the backend, and define the view in the Dct as a table.

I agree, Douglas - and that’s exactly how I’ve handled this situation myself. I had someone else in mind, tho, when I wrote this class/template, who has limited SQL server-side skills.

John

---

<div class="post-metadata">

**Author:** ![JohnM](https://clarionhub.com/user_avatar/clarionhub.com/johnm/32/6203_2.png) [@JohnM](https://clarionhub.com/u/JohnM)\
**Post date:** [September 29, 2021, 7:31am UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/22 "2021-09-29T07:31:04Z")

</div>

> [@MarkGoldberg](#):
>
> Please look carefully at the attached files.

That’s a much more elegant solution, Mark … 👍

May I push my luck with some clarification questions (?)

- BOOL is (via EQUATES.CLW) a SHORT data type … Why is that preferable to a BYTE for T/F ?

- You present 2 methods to return a given field’s “name”; one based on WHO and the other based on Prop:Name. As I understand it, they yield exactly the same result (right?)  
– Why/when would you use one in preference to the other ?

- I don’t understand the purpose of the .CleanName method; what are the “_Extended Name notations as created by Capesoft_” ?

Thanks again …

John M

---

<div class="post-metadata">

**Author:** ![MarkGoldberg](https://clarionhub.com/user_avatar/clarionhub.com/markgoldberg/32/1511_2.png) [@MarkGoldberg](https://clarionhub.com/u/MarkGoldberg)\
**Post date:** [September 29, 2021, 1:08pm UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/23 "2021-09-29T13:08:05Z")

</div>

> [@JohnM](#):
>
> - BOOL is (via EQUATES.CLW) a SHORT data type … Why is that preferable to a BYTE for T/F ?

Yeah, the bit twiddling performance oriented part of me doesn’t like the extra byte, and since numeric expressions track back to LONG we don’t really have a win there either.

That said, I like the clarity that BOOL brings to the table.  
To me, BOOL says TRUE|FALSE, whereas BYTE says number.

> [@JohnM](#):
>
> - You present 2 methods to return a given field’s “name”; one based on WHO and the other based on Prop:Name. As I understand it, they yield exactly the same result (right?)  
> – Why/when would you use one in preference to the other ?

WHO and PROP:Name might return the same thing,  
but it’s not the case that they always will return the same thing.

You can declare an external name for a field (or variable)  
SomeField STRING(42),NAME(‘DifferentName’)

It’s my understanding that the Clarion SQL file drivers will use the NAME attribute for column names. Which is precisely what you are working on. So I think you should use PROP:Name instead of WHO.

> [@JohnM](#):
>
> - I don’t understand the purpose of the .CleanName method; what are the “ _Extended Name notations as created by Capesoft_ ” ?

[A Proposed Convention for the Extended use of the Name Attribute - code - ClarionHub](https://clarionhub.com/t/a-proposed-convention-for-the-extended-use-of-the-name-attribute/2792)

If I’m not mistaken Capesoft uses the Extended Name attribute for reflection work to drive xFiles and JFiles behavior. But the idea isn’t limited to just those two cases, it could be used for all sorts of things.

The purpose of the .CleanName method is to provide the class equivalent of an embed point, by calling a ,VIRTUAL method - which can then be derived.

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [September 29, 2021, 5:18pm UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/24 "2021-09-29T17:18:36Z")

</div>

> [@JohnM](#):
>
> BOOL is (via EQUATES.CLW) a SHORT data type … Why is that preferable to a BYTE for T/F ?

It’s actually SIGNED, which is LONG in Clarion 32 bit.

---

<div class="post-metadata">

**Author:** ![totalhip](https://clarionhub.com/user_avatar/clarionhub.com/totalhip/32/1477_2.png) [@totalhip](https://clarionhub.com/u/totalhip)\
**Post date:** [September 29, 2021, 5:54pm UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/25 "2021-09-29T17:54:22Z")

</div>

> [@jslarve](#):
>
> It’s actually SIGNED, which is LONG in Clarion 32 bit.

Even worse. 🙂

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [September 29, 2021, 6:01pm UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/26 "2021-09-29T18:01:21Z")

</div>

I wish we could be complaining that it’s INT64.

---

<div class="post-metadata">

**Author:** ![totalhip](https://clarionhub.com/user_avatar/clarionhub.com/totalhip/32/1477_2.png) [@totalhip](https://clarionhub.com/u/totalhip)\
**Post date:** [September 29, 2021, 6:52pm UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/27 "2021-09-29T18:52:48Z")

</div>

Perhaps not worse when passed. Base type for anything less than a LONG is still a LONG.

---

<div class="post-metadata">

**Author:** ![JohnM](https://clarionhub.com/user_avatar/clarionhub.com/johnm/32/6203_2.png) [@JohnM](https://clarionhub.com/u/JohnM)\
**Post date:** [September 30, 2021, 1:44am UTC](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507/28 "2021-09-30T01:44:10Z")

</div>

> [@jslarve](#):
>
> It’s actually SIGNED, which is LONG in Clarion 32 bit.

Haha - Yes, I was hoping no-one would notice my mistake 😉

> [@totalhip](#):
>
> Base type for anything less than a LONG is still a LONG.

Aahh - That’s a good point. On that basis, I’m now happy with BOOL.

John

[Previous page](https://clarionhub.com/t/error-when-attempting-to-instantiate-an-abc-compliant-class-baffled-beaten/4507.md?page=1)
