| |
KB Article |
|
|
Mike Prestwood
|
1. A 10 Minute ObjectPAL Quick Start
If you've never programmed in ObjectPAL, spend 10 minutes and see how easy it is to program Paradox for Windows.
59 months ago, and updated 54 months ago
|
 Article
 5426 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
2. An ObjectPAL Primer: Part 1
This detailed ObjectPAL primer will get you up and running developing in Paradox/ObjectPAL within a few hours.
10 years ago, and updated 35 months ago
(2 Comments
, last by mprestwood )
|
 Article
 7858 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
3. An ObjectPAL Primer: Part 2
Part 2.
10 years ago, and updated 59 months ago
|
 Article
 5283 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
4. An ObjectPAL Primer: Part 3
Part 3.
10 years ago, and updated 50 months ago
(3 Comments
)
|
 Article
7808 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
5. Before You Code
Before you code in ObjectPAL, ask yourself two questions. Does Paradox already do this? Is there a better and easier way? Remember, simple solutions for simple problems.
6 years ago, and updated 43 months ago
|
 Tip
 2455 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
6. Camel Casing
Camel Casing capitalizes the first character of each word except the first word, so it frequently looks like a one or two hump camel. Used by many languages including Paradox's ObjectPAL.
You can contrast Camel Casing with Pascal Casing which capitalizes the first character of each word (including acronyms over two letters in length) and was popularized by Pascal.
59 months ago, and updated 55 months ago
|
 Definition
 3945 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
7. Consolas Font
If you're looking for a replacement for Courier when editing ObjectPAL code, consider Consolas. The Microsoft Consolas Font Family is a set of highly legible fonts designed for ClearType. It is intended for use in programming environments and other circumstances where a monospaced font is specified. This installation package will set the default font for Visual Studio to Consolas, but if you don't have Visual Studio installed, it just skips that process without error.
|
 Download
 4603 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
8. Don't Leave Experiments In Your Code!
If, in experimentation, you use sleep(), doDefault, or DisableDefault to overcome some odd or misunderstood behavior, do not leave the commands in your code. If using the command didnt seem to make a difference, then take it out. Use commands only when they are called for. One great way to really learn the event model and the power of these and other commands is to experiment with adding them. Remember to take them out, however, if they do not do what you wanted.
6 years ago, and updated 43 months ago
|
 Tip
 2517 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
9. Exploring Where To Put Code
Think levels when you code in the Pardox ObjectPAL development environment.
|
 Article
 3552 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
10. Object.Method() Syntax
The syntax of object.method() is consistent throughout ObjectPAL. If an object with the name box has code on its mouseClick event, you can access that code with box.mouseClick() method from any other object. When this code executes, the UIObject method mouseClick() calls the mouseClick event.
How do you know when you can call the code in a built-in method of an object? Easy, if the run-time library has a method equivalent, then you can use itfor example, mouseClick() and pushButton().
6 years ago, and updated 43 months ago
|
 Tip
 2754 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
11. ObjectPAL
ObjectPAL stands for Object Paradox Application Language.
6 years ago, and updated 59 months ago
|
 Definition
 2858 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
12. ObjectPAL Assignment (=)
ObjectPAL uses = for it's assignment operator.
55 months ago, and updated 54 months ago
|
 Code
2809 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
13. ObjectPAL Case Sensitivity (No)
ObjectPAL is not case sensitive. My preference for ObjectPAL is to follow the camel casing promoted in the examples and help files originally developed by Borland.
54 months ago, and updated 52 months ago
|
 Code
3277 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
14. ObjectPAL Code Blocks (endXxxx)
ObjectPAL code blocks are surrounded by statement ending keywords that all use End with camel caps such as endMethod, endVar, endIf, endSwitch, and endTry.
54 months ago, and updated 44 months ago
|
 Code
 2450 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
15. ObjectPAL Comments (; and { ... })
Commenting Code ObjectPAL uses ; for a single line comment and { } for a multiple line comment.
54 months ago, and updated 52 months ago
|
 Code
2942 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
16. ObjectPAL Comparison Operators (=, <>)
Common comparison operators:
| = |
equal |
| <> |
not equal |
| < |
less than |
| > |
greater than |
| <= |
less than or equal |
| >= |
greater than or equal |
|
 Code |
 KB Post |
 3822 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
17. ObjectPAL Constants (const..endConst)
In ObjectPAL, you declare one or more constant values within a const..endConst block. Optionally, you can specify the dataType by casting the value as part of the declaration. If you do not specify the data type, the data type is inferred from the value as either a LongInt, a Number, a SmallInt, or a String. As with variables, the const..endConst block can come within a method or procedure as the first bit of code, or in the Const window. Putting it above the method or procedure is allowed but has no significance so don't.
53 months ago, and updated 52 months ago
|
 Code
