[Gambas-user] Use of Embedder Component
Hello, I trying to embed a window running on the desktop in a form. The test app is simple a form with a button and a frame. The code below is attached to the "Start" button. I'm running Gambas 3.9.1 under Mint 17 with the Mate desktop. What is the correct syntax for the Desktop.FindWindow command. I used the title shown on the open window I want to embed. Not sure that was correct. Thanks, Marty Gambas class file Public Sub btnStart_Click() Dim hEmbedder As Embedder Dim iWindowinfoArray As Integer[] hEmbedder = New Embedder(iqpy) As "Panadapter" Print Desktop.ActiveWindow * iWindowinfoArray = Desktop.FindWindow("IQ.PY v. 0.30 de AA6E") hEmbedder.Embed(iWindowinfoArray[0]) End Iqpy is the name of the frame on the form. The error occurs at the line marked with the *. 50331653 < Result obtained for the active window (Print Desktop.ActiveWindow) The program 'Panadapter' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 672 error_code 3 request_code 20 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Christmas
Merry Christmas to all of our Gambaser's. A cool one in Perth WA this year low 39;s for the big day/ Seasons greetings fromMike Crean -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Convert string to integer array
On Sat, 24 Dec 2016 11:05:00 +0100 Benoît Minisiniwrote: > Le 24/12/2016 à 09:44, Fabien Bodard a écrit : > > Public Sub Main() > > > > Dim s As String > > Dim i As String > > Dim a As New Integer[] > > ''1) with no knowledge of the number of values > > 'init the string > > s = "[12,32,3]" > > > > 'remove unused spaces and braquets > > For Each i In Split(Left(Right(Trim(s), -1), -1)) > > > > a.Add(i) > > > > Next > > > > > > > > 'display the array content > > For Each i In a > > Print i > > Next > > > > 2016-12-24 7:29 GMT+01:00 adamn...@gmail.com : > >> Baffled! > >> > >> I have a string, like "[1,3]", that I want to populate an integer array > >> from. > >> > >> How to? > >> > >> tia > >> > >> -- > >> B Bruen > >> > > Other solution : MyIntegerArray = JSON.Decode(MyString) > > :-) > > -- > Benoît Minisini > > -- > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today.http://sdm.link/intel > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Classic! The sun is just about down now, so I'd better go to sleep before the arrival of St Nick. Bon natale everyone. and @Casper, the temp here tomorrow (25th) is expected to be 36C+, which is better than yesterday's forecast of 40C+! -- B Bruen -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Convert string to integer array
An elegant solution, one just has to love the Gambas language! a.Add(i) is the part I overlooked, it takes a while to change one's old habits. To all, have a Great Christmas. In this part of South Africa there is a heatwave with temperatures into the high thirties for Christmas. On 24/12/2016, Benoît Minisiniwrote: > Le 24/12/2016 à 09:44, Fabien Bodard a écrit : >> Public Sub Main() >> >> Dim s As String >> Dim i As String >> Dim a As New Integer[] >> ''1) with no knowledge of the number of values >> 'init the string >> s = "[12,32,3]" >> >> 'remove unused spaces and braquets >> For Each i In Split(Left(Right(Trim(s), -1), -1)) >> >> a.Add(i) >> >> Next -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Convert string to integer array
Le 24/12/2016 à 09:44, Fabien Bodard a écrit : > Public Sub Main() > > Dim s As String > Dim i As String > Dim a As New Integer[] > ''1) with no knowledge of the number of values > 'init the string > s = "[12,32,3]" > > 'remove unused spaces and braquets > For Each i In Split(Left(Right(Trim(s), -1), -1)) > > a.Add(i) > > Next > > > > 'display the array content > For Each i In a > Print i > Next > > 2016-12-24 7:29 GMT+01:00 adamn...@gmail.com: >> Baffled! >> >> I have a string, like "[1,3]", that I want to populate an integer array from. >> >> How to? >> >> tia >> >> -- >> B Bruen >> Other solution : MyIntegerArray = JSON.Decode(MyString) :-) -- Benoît Minisini -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Convert string to integer array
Public Sub Main() Dim s As String Dim i As String Dim a As New Integer[] ''1) with no knowledge of the number of values 'init the string s = "[12,32,3]" 'remove unused spaces and braquets For Each i In Split(Left(Right(Trim(s), -1), -1)) a.Add(i) Next 'display the array content For Each i In a Print i Next 2016-12-24 7:29 GMT+01:00 adamn...@gmail.com: > Baffled! > > I have a string, like "[1,3]", that I want to populate an integer array from. > > How to? > > tia > > -- > B Bruen > > -- > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today.http://sdm.link/intel > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user