IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
KB
   ► KB ► > Delphi Prism Posts  Print This     

Delphi Prism Posts

"Delphi Prism" Knowledge Base Posts

  KB Article  

Mike Prestwood
1. The Future of Paradox Blog

If you have an existing Paradox system you can keep using it but you'll need to skip the Vista operating system and either stick with Windows XP or move to Windows 7. Because better tools exist, you may very well want to put a plan together now for converting to another development tool or at least understand what the future is likely to hold. If you're a power-user or researcher working with data, stick with Paradox.

Posted to KB Topic: Tool Basics
15 years ago, and updated 13 months ago
(44 Entries , last by maria.s3 )

Blog
Nothing New Since Your Last Visit
67161
Hits

Corel Paradox / ObjectPAL Coding

Mike Prestwood
2. Delphi Abstraction (abstract, override)

Delphi for Win32 supports abstract class members using the abstract keyword. You can even instantiate instances of a class that contains abstract members. Then you override each abstract member in a descendant class with Override. Delphi does not support setting an entire class as abstract. You can create an abstract class (a class with one or more abstract methods), but there is no way to tell the compiler to not allow the instantiation of the abstract class. Delphi does not support abstract member properties directly. To implement an abstract properity, make use of abstract methods. That is, you can read a GetPropertyX abstract function and write to a SetPropertyX abstract procedure. In effect, creating  an abstract property.

Posted to KB Topic: OOP
12 years ago, and updated 9 years ago
(4 Comments , last by Uwais.Q )

Code

Article
Nothing New Since Your Last Visit
25562
Hits

Pascal and Delphi Coding

lowster11
3. Register Now for CodeRage 5!

CodeRage is five full days of 100% online technical sessions focused on software development and data management issues which you can attend from wherever you like to log in.  Its bringing you top industry speakers, technologists, and industry practitioners to present on a wide variety of developer topics, a raging confluence of conveniently-delivered information you cant get anywhere else.  And its FREE!

Posted to KB Topic: Sac Delphi User Group
10 years ago

News
Nothing New Since Your Last Visit
4035
Hits

Pascal and Delphi Coding

Mike Prestwood
4. Delphi XE Tour in Sacramento

RAD Studio XE Tour - SACRAMENTO, CA. Free Pizza and soda!!!!  Sponsored by Prestwood IT Solutions - www.prestwood.com

Posted to KB Topic: Sac Delphi User Group
10 years ago
(1 Comments , last by lowster11 )

News
Nothing New Since Your Last Visit
6464
Hits

Pascal and Delphi Coding

Mike Prestwood
5. Delphi Prism Member Property (property..read..write)

Like Delphi, Delphi Prism uses a special property keyword to both get and set the values of properties. The read and write keywords are used to get and set the value of the property directly or through an accessor method. For a read-only property, leave out the write portion of the declaration.

You can give properties any visibility you wish (private, protected, etc). It is common in Delphi and Delphi Prism to start member fields with "F" ("FName" in our example) and drop the "F" with properties that manage member fields ("Name" in our example).

Posted to KB Topic: OOP
12 years ago, and updated 10 years ago
(2 Comments , last by mprestwood )

Code
Nothing New Since Your Last Visit
10959
Hits

Delphi Prism

Mike Prestwood
6. Delphi Class Helpers (class helper for)

Delphi allows you to extend an existing class without using inheritance. Buggy in 2005 and not officially supported but stable and usable in 2006 and above. You declare a class helper similiar to how you declare a class but use the keywords class helper for.

  • You can name a helper anything.
  • Helpers have access only to public members of the class.
  • You cannot create an object instance directly from a class helper.
  • self refers to the class being helped.
Posted to KB Topic: OOP
11 years ago, and updated 10 years ago
(1 Comments , last by Leo.M )

Code

Article
Nothing New Since Your Last Visit  
27421
Hits

Pascal and Delphi Coding

Mike Prestwood
7. Prestwood Sponsors RAD Studio 2010 Sacramento Tour Stop!

Prestwood Software is sponsoring the Technology is moving fast. During this free two-hour technical seminar, you'll learn the secrets to getting the most out of RAD Studio 2010 and new Windows technologies.  You'll get a firsthand look at new capabilities that will make you more productive and successful with Delphi--, C++Builder--, Delphi Prism-- and Embarcadero-- RAD Studio 2010.

RAD Studio/Delphi 2010 Sacramento Tour Stop! 
Wednesday, December 2, 2009
6:00PM - 8:00PM

