View Single Post
  #2 (permalink)  
Old 09-04-2009, 11:39 PM
Reinaldo
Guest
 
Posts: n/a
Default Re: How to translate a codeblock to c++.

Here is more:

oChildWnd:bGotFocus := { || odbf:Select(), ;
oVRec:cAccount := odbf:PathNo, ;
ShowRecordings( oVRec, oProcess ),;
oVrec:Stop(),;
oVrec:Refresh() }


Or how about this:


oVRec:bSave := { |oSelf| SaveVoiceRecording( oSelf, oProcess ),
ShowRecordings( oSelf, oProcess ) }
oVrec:bLoad := { || BlobExportWavData( oVrec, oProcess ) }

oVrec:bEnd := { || oVRec := Nil, ;
oBrw:bChange := Nil, ;
oChildWnd:bGotFocus := Nil }


then inside the class you only need this:
*-------------------------------------------------------------------------------------------------------------------------------
METHOD SaveRecording() CLASS TVOICEREC

if ::isAdd .and. ::bSave <> Nil ;Eval( ::bSave, Self ) ;Endif
:iscardRecording()

RETURN NIL

Inside some method:
SetKey( K_CTRL_P, {|| iif( !::aStatus[ IS_PLAY ], ;
( Eval( ::bload ), ::StartPlayBack() ), ;
::Pause() ), ;
::Refresh() } )





Reinaldo.
Reply With Quote