# Compiler error : Not seeing indexor by Index override

**URL:** https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586
**Category:** Oxygene
**Tags:** windows, visual-studio, net, oxygene
**Created:** [January 28, 2015, 12:05pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586 "2015-01-28T12:05:02Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![pthompson](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/p/e19adc/32.png) [@pthompson](https://talk.remobjects.com/u/pthompson)
#### Post date: [January 28, 2015, 12:05pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/1 "2015-01-28T12:05:02Z")

</div>

Having upgraded to the latest Elements (8.0.81.1681) I continue to see a problem accessing a DevExpress control. The problem does seem to Oxygene related and not DevExpress, as the problem does not present in C#.

The problem is shown in here :-

![](https://talk.remobjects.com/uploads/default/1033/be4026cd965ef159.jpg)

The worksheets collection should be able to be referenced by Name or by Index. In C# that works, but in Oxygene, I can only reference by name. This screenshot shows the intellisense when coding i.e. no override by Index :-

![](https://talk.remobjects.com/uploads/default/1034/5e5f0ac8826e19a5.jpg)

The DevExpress thread on the topic can be seen [here](https://www.devexpress.com/support/center/Question/Details/T201622)

This isn’t critical, but is annoying…

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 28, 2015, 12:33pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/2 "2015-01-28T12:33:53Z")

</div>

Thanks, logged as bugs://71102

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [January 28, 2015, 1:26pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/3 "2015-01-28T13:26:31Z")

</div>

Any chance you can send me the dll that has this worksheet class (and maybe it’s dependencies)?

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [January 28, 2015, 3:28pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/4 "2015-01-28T15:28:09Z")

</div>

Actually a testcase would be even better, I just tried this:

```oxygene
class method Program.Main(args: array of String): Int32;
begin
  var m: DevExpress.Spreadsheet.Workbook;
  m.Worksheets[0].ToString;
  m.Worksheets['test'].ToString;
end;

```

with “docs”, “office” and “spreadsheet” referenced

---

<div class="post-metadata">

### Author: ![pthompson](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/p/e19adc/32.png) [@pthompson](https://talk.remobjects.com/u/pthompson)
#### Post date: [January 28, 2015, 6:00pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/5 "2015-01-28T18:00:12Z")

</div>

There is something else going on here Carlo and I suspect it’s more than likely specific to my development environment.

I can’t produce a simple test case - it works. A simple winforms application in Oxygene has no problem with the overloaded accessors. I then moved on to a slightly more complex situation, bringing it closer to my live situation - which is a Hydra plugin module, but even that has worked.

Not sure where I can go next. If you take a look at the screenshot, you’ll see my slightly more complex example having built without a problem and also intellisense making the two overloads available.

![](https://talk.remobjects.com/uploads/default/1037/cad44c063b3fd113.jpg)

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [January 28, 2015, 6:18pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/6 "2015-01-28T18:18:51Z")

</div>

Are all 3 dlls properly referenced? (docs, office and spreadsheet)

---

<div class="post-metadata">

### Author: ![pthompson](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/p/e19adc/32.png) [@pthompson](https://talk.remobjects.com/u/pthompson)
#### Post date: [January 28, 2015, 8:18pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/7 "2015-01-28T20:18:03Z")

</div>

I believe you’ve identified the problem Carlo. I only referenced the Spredsheet dll in my production code, the simplified examples I produced did have a reference to DevExpress.Office.V14.1.Core in them. None of my code has a reference to docs.

I’d be interested to try and understand why my code worked at all, with just the reference to the spreadsheet dll in place ? I’m guessing that the indexer by Name is declared in the Spreadsheet dll and the indexer by index is in the Office dll ?

Thanks for taking time to look into what was ultimately my issue…

Paul.

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [January 28, 2015, 8:20pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/8 "2015-01-28T20:20:39Z")

</div>

Yeah. I’m going to see if I can reproduce that case locally though and give a proper compiler error for the next build to avoid this issue.

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [January 29, 2015, 3:57pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/9 "2015-01-29T15:57:11Z")

</div>

The next version will give something like:

Error 1 (E326) Indirectly used type “DevExpress.Office.ISimpleCollection`1” is defined in an unreferenced assembly (DevExpress.Office.v14.2.Core, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a) C:\Users\carlokok\Documents\Visual Studio 2013\Projects\ConsoleApplication125\Program.pas 19 3 ConsoleApplication125

whent his happens

---

<div class="post-metadata">

### Author: ![pthompson](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/p/e19adc/32.png) [@pthompson](https://talk.remobjects.com/u/pthompson)
#### Post date: [January 29, 2015, 4:13pm UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/10 "2015-01-29T16:13:02Z")

</div>

Thanks Carlo. Hopefully that will prove useful to others too.

Paul.

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 30, 2015, 4:42am UTC](https://talk.remobjects.com/t/compiler-error-not-seeing-indexor-by-index-override/5586/11 "2015-01-30T04:42:34Z")

</div>

bugs://71102 got closed with status fixed.