New Horizons of Sacramento
1750 Creekside Oaks Drive, Suite 150
Sacramento, CA 95833

Sponsored by:

Prestwood Software

Posted to KB Topic: Delphi for Win32
11 years ago, and updated 11 years ago

News
Nothing New Since Your Last Visit
5705
Hits

Pascal and Delphi Coding

Mike Prestwood
8. RAD Studio 2010 Tour! See Delphi 2010!

Embarcadero TechnologiesSee What's New in RAD Studio 2010 at a Free Seminar
COMING TO A CITY NEAR YOU!

Technology is moving fast. Learn the secrets to getting the most out of RAD Studio 2010 and new Windows technologies by attending the RAD Studio 2010 Tour in a city near you. These free two-hour technical seminars, led by noted experts David Intersimone, Anders Ohlsson, Nick Hodges, or Mike Rozlog, will give you a firsthand look at new capabilities that will make you more productive and successful with Delphi--, C++Builder--, Delphi Prism-- and Embarcadero-- RAD Studio 2010.

Touch the future with Delphi, C++Builder, and Delphi Prism!

Posted to KB Topic: Coding & OO
11 years ago

News
Nothing New Since Your Last Visit
19524
Hits

Coding & OO

Mike Prestwood
9. Delphi Prism Member Events (event)

Like all .Net languages, Prism events are a separate type of class member. You define a member event by using the event keyword. Events depend on Delegates to define the signature (the type) of the event they represent and they maintain a list of multiple subscribers - unlike in Delphi for Win32, where each event can only have one handler

Posted to KB Topic: Delphi Prism
11 years ago

Code
Nothing New Since Your Last Visit
8366
Hits

Delphi Prism

Mike Prestwood
10. Delphi Prism Event Handler

The Delphi Prism

Most notable for Delphi developers is the fact that Prism does not offer initialization nor finalization sections.

Posted to KB Topic: Delphi Prism
11 years ago

Code
Nothing New Since Your Last Visit
11417
Hits

Delphi Prism

Mike Prestwood
11. Delphi Prism Empty String Check (length)

In Prism, a string can be nil (unassigned), assigned an empty string (""), or assigned a value.  Therefore, to check if a string is empty, you have to check against both nil and (""). Alternatively, you can check the length of the string or use String.IsNullOrEmpty.

Posted to KB Topic: Delphi Prism
11 years ago

Code

KB Post
Nothing New Since Your Last Visit
15566
Hits

Delphi Prism

Mike Prestwood
12. Delphi Prism String Concatenation (+)

Unlike Delphi, Prism performs implicit casting. To concatenate two strings, a string to an integer, or a string to a floating point number, use the + operator. For example, to convert a floating point number to a string just concatenate an empty string to the number as in "" + 3.2.

Posted to KB Topic: Language Basics
11 years ago, and updated 11 years ago
(3 Comments , last by mtiede )

Code

KB Post
Nothing New Since Your Last Visit
14532
Hits

Delphi Prism

Mike Prestwood
13. Delphi Prism Finalizer (finalize())

Unlike Delphi, Delphi Prism uses the .Net garbage collector to free managed object instances. Prism does not have nor need a true destructor.

In .Net, a finalizer is used to free non-managed objects such as a file or network resource. Because you don't know when the garbage collector will call your finalizer, Microsoft recommends you implement the IDisposable interface for non-managed resources and call it's Dispose() method at the appropriate time.

Posted to KB Topic: OOP
11 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit  
20212
Hits

Delphi Prism

Mike Prestwood
14. Delphi Prism Member Field

In Prism you can set the visibility of a member field to any visibility: private, protected, public, assembly and protected or assembly or protected. Prism supports the readonly modifier for member fields which is handy for constant like data. In this case, I chose not to preface my read-only member field with "F" so it's usage is just like a read-only property. Prism also support the class modifier (static data) for member fields. Delphi developers should notice the use of := to initialize a member field (in Delphi you use an =).

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago
(1 Comments , last by mtiede )

Code

Article
Nothing New Since Your Last Visit
12698
Hits

Delphi Prism

Mike Prestwood
15. Delphi Prism Code Blocks (begin..end)

Same as in Delphi for Win32 but Prism also supports inline variable declaration.

Posted to KB Topic: Language Basics
12 years ago, and updated 11 years ago
(2 Comments , last by mprestwood )

Code

KB Post
Nothing New Since Your Last Visit
12986
Hits

Delphi Prism

Mike Prestwood
16. Logos Should Use 1 Symbol Max

