Back to index A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other

Alphabetic catalog of Language elements F

fld-changed

fld-changed is posted when a field is scrolled by drag-selection.

Category UI event
Format (fld-changed id)
Parameters
idthe form id of the field
Description fld-changed is the event posted when a field scrolls because the user has selected some text by dragging the pen.

fld-copy

fld-copy copies text from a UI field to the clipboard.

.
Category Native procedure
Format (fld-copy id)
Parameters
idthe form id of the field
Description fld-copy copies the selected text from a field with id id to the system clipboard. The return value is the field id id
R4RS Compliance LispMe extension
Examples
(fld-copy 1200) => 1200 and copies the selection to the clipboard

fld-cut

fld-cut cuts text from a UI field to the clipboard.

.
Category Native procedure
Format (fld-cut id)
Parameters
idthe form id of the field
Description fld-cut copies the selected text from a field with id id to the system clipboard and erases it from the field. The return value is the field id id
R4RS Compliance LispMe extension
Examples
(fld-cut 1200) => 1200 and cuts the selection to the clipboard

fld-dirty?

fld-dirty? returns if a field has been modified.

Category Native procedure
Format (fld-dirty? id)
Parameters
idthe form id of the field
Description fld-dirty? returns #t if the field has been modified (either by the user or functions like FldInsert()) since the text value was set, #f otherwise.
R4RS Compliance LispMe extension
Examples
(fld-dirty? 1200) => #t assuming the contents have been edited

fld-enter

fld-enter is posted when a field is tapped.

Category UI event
Format (fld-enter id)
Parameters
idthe form id of the tapped field
Description fld-enter is the event posted when the user has tapped a field but not yet lifted the pen.

fld-get-scroll

fld-get-scroll returns scroll parameters for a UI field.

Category Native procedure
Format (fld-get-scroll id)
Parameters
idthe form id of the field
Description fld-get-scroll returns the scroll parameter of a field with id id as a list of 3 integers:
  1. the first visible line (starting with 0)
  2. the total number of lines
  3. the number of visible lines
These values can be used to set the parameters for the scrollbar associated with the field.

Have a look at the sample program showing the interaction between fields and scrollbars.

R4RS Compliance LispMe extension
Examples
(fld-get-scroll 1200) => (4 33 10)

fld-get-text

fld-get-text returns the text of a UI field.

Category Native procedure
Format (fld-get-text id)
Parameters
idthe form id of the field
Description fld-get-text returns the text of a field with id id as a string.
R4RS Compliance LispMe extension
Examples
(fld-get-text 1200) => "foobar" assuming the contents of the field were foobar

fld-paste

fld-paste pastes text from the clipboard into a UI field.

.
Category Native procedure
Format (fld-paste id)
Parameters
idthe form id of the field
Description fld-paste paste text from the system clipboard into the field with id id. If any text was previously selected in the field it will be replaced by the pasted text. Otherwise the text is inserted at the current cursor position. The return value is the field id id
R4RS Compliance LispMe extension
Examples
(fld-paste 1200) => 1200 and pastes the clipboard text

fld-scroll

fld-scroll scrolls a UI field.

The return value is n.
Category Native procedure
Format (fld-scroll id n)
Parameters
idthe form id of the field
nan integer
Description fld-scroll scroll the UI field with id id by n lines. The field is scrolled down if n is positive, it's scrolled up if n is negative.
R4RS Compliance LispMe extension
Examples
(fld-scroll 1200 3) => 3 and scrolls the field down by 3 lines

fld-set-dirty

fld-set-dirty sets the dirty flag of a UI field.

