Questions tagged [class-reference]

25 questions
17
votes
5 answers

Delphi class references... aka metaclasses... when to use them

I've read the official documentation and I understand what class references are but I fail to see when and why they are best solution compared to alternatives. The example cited in the documentation is TCollection which can be instantiated with any…
Kenneth Cochran
  • 11,954
  • 3
  • 52
  • 117
16
votes
8 answers

Unknown class in Interface Builder file

I created a fairly simple iPhone app. Then figured I'd create an iPad version (Universal) of the app. Tried using the 'upgrade' option and that didn't work-out. So I created a separate universal app and copied the xib files into my project. That…
tg2
  • 2,190
  • 3
  • 14
  • 21
8
votes
1 answer

ProGuard didnt compile with Joda Time used in Windows

Actually this is an answer and not a question anymore: I did spent many hours on Windows using JodaTime to be included in my Android project using ProGuard Proguard Configuration: -libraryjars…
user1013443
  • 798
  • 1
  • 8
  • 17
7
votes
4 answers

Objective-c, how to access an instance variable from another class

I am used to programming in Java and to use class variables to access data from other classes. Then I found out that class variables does not work the same way in Obj-C, and are having problems with that. My problem is that i want to access the user…
Aleksander Akerø
  • 545
  • 2
  • 6
  • 9
5
votes
1 answer

Test if class from a class reference (metaclass) variable is TMyClass

I want to know whether the object that would be created from a class reference is an instance of a particular class or any of its descendants. In other words, I want a Boolean expression such as var is TMyClass but where var is replaced with an…
Ian Goldby
  • 5,609
  • 1
  • 45
  • 81
4
votes
2 answers

The reference to the class in ES6 is lost

I have the following structure Javacript es5-es6 and the controller class loses the reference in the class Get, I was already investigating but I can not find how to avoid losing the reference. class Controller { constructor() { …
Alan Olivares
  • 336
  • 2
  • 13
3
votes
2 answers

IOS Dev Library offline on you mac

I need a offline version of http://developer.apple.com/library/ios/navigation/ Does something like this exist? thank you
Michele
  • 681
  • 3
  • 16
  • 27
3
votes
1 answer

How to instantiate different frame types?

I'm here again with frames. I've this main form: It's only a simple form created in order to understand the use of frames. With the two buttons on the top of the form I would like to open this two frames: Frame1 and Frame2 here is the code the…
Eros
  • 337
  • 1
  • 22
3
votes
2 answers

Reformulated previous status 3 query

Ok, reformulated and consolidated from C++ Process terminated with status 3 confusion to a single file with minimum code, replacing my 'log' references with 'cout', printing to console instead of to file. I ran it through code::blocks compiler and…
Jeremy
  • 53
  • 6
2
votes
2 answers

Accessing static field avoided by referencing Class?

I'm not understanding why this is working, please help educate me. Config CFIG = new Config(); Tile selectedTile = CFIG.tileGallery.get(1); System.out.println("This is the name:" + selectedTile.getName()); Feature selectedFeature =…
JamesA
  • 115
  • 2
  • 10
2
votes
1 answer

Find Java Class reference in specific projects (eclipse) via script

I'm currently refactoring a project used by two application-projects and facing following problem: The old project should be split up into three new projects A, B and C, because its growing and getting confusing. So project A is implementing classes…
Bohne
  • 4,029
  • 1
  • 16
  • 22
1
vote
2 answers

How would I translate the following "class reference" mechanism from Delphi to C++11?

I've used C++ for a while and one thing which occasionally bugs me is that I haven't yet been able to figure out how to do this Delphi Factory construct in C++. The key part that I can't figure out is how to pass a reference to a class type in C++. …
Mark K Cowan
  • 1,755
  • 1
  • 20
  • 28
1
vote
1 answer

Create Enum of Class References

How would I create an enum of class references in D? (They all implement the same interface) This is what I have tried: enum byteCommands : ByteCommand* { END_OF_CODE = null, PRINT_VAR = PrintVarCommand* }
Jeroen
  • 15,257
  • 12
  • 59
  • 102
0
votes
1 answer

C++ How to reference an "unknown" Class

I would like to build a simple application framework. The user is supposed to create a class derived from a base class and either use the properties and methods of the base class or override them with his own. Unfortunately, it is not at all clear…
0
votes
1 answer

Java, Why don't self referential classes allocate infinite memory?

I am learning about Single Linked List. On line 5 of the example I provide below, is an example of a self referential class being called. I feel an infinite amount is being allocated to next as when the Java compiler evaluates the size of Node, it…
BenSmith
  • 429
  • 1
  • 6
  • 14
1
2