Hi, I have changed clipboard functionality to dialogs.prg since clipboard is system specific and not window specific. Please see this code in /samples/misc/demo_1.prgmrduck wrote:Please reapply the code of clipboard, so that we can more easily understand which is the error...
METHOD Clipboard( cValue ) CLASS WINDOW
IF ::oClipboard == NIL <<<<<< this code may be moved to window.prg ???
::oClipboard := ::s_qApp:clipboard()
IF PCount() == 0
RETURN ::oClipboard:text( 0 )
::oClipboard:setText( cValue, 0 )
oClipboard must be defined in class application, since it is a singleton anyway
This is the function. Even now it gives the same GPF error.
Code: Select all
FUNCTION SetClipboardValue( cValue ) LOCAL qClip qClip := QClipboard() qClip:clear() qClip:setText( cValue ) RETURN NIL