Re: [Gambas-user] XML - Property ReadFlags
Am Donnerstag, den 10.08.2017, 23:11 +0200 schrieb Adrien Prokopowicz: > Le Thu, 10 Aug 2017 18:42:37 +0200, Hans Lehmanna > écrit: > > Hello Adrian, > >Thank you for this example in the playground. Now I can successfully > > work with the component gb.xml. > >To the red marked lines in the source text section, I find no > > description in the documentation. > >Questions: What is the meaning of the Boolean property ReadFlags with > > regard to the use of the class XmlReader?What is the effect of setting > > the value to False? > >Public Sub btnParseXMLNodes_Click() > > txaNodes.Clear xmlReader.Open(sXMLPath) > > xmlReader.ReadFlags[XmlReaderNodeType.Element] = True > >xmlReader.ReadFlags[XmlReaderNodeType.Attribute] = True > > xmlReader.Read() > > While Not xmlReader.Eof > >... > > Wend > > End > > Regards Hans > > When a ReadFlag is set to False, the Read() method will skip the > corresponding > XML node type if it encounters it. > By default they are all set to True, setting them to true manually won't > do anything. > > Here is an example, you can toggle the ReadFlags and see the result : > > https://gambas-playground.proko.eu/?gist=b90eeff3dacbec0548d01701f3c05133 > Salut Adrian, is it the lib, the example or the playground. Have a look to the attached screen. All ReadFlags are set to False, but I get a '6 endelement' -- Amicalement Charlie -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] XML - Property ReadFlags
Le Thu, 10 Aug 2017 18:42:37 +0200, Hans Lehmanna écrit: Hello Adrian, Thank you for this example in the playground. Now I can successfully work with the component gb.xml. To the red marked lines in the source text section, I find no description in the documentation. Questions: What is the meaning of the Boolean property ReadFlags with regard to the use of the class XmlReader?What is the effect of setting the value to False? Public Sub btnParseXMLNodes_Click() txaNodes.Clear xmlReader.Open(sXMLPath) xmlReader.ReadFlags[XmlReaderNodeType.Element] = True xmlReader.ReadFlags[XmlReaderNodeType.Attribute] = True xmlReader.Read() While Not xmlReader.Eof ... Wend End Regards Hans When a ReadFlag is set to False, the Read() method will skip the corresponding XML node type if it encounters it. By default they are all set to True, setting them to true manually won't do anything. Here is an example, you can toggle the ReadFlags and see the result : https://gambas-playground.proko.eu/?gist=b90eeff3dacbec0548d01701f3c05133 -- Adrien Prokopowicz -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Video from Class feeds a DrawingArea problem
http://gambas.8142.n7.nabble.com/Video-from-Class-feeds-a-DrawingArea-problem-td59987.html Hi Ingo, I think you can solve the problem with this code [0][1] from Vuott Gambas-it.org member. If you want, you can also join our Forum and ask questions in English. [0]code in FMain: Public vc As VideoClass Public Sub Button1_Click() vc = New VideoClass vc.drwArea.Refresh() End [1]code in VideoClass.class: Public hPipe As MediaPipeline Public hSource As MediaControl Public hSink As MediaControl Public hdrwVideo As DrawingArea Property {drwArea} As DrawingArea Public Sub _new() With hdrwVideo = New DrawingArea(fmain) .X = 0 .Y = 0 .W = FMain.W .H = 400 .Background = Color.Transparent End With hPipe = New MediaPipeline As "hPipe" hSource = New MediaControl(hPipe, "v4l2src") hSource["device"] = "/dev/video.." hSink = New MediaControl(hPipe, "xvimagesink") hSource.LinkTo(hSink) hSink.SetWindow(hdrwVideo) hPipe.Play() End Private Function drwArea_Read() As DrawingArea Return hdrwVideo End Private Sub drwArea_Write(Value As DrawingArea) hdrwVideo = Value hSink.SetWindow(hdrwVideo) End --end code. Regards Gianluigi -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas + OpenGL --> Virtual reality
B4A may be a viable option. You need Windows and a few bucks though, but here is a 30% discount that might help a bit: https://www.b4x.com/android/purchase_30.html https://www.b4x.com/android/help/opengl.html https://www.b4x.com/android/help/opengl2.html Den 10.08.2017 15:11, skrev Martin Cristia: > (sorry if this was sent twice, somehow I got off of the list) > > Hi, folks; I need advice on transmitting a 3D drawing made with > Gambas+OpenGL to an Virtual reality device; I mean from a GLArea to an > android smartphone. > > This may be not language specific question, I know, but maybe anyone can > point me in the rigth direction. > > Thanks. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas + OpenGL --> Virtual reality
(sorry if this was sent twice, somehow I got off of the list) Hi, folks; I need advice on transmitting a 3D drawing made with Gambas+OpenGL to an Virtual reality device; I mean from a GLArea to an android smartphone. This may be not language specific question, I know, but maybe anyone can point me in the rigth direction. Thanks. -- Saludos Ing. Martin P Cristia -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a picture and inserting
There was a typo in what I programmed yesterday, I found it - sorry for the noise and thank you very much again, Fabien! Regards Rolf Am 09.08.2017 18:20, schrieb Rolf-Werner Eilert: One more question: If I need a Picture (e.g. for a GridView), how do I convert it? Regards Rolf Am 09.08.2017 17:23, schrieb Fabien Bodard: Dim i As Integer Dim hImg As Image For i = 0 To 200 hImg = New Image(32, 32, Color.Transparent) Paint.Begin(hImg) Paint.Font.Bold = True Paint.Ellipse(0, 0, Paint.Width, Paint.Height) Paint.Brush = Paint.Color(Color.Yellow) Paint.Fill(True) Paint.Brush = Paint.Color(Color.Black) Paint.Stroke Paint.Text(i, 0, 0, Paint.Width, Paint.Height, Align.Center) Paint.Brush = Paint.Color(Color.red) Paint.Fill Paint.End ListView1.Add(i, "Item " & i, hImg.Picture) Next -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user