2864 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
18. ObjectPAL Development Tools
Corel Paradox for Windows (was Borland Paradox). Also, Borland used to offer a Paradox for DOS tool which support it's Paradox Application Language (PAL) which is not compatible with ObjectPAL. The biggest drawback to Paradox is that Corel does not have anyone at Corel actively developing Paradox for Windows (as opposed to Microsoft Access which does).
54 months ago, and updated 52 months ago
|
 Code
 2796 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
19. ObjectPAL Edit Record (insertRecord, postRecord, edit)
In ObjectPAL, you use Cursor.InsertRecord to add a new record, Cursor.postRecord to post the record, and Cursor.deleteRecord() to delete it. To edit a record, you must put the cursor into edit mode, Cursor.Edit(). (A cursor applies to both a TCursor and UIObject.)
ObjectPAL gives you tremendous flexibility with editing data and includes many additional commands such as insertAfterRecord and isEdit. For dBASE tables, you can also use unDeleteRecord() to un-delete a record. See the ObjectPAL help for more commands.
|
 Code
 2853 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
20. ObjectPAL Empty String Check (isBlank() or not isAssigned())
In ObjectPAL, an empty variable can be unassigned (essentially null) or blank (equivalent to ""). You have to use both isBlank and isAssigned to check for an empty string.
44 months ago, and updated 39 months ago
|
 Code |
 KB Post |
 2818 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
21. ObjectPAL End of Statement (whitespace)
Languages Focus: End of StatementIn coding languages, common End of statement specifiers include a semicolon and return (others exist too). Also of concern when studying a language is can you put two statements on a single code line and can you break a single statement into two or more code lines.
ObjectPAL End of StatementObjectPAL is a bit unique in that it doesn't use a semicolon nor a return to mark the end of a line, it uses whitespace which can be a return, space, or tab. This is a bit unusual but does allow for some nice formatting of code.
53 months ago, and updated 52 months ago
(4 Comments
, last by mprestwood )
|
 Code
3503 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
22. ObjectPAL If Statement (If..Else..EndIf, or switch)
ObjectPAL supports a simple If...Else...EndIf statement.
Notice ObjectPAL does not support an ElseIf feature as part of an if statement. Instead use a switch statement
55 months ago, and updated 52 months ago
|
 Code
4149 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
23. ObjectPAL Level Beginner or Advanced?
Whether your ObjectPAL level is set to Beginner or Advanced, you can use all the ObjectPAL methods, procedures, properties, constants, keywords, and so on. The level panel is a help filter used just for learning purposes. However, because you could in effect "hide" code from yourself, I recommend setting this to Advanced (never use beginner).
6 years ago, and updated 59 months ago
|
 Tip
 2027 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
24. ObjectPAL Literals (quote)
Literals are quoted as in "Prestwood". If you need to embed a quote use a slash in front of the quote as in \".
In ObjectPAL, string literals are limited to 255 characters but there's nothing preventing you from using multiple string literals together as in: msgInfo("", "Hi Mike: " + "You can add literals together in ObjectPAL")
54 months ago, and updated 52 months ago
|
 Code
3583 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
25. ObjectPAL Logical Operators
ObjectPAL logical operators:
| and |
and, as in this and that |
| or |
or, as in this or that |
| Not |
Not, as in Not This |
51 months ago, and updated 44 months ago
|
 Code |
 Article |
3394 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
26. ObjectPAL String Concatenation (+)
String literals s are limited to 255 characters but you can simply add two strings together as in: s = "A long string." + "Another long string."
54 months ago, and updated 52 months ago
|
 Code
 2748 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
27. ObjectPAL Unary Operators
The ObjectPAL unary operators are:
|
 Code
 2547 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
28. ObjectPAL Variables (var x SmallInt endVar)
Declaring variables is optional unless you click Program | Compiler Warnings while in the ObjectPAL editor for every form, script, and library you create. Using Compiler Warnings is strongly recommended to avoid incorrectly typing an existing variable and to avoid any confusion about variable scope. Also recommended is turning on Compile with Debug for every form, script, and library too for tighter, cleaner code.
Undeclared variables are AnyType variables. Common data types include Currency, Date, Datetime, Logical, LongInt, Number, SmallInt, String, and Time.
Declare local variables within a method. If you want a local static variable (retains it's value because it is not destroyed), declare the varialbes above the method. Variables declared in an object's Var window are visible to all methods attached to that object, and objects that it contains.
54 months ago, and updated 38 months ago
(1 Comments
, last by marianchovan )
|
 Code
3909 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
29. Study The Experts
Paradox provides experts that generate code at the field level, in the form open, etc. It is a good idea to study the ObjectPAL generated by these experts.
6 years ago, and updated 43 months ago
|
 Tip
 2468 Hits
|
 Corel Paradox / ObjectPAL Coding
|
Mike Prestwood
|
30. Where to Put Code - Short Overview
Techniques for thinking about where to put code in Paradox's object-based event model.
6 years ago, and updated 59 months ago
|
 Article
 2886 Hits
|
 Corel Paradox / ObjectPAL Coding
|