Each logo you create should have at most one symbol. You can mess with the text is "textual" ways such as font, color, and minor tweaks, but if you include a "symbol", you should include only one symbol.

Posted to KB Topic: Logos
11 years ago
(8 Comments , last by Maurice.W )

Tip
Nothing New Since Your Last Visit
10316
Hits

Website Design & Hosting

Mike Prestwood
17. Delphi Prism Class Member Visibility Levels

In Prism, you specify each class and each class member's visibility with a Class Member Visibility Level preceding the return type. Like Delphi, you group member declarations as part of defining the interface for a class in the Interface section of a unit.

Unlike Delphi, Prism supports a traditional OO approach to member visibility with additional .Net type assembly visibility. For example, private members are truly private to the class they are declared in. In Delphi for Win32, you use strict private for true traditional private visibility.

Prism also supports assembly and protected and assembly or protected which modify the visibility of protected members to include only descendants in the same assembly (and) or publicly accessible from assembly and descendant only outside (or). OO purist might object to assembly and protected and assembly or protected and I suggest you choose the traditional private, protected, and public as your first chose at least until you both fully understand them and have a specific need for them.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago
(4 Comments , last by mprestwood )

Code
Nothing New Since Your Last Visit  
17212
Hits

Delphi Prism

Mike Prestwood
18. Delphi Prism Polymorphism

Prism supports the following types of polymorphism:

Posted to KB Topic: OOP
11 years ago, and updated 11 years ago
(1 Comments , last by mtiede )

Code
Nothing New Since Your Last Visit
9717
Hits

Delphi Prism

Mike Prestwood
19. Delphi Prism Pointers

Although pointer data types in Prism coding are less important than in other languages such as C++, Prism does support developer defined pointers. Use the ^ operator to declare a pointer data type. Use the @ operator to return the current address of a variable.

In .Net managed coding the use of pointers is not safe because the garbage collector may move memory around. To safely use pointers, use the unsafe keyword. However, avoid unsafe code if possible.

Posted to KB Topic: Language Details
11 years ago

Code
Nothing New Since Your Last Visit
11399
Hits

Delphi Prism

Mike Prestwood
20. Delphi Prism Overriding (virtual, override)

Same as Delphi. In Prism, you specify a virtual method with the virtual keyword in a parent class and replace it in a descendant class using the override keyword. Call Inherited in the descendant method to execute the code in the parent method.

Posted to KB Topic: OOP
11 years ago

Code

Article
Nothing New Since Your Last Visit
14411
Hits

Delphi Prism

Mike Prestwood
21. Delphi Prism Self Keyword (Self)

Within the implementation of a method, the identifier Self references the object in which the method is called. The Self variable is an implicit parameter for each object method.
A method can use this variable to refer to its owning class.

Posted to KB Topic: Language Details
11 years ago

Definition
Nothing New Since Your Last Visit
8045
Hits

Delphi Prism

Mike Prestwood
22. Delphi Prism Constructors (constructor + class name)

Prism uses unnamed constructor methods for constructors. Prism also supports a Create constructor method for backward compatibility with Delphi for Win32.

Posted to KB Topic: OOP
11 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit  
16215
Hits

Delphi Prism

Mike Prestwood
23. Delphi Prism Custom Routines (method, procedure, function)

