Questions tagged [indexer]

367 questions
5
votes
1 answer

Eclipse CDT cannot resolve uint8_t and the like

I'm using Eclipse CDT Mars 4.5.0 20150621-1200 on Linux for a firmware project involving AVR microcontrollers. Eclipse is giving me errors like "Type 'uint8_t' could not be resolved". I properly added /usr/lib/avr/include to Project properties ->…
László Monda
  • 1,647
  • 1
  • 16
  • 29
5
votes
2 answers

Property indexer with default 0 (zero) value

I discovered a strange behavior when using property indexer (C#). Consider the following program: public class Program { public static void Main(string[] args) { CustomMessageList cml = new CustomMessageList { new…
Bidou
  • 7,378
  • 9
  • 47
  • 70
5
votes
7 answers

C#: public method{get{} set{}} question

I'm not entirely sure if I have all the terminology correct so forgive me if I'm wrong. I was wondering if it would be possible to send an argument(s) to the method. Take the following for example. public item (int index) { get { return…
Nyight
  • 231
  • 1
  • 7
  • 15
5
votes
1 answer

Eclipse Indexer don't work

I'm using Eclipse 6 with c/c++ ide. I have a existing project from a colleague. So i started a new project and imported the file system. I got this error message and the indexer is not working. But I have no clue what to do. An internal error…
Peter Lustig
  • 229
  • 4
  • 11
5
votes
1 answer

Unresolved inclusion of Qt in Eclipse

Eclipse fails to locate Qt includes. Likewise, it fails to provide auto-complete functionality for Qt classes. I did Project -> Properties -> Paths and Symbols -> Includes -> Add to the include directories of Qt in /usr/include/qt4/. This caused…
ehuang
  • 811
  • 1
  • 8
  • 17
4
votes
3 answers

Can't use string as a hash ref..?

I'm trying to parse an HTML document for a web indexing program. To do this I'm using HTML::TokeParser. I'm getting an error on the last line of my first if statement: if ( $token->[1] eq 'a' ) { #href attribute of tag A my $suffix =…
mdegges
  • 963
  • 3
  • 18
  • 39
4
votes
1 answer

ModuleNotFoundError: No module named 'indexer'

ModuleNotFoundError Traceback (most recent call last) in () ----> 1 from spellchecker import SpellChecker 2 3 spell = SpellChecker() 4 def correct_spellings(text): 5 corrected_text = [] 1…
natha raju
  • 41
  • 1
  • 1
  • 2
4
votes
5 answers

Unusual member override syntax in C#

So, I was told by someone that a good way to resolve ambiguities in class inheritance is to use the following idiom: class INewList : IList, IList { new T IList.this[int index] { get; set; } } I don't quite understand the List.this…
void.pointer
  • 24,859
  • 31
  • 132
  • 243
4
votes
3 answers

Visual Basic Default Property vs C# Property

I'm converting Visual Basic.Net code to C# in my project. But I have some doubts on how to convert Visual Basic default property to C#. The first option that comes to me are the indexers. Lets imagine the next code in Visual Basic Public Class…
JAVH
  • 155
  • 1
  • 3
  • 13
4
votes
2 answers

Indexer named "Item" required by interface but not possible to implement?

I'm trying to implement an interface of a class in the ESPRIT api that requires an indexer named "Item." (I'm guessing the interface came from VB.NET but I don't have the source.) Obviously the "Item[index]" indexer is auto-generated by the compiler…
Still.Tony
  • 1,437
  • 12
  • 35
4
votes
1 answer

Is Ecplise CDT's indexer limited to the common filetypes for sources and headers?

I'm working on a project while involves TOM files (.t extension), which get compiled into .c files. Now, I've told my Eclipse to treat them like C sources files, but the CDT indexer doesn't seem to want to touch them. Is it possible to tell it to…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
4
votes
2 answers

Using the presence of an indexer as method's parameter signature/contract/type

As an example, I'll use SqlDataReader and DataRow classes: they both define the following indexer: public object this[int columnIndex] { get; set; } What is the lowest common denominator type to use as method's parameter type, so that both (and any…
G. Stoynev
  • 7,389
  • 6
  • 38
  • 49
4
votes
4 answers

Property bag for C# class

Accessing c# class properties like javascript language would make life a lot easier. How we can do it in C#? For example: someObject["Property"]="simple string"; Console.WriteLine(someObject["FirstName"]);
r.zarei
  • 1,261
  • 15
  • 35
4
votes
1 answer

CDT An internal error occurred during: "Setting up indexer"

I use Eclipse with CDT to build C++ code. After loading my workspace I get the following message: An internal error occurred during: "Setting up indexer". Here is the log: eclipse.buildId=I20110613-1736 java.version=1.6.0_24 java.vendor=Sun…
Steve
  • 1,072
  • 11
  • 28
4
votes
3 answers

Arrays as properties and indexers

I have two private arrays in a class that runs a certain operation using a method. After this method is called, those two arrays are filled with the results. It's not a good practice to make those arrays properties, so I was planning to have a…
hattenn
  • 4,371
  • 9
  • 41
  • 80