[Gambas-user] clipboard

Benoît Minisini gambas at ...1...
Tue Jun 9 16:11:55 CEST 2009


> Il lunedì 8 giugno 2009 17:27:11 Beren Scott ha scritto:
> > On Mon, 2009-06-08 at 16:47 +0200, Stefano Palmeri wrote:
> > > Il lunedì 8 giugno 2009 16:03:23 Beren Scott ha scritto:
> > > > On Mon, 2009-06-08 at 02:44 -0700, charlesg wrote:
> > > > > Hi,
> > > > >
> > > > > Clipboard.Copy(txtItem.text)
> > > > >
> > > > > rgds
> > > >
> > > > The problem is however that I am currently console only, no gui, and
> > > > I am getting a non-existent item error on "clipboard". Do I have to
> > > > add any lines of code to fix this?
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > >-- ---- --- OpenSolaris 2009.06 is a cutting edge operating system for
> > > > enterprises looking to deploy the next generation of Solaris that
> > > > includes the latest innovations from Sun and the OpenSource
> > > > community. Download a copy and enjoy capabilities such as Networking,
> > > > Storage and Virtualization. Go to:
> > > > http://p.sf.net/sfu/opensolaris-get
> > > > _______________________________________________
> > > > Gambas-user mailing list
> > > > Gambas-user at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> > > Enable gb.gui in the project componets list.
> > >
> > > -----------------------------------------------------------------------
> > >-- ----- OpenSolaris 2009.06 is a cutting edge operating system for
> > > enterprises looking to deploy the next generation of Solaris that
> > > includes the latest innovations from Sun and the OpenSource community.
> > > Download a copy and enjoy capabilities such as Networking, Storage and
> > > Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> > Okay, that is done, but now I am finding that it isn't copying anything
> > into the clipboard. Take for example, I want to use the copied data in
> > another program, copy from gambas2, paste into a web browser. But
> > nothing is being copied into the clipboard.
>
> Oh, you're right. I don't know if this is a bug. Hope Benoit
> reads this. It seems that Gambas copy on its own clipboard.
> I don't understand.
> This code:
>
> PUBLIC SUB Main()
>
>    DIM sss AS String
>
>    Clipboard.Copy("hello")
>    sss = Clipboard.Paste()
>
>    PRINT sss
>
> END
>
> simply print the string on console, but nothing
> on KDE clipboard or X clipborad (tested with xsel).
> So, I don't know.
>
> Gambas 2.13.1
>

It seems there is a bug:

Clipboard.Copy("hello") ' Don't work
Clipboard.Copy("hello", "text/plain") ' Works!

...whereas the two should behave the same.

So there is a workaround at the moment, but I have no idea why the first 
fails...

Regards,

-- 
Benoît




More information about the User mailing list