Category Native procedure
Format (fld-set-dirty id obj)
Parameters
idthe form id of the field
objany LispMe object
Description fld-set-dirty clears the dirty flag of the user interface field id if obj is false and sets it otherwise. The return value is obj.
R4RS Compliance LispMe extension
Examples
(fld-set-dirty #t) => #t and sets the field's dirty flag

fld-set-text

fld-set-text sets the text of a UI field.

Category Native procedure
Format (fld-set-text id obj)
Parameters
idthe form id of the field
objany LispMe object
Description fld-set-text prints obj using display formatting conventions and sets the printed text as the contents of the user interface field id. The return value is obj.
R4RS Compliance LispMe extension
Examples
(fld-set-text 1200 (* 6 7)) => 42 and sets the field text to 42

fld-undo

fld-undo undoes the last change to a UI field.

.
Category Native procedure
Format (fld-undo id)
Parameters
idthe form id of the field
Description fld-undo undoes the last editing operation done to the field with id id. The return value is the field id id
R4RS Compliance LispMe extension
Examples
(fld-undo 1200) => 1200 and undoes the last edit

floor

floor computes the largest whole number less than or equal to a number.

Category Primitive procedure (MathLib required)
Format (floor num)
Parameters
numa number
Description floor converts num to a floating point number and returns the largest whole number less than or equal to num. The result is not a LispMe integer, it's a floating point value.

See also ceiling, round, and truncate.

R4RS Compliance Full
Examples
(floor -4.3) => -5
(floor 3.5) => 3

for-each

for-each applies a procedure to each element of a list.

Category Library procedure
Format (for-each proc list)
Parameters
proca procedure of one argument
lista proper list
Description for-each applies proc to each element in list strictly from left to right, ignoring the values returned.
R4RS Compliance Supports only one list
Examples
(for-each write '(2 3 4 5)) => #n and prints 2 3 4 5 to the output area

force

force evaluates a promise.

Category Primitive procedure
Format (force prom)
Parameters
proma promise
Description force evaluates a promise created by delay. If the promise hasn't already been evaluated, it's evaluated now and the result is memoized. Subsequent forcing of this promise will always return the memoized value.
R4RS Compliance Full
Examples
(force (delay 5)) => 5
(force 5) => error

frm-alert

frm-alert displays a PalmOS alert.

Category Native procedure
Format (frm-alert id [obj1 [obj2 [obj3]]])
Parameters
idthe id of the alert resource
objireplacement texts
Description frm-alert retrieves the alert resource with id id from the currently open resource databases and displays it. The alert text may contain upto 3 variables (^1 ^2 ^3) which are replaced by the arguments obji, printed verbatim.

An alert may contain any number of buttons. The (zero-based) index of the button pressed by the user is returned. An alert is defined in a PalmOS resource compiler script like this:

           
ALERT ID 4711
  CONFIRMATION
BEGIN
  TITLE "Really?"
  MESSAGE "Do you want to delete database ^1? (Size = ^2k)"
  BUTTONS "Yes" "No" "Don't know"
END
R4RS Compliance LispMe extension
Examples
(frm-alert 4711 "mail" 45) => 1 after displaying the upper alert and the user pressed the No button.

frm-close

frm-close is posted when a form is closed.

Category UI event
Format (frm-close id)
Parameters
idthe id of the form
Description frm-close is the event posted when a form is closed by frm-goto or by leaving LispMe altogether, but for some strange reasons not by frm-return.

frm-get-focus

frm-get-focus gets the UI element having the focus.

Category Native procedure
Format (frm-get-focus)
Parameters none
Description frm-get-focus retrieves the id of the UI element having the focus. If none has, #f is returned.
R4RS Compliance LispMe extension
Examples
(frm-get-focus) => 1100 assuming UI element 1100 has the focus

frm-get-prop

frm-get-prop gets the form's property list.

Category Native procedure
Format (frm-get-prop)
Parameters none
Description frm-get-prop returns the property list of a form. This list contains LispMe values having the same extent (lifetime) as the current UI form. This functions is intended for debugging, don't modify the list returned!
R4RS Compliance LispMe extension
Examples
(frm-get-prop) => ((1234 . [strarr 5]))

frm-goto

frm-goto closes the current form and displays a new one.

Category Primitive procedure
Format (frm-goto [timeout] id handler)
Parameters
timeoutoptional: timeout for event
idthe id of the form
handlera procedure used as event handler
Description frm-goto searches the specified form id in the currently open resource databases (see set-resdb) and displays it after closing the current form.

handler is installed as the event handler for the new form but no continuation will be stored. Instead, frm-return will return to the original caller invoking the last frm-popup (this is a tail-call in fact). There's no return value.

If specified, timeout must be an integer which is the maximum time (in ticks) to wait until an event arrives. If no event has arrived, the handler is called with a timeout event. This behaviour is useful for background tasks, animations, etc.

R4RS Compliance LispMe extension
Examples See here

frm-help

frm-help display a help string.

Category Native procedure
Format (frm-help id)
Parameters
idthe id of the help string
Description frm-help retrieves the string with id id from the currently open resource databases and displays it in a standard PalmOS help dialog. The return value is #n.
R4RS Compliance LispMe extension
Examples
(frm-help 9000) => #n after displaying LispMe's Valid chars help dialog

frm-open

frm-open is posted when a form is opened.

Category UI event
Format (frm-open id)
Parameters
idthe id of the form
Description frm-open is the event posted when a form is opened by frm-goto or by frm-popup. You should place form initialization code here. Note that drawing of the form is done by LispMe itself, you don't have to do this in the handler.

frm-popup

frm-popup displays a new form, but doesn't close the old one.

Category Primitive procedure
Format (frm-show [timeout] id handler)
Parameters
timeoutoptional: timeout for event
idthe id of the form
handlera procedure used as event handler
Description frm-popup searches the specified form id in the currently open resource databases and pops it up over the current active form, which is not closed.

handler is installed as the event handler for the new form, after the continuation of the call has been stored. This continuation will be re-activated, when the event handler of the form executes frm-return, which is also the return value of frm-popup.

If specified, timeout must be an integer which is the maximum time (in ticks) to wait until an event arrives. If no event has arrived, the handler is called with a timeout event. This behaviour is useful for background tasks, animations, etc.

R4RS Compliance LispMe extension
Examples See here

frm-return

frm-return closes the current form and jumps to its continuation.

Category Primitive procedure
Format (frm-return obj)
Parameters
objany LispMe object
Description frm-return terminates and closes the current form and delivers obj to the continuation stored when the corresponding frm-popup was invoked. There's no return value.
R4RS Compliance LispMe extension
Examples See here

frm-set-focus

frm-set-focus sets the focus to a UI element.

Category Native procedure
Format (frm-set-focus id)
Parameters
idthe form id of the element
Description frm-set-focus sets the input focus to the user interface element with id id id. The return value is id.
R4RS Compliance LispMe extension
Examples
(frm-set-focus 1100) => 1100 and sets the focus to UI element 1100

frm-show

frm-show shows/hides a UI element.

Category Native procedure
Format (frm-show id obj)
Parameters
idthe form id of the element
objany LispMe object
Description frm-show sets the usable attribute of a user interface element with id id depending on obj where #f means not usable and any other value usable and shows or hides the UI element accordingly. The return value is obj.
R4RS Compliance LispMe extension
Examples
(frm-show 1300 #f) => #f and hides UI element 1300

frm-title-enter

frm-title-enter is posted when a form title is tapped.

Category UI event
Format (frm-title-enter id)
Parameters
idthe id of the form
Description frm-title-enter is the event posted when the user has tapped a form title but not yet lifted the pen.

frm-title-select

frm-title-select is posted when a form title has been selected.

Category UI event
Format (frm-title-select id)
Parameters
idthe id of the form
Description frm-title-select is the event posted when the user has tapped a form title and released it.

frm-update

frm-update is posted when a form has to be updated.

Category UI event
Format (frm-update id code)
Parameters
idthe id of the form
codeuser-defined update code (integer)
Description frm-update is the event posted when the system request that the form has to be re-drawn. In this case, code is 0. This event is also sent by FrmUpdateForm() (currently not supported by LispMe) and code is the parameter given to FrmUpdateForm().

Back to index A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other