Simplicty and flexibility!


New Functions in 8 - MemoSetGlobal()+MemoGetGlobal() - Global array of memo values (8.0.0.1287)

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Functions in 8 - MemoSetGlobal()+MemoGetGlobal() - Global array of memo values (8.0.0.1287)

We have now reached 19 Memo specific functions...puh!

Memo has come to it's own in 8 and it is a little funny as they were so reviled in 7.

Anyways...

We and our 8 users have now used the different memo functions for quite a while and one thing was apparently missing. The opportunity to transfer the content of a memo via memory i.e. global memory variables.

Due to the way PRISM and Memo works, this is not straightforward. What we have done is to create the complementary functions to the new SetGlobal()/GetGlobal() array and called them MemoSetGlobal()/MemoGetGlobal().

The difference however is that you cannot return a Memo as a value of a function, so MemoGetGlobal() need a destination Memo to populate.

Syntax: 

MemoSetGlobal("MyMemoVariableName",TheMemoFieldValueToPutInTheArray)
MemoGetGlobal("MyMemoVariableName",TheMemoFieldThatWeWantToPopulate).

Example:

for MemoTest with Number = 2;
modify records
dummy := MemoCopy(DestMemo , chr(10),3 ) ;
dummy := MemoGetGlobal("Memo1",DestMemo) ;
dummy := MemoMemoCopy(DestMemo,FromMemo,3) .

This example simply copy the Memo value stored in MemoGlobal "Memo1" into the the memo in the record defined by the DQL, and then insert another Memo which is in the record  already.

Just to show that you can manipulate and play with these things ;-)


Written by DataEase 08/05/13 at 13:56:09 Dataease [{8}]FIVE