home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
database
/
p4w_all.zip
/
TI1439.ASC
< prev
next >
Wrap
Text File
|
1993-05-07
|
15KB
|
529 lines
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 1/8
TITLE : Answers to Common Questions About DDE and OLE
This document will provide answers to common questions about 1)
Using Paradox for Windows as a DDE Client, 2) Using Paradox for
Windows as a DDE Server, and 3) Using Paradox for Windows as an
OLE Client/Server. For an introduction on DDE and OLE, refer to
Technical Information Sheet #1438.
Using Paradox for Windows as a DDE Client
Q. How can I use Paradox for Windows as a DDE Client
application?
A. You can use Alphanumeric fields in Paradox tables and
Character fields in dBASE tables as a repository to store
links of other DDE server applications. The fields
display DDE strings showing the application name, file
name, and the place reference; better known as
Application | Topic | Item. You can also Paste Link into
Query Forms to search for Table data matching data in the
open DDE channel.
Q. How do I view the data Paste Linked into a Table?
A. Make sure that you are not in field view. Press
[Shift+F2] to launch the Server application from a Table
window.
Q. Why can't I Paste Link into a form?
A. Paste Link works only in Table window Alphanumeric fields
and in Query Forms.
Q. Why do I get the message "Link information will not fit
in field" when I Paste Link?
A. The field must be large enough to contain the Server
(Application) name, the document (Topic) name including
the complete path to it from the root, the reference
(Item) name, and an additional nine characters.
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 2/8
TITLE : Answers to Common Questions About DDE and OLE
Q. Why do I get the message "Only one DDE link allowed" when
running a query?
A. You may Paste Link only once into a Query Form.
Q. Why do I get the message "Unable to launch" when pressing
[Shift+F2]?
A. The server may not be in the DOS PATH.
Q. What kind of DDE transactions can Paradox for Windows
make with other applications using ObjectPAL?
A. Paradox for Windows can make asynchronous transactions.
This might require you to put in sleeps to wait for the
server to respond to certain requests.
Q. Can other applications "Poke" data into Paradox for
Windows?
A. The Table is the only Paradox for Windows window that has
DDE functionality. Because of performance constraints,
no mechanism was built to allow users to DDE "Poke".
Also, because Paradox for Windows has no macro language,
you cannot use DDE to force changes.
Q. Can other applications send commands to Paradox for
Windows through DDE?
A. In order to control an application through DDE, the
controlled application must contain a predefined set of
macro commands that it can respond to. Paradox for
Windows uses only ObjectPAL to automatically control
itself. When executed, ObjectPAL is compiled into
another Paradox for Windows application that can only be
controlled by external events such as user input. It is
not a macro language that can be sent through a DDE
channel.
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 3/8
TITLE : Answers to Common Questions About DDE and OLE
Using Paradox for Windows as a DDE Server
Q. How can I use Paradox for Windows as a DDE Server
application?
A. You can copy data from a Table window only. It can be
from either one field in one record or it can be the
entire Table. It can be from any field type and must not
be in field or memo view. Also, you can use ObjectPAL to
"Poke" data into or to send commands to other DDE Client
applications.
Q. Why does the data from a memo field appear as <BLOB Memo>
when I Paste Link into another application?
A. This is how a Binary Large OBject appears to the
Clipboard as text. You would Paste Link as a Bitmap to
see the format you expect. Your Client applications'
Help system should give you information about this.
Q. How can I copy more than one line of a memo field so that
it can be Paste Linked into another application?
A. Make sure that you are not in memo view. Resize the row
height to give the maximum view in that record. Choose
Edit | Copy. You can copy only what is displayed. This
would be Paste Linked as a Graphic into the Client
application. Refer to your Client applications' Help
system for information about this.
Q. How can I establish a Cold Link, or a Warm Link?
A. By default, Windows establishes a Hot Link (Automatic
Updates) when Paste Linking into applications. The
Client application (the target) usually controls the
Updates. Some Clients allow you to change a Link so that
you can only Manually do an Update, making it a Cold
Link. Paradox for Windows also allows for this control
as the Server with the Notify On - Table window menu
selection. When you un-check it, the Clients' requests
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 4/8
TITLE : Answers to Common Questions About DDE and OLE
for an Update are ignored until Notify On is again
checked, also making it a Cold Link. As a Server,
Paradox for Windows does not support the Warm Link
function. In a Warm Link, the Server sends a message
asking the user in the Client if they want an Update.
You may have difficulty finding any application that
supports this.
Q. How do I control other applications with DDE?
A. You can use ObjectPAL to send commands to other
applications. You use the same macro command structure
the controlled application understands.
Q. In ObjectPAL, how do I "Poke" data into another
application?
A. You would open the channel using the DDE open and setItem
method, and assign the data as a value to the DDE
variable. You will find an example of this in the
ObjectPAL Developer's Guide. It is explained and
illustrated in Chapter 11, DDE: Link to other
applications, DDE conversations, Conversing, DDE-style,
Sending data.
Q. Why wouldn't data update via a Link from Paradox for
Windows?
A. PDOXWIN may not be in the DOS PATH. You must exit
Windows, edit the AUTOEXEC.BAT file putting PDOXWIN in
the PATH. Then re-execute AUTOEXEC or reboot. This
allows you to use Paradox for Windows as a DDE Server.
Q. Why can't I Paste Link into or "Poke" data into Windows
Write?
A. Windows Write will only establish a DDE Link with a
registered OLE Server. Paradox for Windows is a OLE
Client only.
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 5/8
TITLE : Answers to Common Questions About DDE and OLE
Using Paradox for Windows as an OLE Client/Server
Q. Is Paradox for Windows an OLE Client, Server, or both?
A. Paradox for Windows is an OLE Client only. But, you can
simulate an OLE link of any Paradox for Windows file to
another OLE Client using the command line option of
Windows Object Packager.
Q. Can Paradox for Windows OLE Embed, Link, or do both?
A. You can Embed only. You can link to files using the
command line option in Windows Object Packager or DDE
Paste Link into a Table's Alphanumeric field.
Q. Why do I see only an icon of the application my document
came from in an OLE Table field?
A. This is how the OLE Server (the application you're
pasting from) presents itself to the Clipboard; as an
icon Picture. Some Servers present a graphic (such as
paint and spreadsheet applications). You will find that
all OLE Clients paste the same way.
Q. What are the different methods of interactively Pasting
(Embedding) and Launching OLE servers from Paradox for
Windows?
A. Tables:
Embed - Edit | Paste
Launch - [Shift+F2] or double-click
Forms - Data View - Fields:
Embed - Edit | Paste or right-click | Paste
Launch - Double-click or right-click | [ServerName] |
Edit
Forms - Data View - Objects:
Must Embed and launch from Form Design
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 6/8
TITLE : Answers to Common Questions About DDE and OLE
Forms - Design View - Fields:
Must Embed and launch from Data View
Forms - Design View - Objects:
Embed - Right-click | Define OLE | Paste
Launch - Double-click or right-click | Define OLE |
[ServerName] | Edit
Reports - Data/Design View - Fields:
Must Embed and launch from a Table window or in a
Form Data View
Reports - Data View - Objects:
Must Embed and launch from Report Design
Reports - Design View - Objects:
Embed - Right-click | Define OLE | Paste
Launch - Double-click or right-click | Define OLE |
[ServerName] | Edit
Q. When using the EditLaunchServer action constant in a
pushButton method, why does nothing happen?
A. The OLE object must first be set in focus.
Q. Why don't changes appear when using the OLE variable Edit
method to edit and save an OLE object.
A. The OLE variable Edit method executes asynchronously.
You cannot "wait" for an OLE server to close, so the
variable gets destroyed if it's declared locally because
the method finishes executing before the Server closes.
To solve this problem, declare the variable globally, and
have a separate method assign the OLE object to it. You
can use one of the following two different approaches to
accomplish this.
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 7/8
TITLE : Answers to Common Questions About DDE and OLE
1. Use the OLE variable Edit method as:
Page level:
var
olevar ole
endVar
method open(var eventInfo Event)
maximize()
edit()
olevar=olefield.value
endmethod
method setFocus(var eventInfo Event)
olefield.value=olevar
endmethod
Pushbutton:
method pushButton(var eventInfo Event)
olefield.moveTo()
olevar.edit("Test",0)
endmethod
2. Instead of using the OLE variable Edit method, use
the EditLaunchServer constant as:
method pushButton(var eventInfo Event)
Edit()
olefield.action(EditLaunchServer)
endmethod
Q: Why does a picture pasted into an OLE field from
Paintbrush look incorrect?
A: This can happen if the picture is pasted into Paintbrush,
saved, and then pasted into a Paradox for Windows OLE
field before it is closed and reopened in Paintbrush.
This can also happen if the picture came from a GIF or a
TIF. If you close the Paintbrush picture and reopen it,
it may look incorrect. This is because Paintbrush saved
the image incorrectly. Convert the image in the source
application to an 8 bit BMP file. Then, you can open it
PRODUCT : Paradox for Windows NUMBER : 1439
VERSION : 1.0
OS : WIN
DATE : May 7, 1993 PAGE : 8/8
TITLE : Answers to Common Questions About DDE and OLE
correctly in Paintbrush and Paste into Paradox for
Windows as an Object in OLE.
Suggested Reading:
Microsoft Windows 3.1 Reading
Microsoft Windows 3.1 User's Guide Chapter 13
Microsoft Windows 3.1 Resource Kit Chapter 11
Microsoft Windows 3.1 Software Development Kit Volume 1,
Chapter 5 and 6
Paradox for Windows Reading
User's Guide
Chapter 15
ObjectPAL Developer's Guide
Chapter 5, "Passing arguments"
Chapter 9, "OLE: Object Linking and Embedding"
Chapter 11, "DDE: Link to other applications"
ObjectPAL Reference manual
Chapter 3, "return"
Chapter 4, "AnyType", "view", "DDE", "OLE"
Chapter 5, "index"
TI 1438, "An Introduction to DDE and OLE"
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.