Language Reference Guide : System Classes : BitmapObject Class : Marker Attribute
 
Share this page          
Marker Attribute
Data Type: varchar(1024)
4GL Access: RW
The Marker attribute enables bitmap objects to be characterized and distinguished.
Unlike FileHandle (see FileHandle Attribute) and DBHandle (see DBHandle Attribute), setting the marker attribute does not trigger a change of bitmap. Consequently, duplicated bitmap objects can be distinguished from the originals by setting a different marker value. The following code illustrates how you could achieve this:
declare
    bmp = BitmapObject;
    copybmp = BitmapObject default null;
    enddeclare
{
    bmp.FileHandle = 'c:\bitmaps\ivy.bmp';
    bmp.Marker = 'ivy';
    bmpcopy = bmp.Duplicate();
    bmpcopy.Marker = bmpcopy.Marker + ' (copy)';
}
Retrieving large sets of records that include bitmap object dbhandles or filehandles into an array from the database automatically triggers correspondingly large numbers of further selects or retrievals from disk to populate these bitmap objects, many of which may never be displayed. You can use the Marker attribute to avoid this problem. Retrieving the handle instead into the Marker attribute avoids the triggered retrieval; the value can then be copied from the marker into the filehandle or dbhandle attribute at the appropriate moment. The following code illustrates how you might do this:
declare
    pic = BitmapObject;
    employees = array of Employee;
    i = integer not null;
    enddeclare
On click list_employees =
{
    i = 1;
    Select name as employees[i].Name, picture as employees[i].Picture.Marker
    from employee
    {
        i = i + 1;
    }
}
On childdoubleclick employees =
{
    pic = employees[].Picture;
    If pic.FileHandle = ''and pic.Marker != '' then
    pic.FileHandle = pic.Marker; //retrieves this employee's picture
    endif;
    callframe EmployeeDetails(employee=employees[]);
}
If the BitmapObject is attached to a FormField or a stored TaggedValue Item, using this in your program during development may change your frame's source definition. See BitmapObject Attributes and Methods Affecting the Frame Source (see BitmapObject Class).