Controls without user interface

These are the controls and classes in the Controllers group of the Library.

The controls in this section are all non-visual. They do not display on the Window in the built apps and the user cannot see or interact with them. When added to a Layout, they appear on the Shelf area.

Adding these controls to the Layout is merely a convenience to give you easy access to their event handlers. Although you can also create these controls in using the New operator you will not have access to the event handlers unless you first subclass the control (and access the event handlers there) or use the AddHandler command to map event handlers to methods on the window.

You can also add just about any non-visual class to a layout by dragging the Object control onto the layout and changing its Super to the class you want.

IPC Socket

The IPC Socket performs interprocess communications between two applications running on the same computer. Use it to send and receive messages. Like other sockets, the IPC Socket control displays an icon when placed in a window in the Window Editor but has no interface.

See also

IPCSocket class

Note Player

Plays musical notes. Refer to DesktopNotePlayer for a list of available instruments.

Properties

Instrument :The number of the musical instrument to play. Refer to DesktopNotePlayer for a list of the available instruments and their values.

Methods

PlayNote :Plays a note using the supplied pitch and velocity.

Usage

This example:

NotePlayer1.Instrument = 20 ' Church Organ
NotePlayer1.PlayNote(60, 60)

Shell

Provides a quick way to run Unix or DOS shell commands.

See also

Shell class

SerialConnection

Although the SerialConnection control displays an icon when placed in a window in the Window Editor, it is not visible in the built application. It is designed only for executing code to communicate via the serial port. For more information, refer to the Communicating with Serial Devices topic.

ServerSocket

The ServerSocket class enables you to support multiple TCP/IP connections on the same port. When a connection is made on that port, the ServerSocket hands the connection off to another socket, and continues listening on the same port. It includes the ability to replenish its supply of TCPSockets as connections are made. Without the ServerSocket, it is difficult to implement this functionality due to the latency between a connection coming in, being handed off, creating a new listening socket, and restarting the listening process. If you had two connections coming in at about the same time, one of the connections may be dropped because there was no listening socket available on that port.

Spotlight Query

Used to perform Spotlight searches on Mac. It does nothing on other operating systems.

See also

SpotlightQuery class

TCP Socket

Used for executing code to communicate with other computers on the Intranet or Internet using TCP/IP.

See also

TCPSocket class; Communicating via TCP/IP topic

Thread

The Thread class is used to have processing run in the background, which is very useful way to keep the user interface responsive while a process is running.

See also

Thread class; Running code in a thread topic

Timer

The Timer executes some code once or repeatedly after a period of time has passed.

URL Connection

A URL Connections supports web communications to URLs.

You can use this control to send and receive requests to web services and other web-based APIs.

See also

URLConnection class; Accessing Web Services topic

UDP Socket

The UDPSocket supports communications via a UDP (User Datagram Protocol) connection.

UDP is the basis for most high speed, highly distributed network traffic. It is a connectionless protocol that has very low overhead, but is not as secure as TCP. Since there is no connection, you do not need to take nearly as many steps to prepare when you wish to use a UDP socket.

UDP sockets can operate in various modes, which are all very similar, but have vastly different uses. Perhaps the most common use is “multicasting.” Multicasting is a lot like a chat room: you enter the chatroom, and are able to hold conversations with everyone else in the chatroom.

See also

UDPSocket class; Communicating via UDP topic

Object

Use this generic object to add any class to the layout so it can work as a non-visual control, giving you easy access to all its event handlers. Drag the Object to the layout and then change its Super property to your actual class name.

Xojo Script

The XojoScript control allows the end user to write and execute Xojo code within a compiled application. Scripts are compiled into machine code.

You pass the code that you want to run via the Source property and execute it by issuing the Run method.