PRIM_WEB.BlobReader (PRIM_WEB.BlobReader)
Returns a BLOB as a Base64 data string
Ancestors - Object (PRIM_OBJT)
Details
Blob Reader asynchronously converts a LANSA Blob variable to a Base64 encoded string.
When the Blob has been read, the Completed event will be fired.
Example
In this example, a selected file is converted to Base64.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(432) Width(777) Theme(#SYS_THEME<2015Blue>)
Define_Com Class(#prim_web.BlobReader) Name(#Blobreader)
Define_Com Class(#PRIM_TEXT) Name(#Text) DisplayPosition(1) Left(18) Parent(#COM_OWNER) TabPosition(1) Top(64) Width(711) Height(345)
Define_Com Class(#PRIM_WEB.FilePicker) Name(#FilePicker) Caption('Pick a File') DisplayPosition(2) Ellipses(Word) Height(25) Left(23) Parent(#COM_OWNER) TabPosition(2) TabStop(False) Top(15) VerticalAlignment(Center) Width(120) ThemeDrawStyle('MediumTitle') Alignment(Center)
Evtroutine Handling(#FilePicker.FileSelected) File(#File)
#Blobreader.Read( #File.Blob )
#Text := "Reading Blob"
Endroutine
Evtroutine Handling(#Blobreader.Completed) Data(#Data)
#Text := #Data
Endroutine
End_Com
Properties
Name | Description |
|---|---|
ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT) | |
ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT) | |
ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT) | |
Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT) | |
ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT) | |
ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT) | |
Name identifies the component Inherited from Object (PRIM_OBJT) | |
Owner owns this component Inherited from Object (PRIM_OBJT) | |
The component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT) |
Events
Name | Description |
|---|---|
Fired when the BLOB has been read Data | |
CreateInstance is signaled when an instance of a component is created Inherited from Object (PRIM_OBJT) | |
DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Object (PRIM_OBJT) |
Methods
Name | Description |
|---|---|
Read the contents of the BLOB Blob |