Questions tagged [oxygene]

Oxygene is a general-purpose object-oriented programming language based on Pascal. Oxygene can be compiled to the Microsoft Common Language Runtime (.NET and the Mono), Java & Android's Dalvik, as well as the Objective-C runtime.

Oxygene is a general-purpose object-oriented programming language based on Pascal. Oxygene can be compiled to the Microsoft Common Language Runtime (.NET and the Mono), Java & Android's Dalvik, as well as the Objective-C runtime.

106 questions
1
vote
1 answer

Delphi Prism getting Unknown Identifier "DllImport" error

I'm trying to call Window's SendMessage method in Delphi Prism, I've declared the class as follow: type MyUtils = public static class private [DllImport("user32.dll", CharSet := CharSet.Auto)] method SendMessage(hWnd:IntPtr; Msg:UInt32;…
Robo
  • 4,588
  • 7
  • 40
  • 48
1
vote
4 answers

remobjects c# share code between classes

Using remobjects c#, does anyone know how code can be shared between projects. I've created a class library and added it as a reference to my android and osx project but i cant access the classes from my library on android or osx using remobject…
Gbolahan
  • 420
  • 2
  • 8
  • 18
1
vote
2 answers

Load string from Delphi stream in Oxygene

I'm new to Oxygene and I want to read strings from a stream that was generated by Delphi. I receive this stream via TCP. Here is how I save strings to a stream on the client side: procedure SaveStringToStream(AStream: TStream; AString: String); var …
1
vote
3 answers

What is Delphi Prism LineFeed

What is the equivalent of C#'s \n and Visual Basic's vbCRLF or vbNewLine in Delphi Prism? Do I have to use Environment.NewLine?
Alan Clark
  • 2,017
  • 21
  • 28
1
vote
1 answer

What is the equivalent of the Java expression "Class.class" in Oxygene?

In some Java source for Android I see expressions involving a "class" member on Class types, for example when constructing a ComponentName object: cname := new ComponentName( this, SomeClass.class ); This does not compile in Oxygene for Java, with…
Deltics
  • 22,162
  • 2
  • 42
  • 70
1
vote
1 answer

delphi prism (.net) compiler

when i try to compile my application in delphi prism, i got these errors C:\Users\Burak\Documents\Visual Studio 2008\Projects\Project1\WindowsApplication1\WindowsApplication1\Main.pas(6,3) : Error : (PE17) Namespace "Windows" does not exist or has…
1
vote
1 answer

Is there a lock() statement in Delphi Prism?

What is the equivalent of the c# lock() statement in Delphi Prism? In VB.Net it's synclock() I believe. Thanks in advance.
Alan Clark
  • 2,017
  • 21
  • 28
1
vote
1 answer

Refactoring tools for Oxygene

What refactoring tools are avaliable for Oxygene language in VS2012. AFAIK Resharper & Coderush do not work with it. So what are the alternatives?
user1647411
1
vote
2 answers

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn't appear to be part of Oxygene, and I can't find a reference to something that can do…
Bill Seven
  • 768
  • 9
  • 27
1
vote
1 answer

How access datarow value using Oxygene

The following line of code generates the compile time error (PE19) There is no overloaded method "get_item" with 0 parameters. Any idea on how to access the data in the datarow using Oxygene? indexValue:=dtIndexValues.Rows[1].Item('IndexID');
Bill Seven
  • 768
  • 9
  • 27
1
vote
2 answers

Is Delphi Prism superior to RemObjects Oxygene in any significant respect?

We have two separate tags: https://stackoverflow.com/tags/oxygene/info https://stackoverflow.com/tags/delphi-prism/info They read like those are different products, more so like Prism is a superset of Oxygen and the latter is "just compiler" and…
Arioch 'The
  • 15,799
  • 35
  • 62
1
vote
3 answers

Strange CLR error while handling Nullable types in Oxygene .net

I'm writing a program in Oxygene .net There seems to be a problem with how I am handling nullable types namespace RULER; interface uses System, System.Drawing, System.Collections, System.Collections.Generic, System.Windows.Forms, …
sav
  • 2,064
  • 5
  • 25
  • 45
1
vote
2 answers

Is this copying or referencing?

If I were to do the following, do you consider that to be copying an object from one variable to another or referencing where the pointer to an object is copied. myPanel:Panel; myControl:Control; myPanel := new Panel; myControl := myPanel; if…
ThN
  • 3,235
  • 3
  • 57
  • 115
1
vote
1 answer

How i can declare a global method in Oxygene

How i can declare a global method in delphi prism using the __Global class? And It is recommended to use global methods? unfortunately I have not found any example.
Salvador
  • 16,132
  • 33
  • 143
  • 245
1
vote
1 answer

Delphi Prism - how do I determine actual class that TObjectExtender is "extending"

I have a large quantity of logging throughout my Delphi code, which often uses Self.ClassName to log the name of the class containing the currently executing code. I am now compiling some of this code into a Delphi Prism .NET assembly. However,…
Conor Boyd
  • 1,024
  • 7
  • 15