passing a buffer parameter to a method OpenEdge 11.3

Posted by Blake Stanford on 13-Jun-2014 10:41

Can a buffer parameter be passed to a method? If so I'm having trouble with the syntax.

All Replies

Posted by RWEBSTER on 13-Jun-2014 11:27

Hi Blake,

You can pass the handle of a buffer to a method, is that what you're after?

METHOD PUBLIC VOID bufferio(ip_hbuffer as HANDLE):

/*interact with buffer*/

END METHOD.

Posted by Peter Judge on 13-Jun-2014 11:27

From memory, the below should do the trick:
 
Class TakesBuffer:
  Method public void ThisWorks(buffer pbCustomer for Customer):
   Message available pbCustomer.
End method.
End class.
 
Find first Customer.
oTB:ThisWorks(buffer Customer).
 
Hth,
-- peter
 
[collapse]
From: Blake Stanford [mailto:bounce-blakes@community.progress.com]
Sent: Friday, 13 June, 2014 11:42
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] passing a buffer parameter to a method OpenEdge 11.3
 
Thread created by Blake Stanford
Can a buffer parameter be passed to a method? If so I'm having trouble with the syntax.
Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Blake Stanford on 13-Jun-2014 11:36

That was the trick......Thx

I had:

 method public void ThisWorks(input-output pbCustomer for Customer).  

Apparently the compiler doesn't like the "input-output".

Posted by Blake Stanford on 13-Jun-2014 11:37

sorry I had: method public void ThisWorks(input-output buffer pbCustomer for Customer).  

This thread is closed