In Prism, everything is within a class (just like with C#, VB.Net, and Java). So you create class methods using the method keyword. Alternatively, you can use procedure or function if you want the compiler to enforce returning or not returning a value.

Posted to KB Topic: Language Basics
12 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
19906
Hits

Delphi Prism

Mike Prestwood
24. Oxidizer

Oxidizer is a free tool that (in combination with ShineOn) is provided to help to port Delphi (Win32 and .NET) projects to the Delphi Prism language. Oxidizer is a command line tool that will adjust your .pas source files for common differences between the two languages.

Posted to KB Topic: Tool Basics
11 years ago

Download
Nothing New Since Your Last Visit
11700
Hits

Delphi Prism

Mike Prestwood
25. ShineOn

A Delphi Prism implementation of the Delphi for Win32 RTL.

Posted to KB Topic: Tool Basics
11 years ago

Download
Nothing New Since Your Last Visit
10011
Hits

Delphi Prism

Mike Prestwood
26. Delphi Prism Class..Object (class..end..new)

Declare your class in the Interface section. Then implement the class in the Implementation section. To create an object instance, use the New keyword. Optionally, you can use Create for backword compatibility with Delphi if you turn it on in the compatibility options. Since Prism does have a garbage collector, you do not have to free the object. If you need to free either unmanaged resources or resources where "timing" is important, implement IDisposable and take control of freeing the object yourself using Dispose.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago
(1 Comments , last by mtiede )

Code

Article
Nothing New Since Your Last Visit
14355
Hits

Delphi Prism

Mike Prestwood
27. Delphi Prism Class Contracts (require, ensure)

Prism supports class contracts with its require and ensure keywords. The require keyword is a pre condition that must be true when the method is called. The ensure keyword is a post condition that much be true when a method exits. With either, if the condition evaluates to false, then an assertion is generated.

They can be used to check for the validity of input parameters, results, or for the state of the object required by the method.

The require and ensure keywords will expand the method body to list the preconditions; both sections can contain a list of Boolean statements, separated by semicolons.

Posted to KB Topic: OOP
11 years ago

Code
Nothing New Since Your Last Visit
8043
Hits

Delphi Prism

Mike Prestwood
28. Delphi Prism Unary Operators

The Prism unary operators are:

+
-
Not

Posted to KB Topic: Language Basics
11 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
12706
Hits

Delphi Prism

Mike Prestwood
29. Delphi Prism Left of String (Substring)

Delphi Prism Left of String

Posted to KB Topic: Language Details
11 years ago

Code
Nothing New Since Your Last Visit
8731
Hits

Delphi Prism

Mike Prestwood
30. Delphi Prism Logical Operators

Prism logical operators:

and and, as in this and that
or or, as in this or that
not Not, as in Not This
xor either or, as in this or that but not both

Posted to KB Topic: Language Basics
11 years ago

Code
Nothing New Since Your Last Visit  
8659
Hits

Delphi Prism

Mike Prestwood
31. Delphi Prism Exception Trapping (try..except, try..finally)

Use a try..except..end block to trap and process errors.

Posted to KB Topic: Language Details
11 years ago

Code
Nothing New Since Your Last Visit
11437
Hits

Delphi Prism

Mike Prestwood
32. Delphi Syntax vs Prism Syntax

How close is the syntax for Delphi for Win32 and Delphi Prism?

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

FAQ
Nothing New Since Your Last Visit
8951
Hits

Delphi Prism

Mike Prestwood
33. The Delphi Prism Primer http://prismwiki.codegear.com/en/The_Prism_Primer
Posted to KB Topic: Language Details
11 years ago

Link
Nothing New Since Your Last Visit
5670
Hits

Delphi Prism

Mike Prestwood
34. Delphi Prism Overloading (implicit)

Like Delphi, Prism supports overloading. However, Prism supports implicit overloading (no need for an overload keyword).

Posted to KB Topic: Language Details
11 years ago

Code

KB Post
Nothing New Since Your Last Visit
15134
Hits

Delphi Prism

Mike Prestwood
35. Delphi Prism Deployment Overview

Prism projects require the .Net framework and any additional dependencies you've added such as Crystal Reports.

In Visual Studio.Net, you can create a Setup and Deployment project by using any of the templates available on the New Project dialog (Other Project Types).

Prism doesn't directly support ClickOnce. At least not yet. In other words, there isn't a Security tab on the solution properties dialog. To create a ClickOnce deploy package, search the internet for mage.exe and mageui.exe.

In addition, you can use any of the many free and commercially available installation packages.

Posted to KB Topic: Tool Basics
11 years ago

Code
Nothing New Since Your Last Visit
7820
Hits

Delphi Prism

Mike Prestwood
36. Delphi File Extensions

Common source code file extensions include:

  • .BDSPROJ - Project, Borland Developer Studio project file holds compiler options, etc. This is the file you open.
  • .DCU - Delphi Compiled Unit file.
  • .DFM - Delphi Win32 form file (a text resource file).
  • .DPR - Delphi project file. Primary project "source" file.
  • .PAS - Delphi unit source file.
Posted to KB Topic: Language Basics
12 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
9954
Hits

Pascal and Delphi Coding

Mike Prestwood
37. Delphi Prism Prevent Derivation (sealed, final)

Same keywords as Delphi (sealed uses slightly different syntax). With Prism, use the sealed keyword before the class keyword to prevent a class from being inherited from and use the final keyword to prevent a method from being overridden.

Posted to KB Topic: OOP
11 years ago

Code
Nothing New Since Your Last Visit  
8386
Hits

Delphi Prism

Mike Prestwood
38. Delphi Prism Inlining (Automatic)

In Prism, inlining is automatically done for you by the JIT compiler for all languages and in general leads to faster code for all programmers whether they are aware of inlining or not.

Posted to KB Topic: Language Details
11 years ago

Code
Nothing New Since Your Last Visit  
8511
Hits

Delphi Prism

Mike Prestwood
39. Delphi Prism Partial Classes (partial)

Prism supports both partial classes and partial methods using the keyword partial. A partial method is an empty method defined in a partial class.

Posted to KB Topic: OOP
11 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit
13351
Hits

Delphi Prism

Mike Prestwood
40. Delphi Prism Interfaces

With Prism, you use the Interface keyword to define an interface and then you include one or more interfaces where you specify the single class inheritance (separated by commas).

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago
(1 Comments , last by mtiede )

Code

Article
Nothing New Since Your Last Visit
15412
Hits

Delphi Prism

Mike Prestwood
41. Delphi Prism Abstraction (abstract, override)

Prism supports abstract class members and abstract classes using the abstract keyword. An abstract class is a class with one or more abstract members and you cannot instantiate an abstract class. However, you can have additional implemented methods and properties. An abstract member is either a method (method, procedure, or function), a property, or an event in an abstract class. You can add abstract members ONLY to abstract classes using the abstract keyword. Alternatively, you can use the empty keyword in place of abstract if you wish to instantiate the abstract class.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit
13081
Hits

Delphi Prism

Mike Prestwood
42. Delphi Prism Member Modifiers

Prism supports a full suite of member modifiers. Prism virtuality modifiers are virtual, override, final, and reintroduce. Prism general modifiers are abstract, empty, async, external, locked, unsafe, implements, and iterator. Not all member types support all member modifiers. For example, member fields support only readonly and implements.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit  
10451
Hits

Delphi Prism

Mike Prestwood
43. Delphi Prism Assignment (:=)

Same as Delphi.

Posted to KB Topic: Delphi Prism
11 years ago

Code
Nothing New Since Your Last Visit
7216
Hits

Delphi Prism

Mike Prestwood
44. Delphi Prism Inheritance (=class(ParentClass))

In Prism, like Delphi, you use the class keyword followed by the parent class in parens. If you leave out the parent class, your class inherits from System.Object.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
9083
Hits

Delphi Prism

Mike Prestwood
45. Delphi Prism Constants (const kPI: Double=3.1459;)

In Prism, you define constants similar to how you define variables but use the Const keyword instead of the Var keyword. Specifying the type is optional. If you don't specify the type, the compiler chooses the most appropriate type for you.

Declare class constants as part of the class definitions. Declare local constants above the begin..end. Although Prism support inline variables, inline constants are not supported.

Posted to KB Topic: Delphi Prism
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
9502
Hits

Delphi Prism

Mike Prestwood
46. Delphi Prism Parameters (var, const, out)

Prism allows parameters of the same type to be listed together, separated by commas, and followed with a single data type (more params of different data types can follow, after a semi-colon). The default for parameters is by value. For by reference, add var in front of the parameter. Prism also offers constant parameters where you add const in front of the parameter. A constant parameter is like a local constant or read-only parameter the compiler can optimize.

Posted to KB Topic: Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
11730
Hits

Delphi Prism

Mike Prestwood
47. Delphi Prism Member Method (method, procedure, function)

Prism uses the keyword method for member methods. Alternatively, you can use procedure or function if you want the compiler to make sure all functions return a value and all procedures do not.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7997
Hits

Delphi Prism

Mike Prestwood
48. Delphi Prism End of Statement (;)

Object Pascal uses a semicolon ";" as an end of statement specifier and you can put multiple statements on a single line of code and put a single statement on two or more code lines if you wish.

Posted to KB Topic: Language Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
8560
Hits

Delphi Prism

Mike Prestwood
49. Delphi Prism Class Members (static)

The Strict keyword was introduced from the beginning (Delphi.Net preview that shipped with D7).

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
10665
Hits

Delphi Prism

Mike Prestwood
50. Delphi Class Members (Class)

Object Pascal supports static methods, but not static member fields. For static member fields, use traditional Pascal-like global variables. Since Object Pascal is a hybrid language, you can use global functions and data so the need for class methods is diminished but still useful. Delphi 1-7: All classes in a unit are friendly (see eachother's private members), some developers like to put each class in it's own unit and reserve putting multiple classes in the same unit until they wish to implement friendly classes. Delphi 2005+: New strict keyword allows you to indicate friendly.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
13477
Hits

Pascal and Delphi Coding
Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2020 Prestwood IT Solutions.   [Security & Privacy]