[Gambas-user] Where is the mistake?
Hello! Where is the mistake? Print "Time-Part: "; Round(Frac(Now()), -8); " ▸ "; Format$(Time(Frac(Now())), "hh:nn:ss"); Format$(Time(Frac(Now())), "(t)") Print "Time-Part: "; Round(Frac(Now()), -8); " ▸ "; Format$(Time(Now()), "hh:nn:ss"); Format$(Time(Now()), "(t)") Output: Time-Part: 0,59328568 ▸ *14*:14:19 (CEST) ' UTC! Time-Part: 0,59328568 ▸ *16*:14:19 (CEST) Regards Hans ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] open-ssl example
Hi, look here: https://www.gambas-buch.de/doku.php?id=k28:k28.3:start Hans ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] DBus - How are signal data converted to Gambas data?
Hello, in a project for the Gambas book on 'D-Bus with gb.dbus' I have the problem to read the arguments of a particular signal. In the text of the XML document (Inspection) I found the number of expected arguments, their names and the signatures. Through the output of the console program, I knew all the values of the three arguments. Cutout Introspection-XML-Document: -- ... ... Output of 'dbus-monitor' after inserting the USB stick with label '2_GB_P': - ... signal sender=:1.10 -> dest=(null destination) serial=173 path=/org/gtk/Private/RemoteVolumeMonitor; interface=org.gtk.Private.RemoteVolumeMonitor; member=VolumeAdded string "org.gtk.Private.UDisks2VolumeMonitor" string "0x1449bd0" struct { string "0x1449bd0" string "2_GB_P" string ". GThemedIcon drive-removable-media-usb drive-removable-media drive-removable drive" string ". GThemedIcon drive-removable-media-usb-symbolic ... drive-symbolic drive-removable-media-usb drive-removable-media drive-removable drive" string "" string "" boolean true boolean true string "0x14af500" string "" array [ dict entry( string "class" string "device" ) dict entry( string "unix-device" string "/dev/sdd1" ) dict entry( string "label" string "2_GB_P" ) dict entry( string "uuid" string "38ea6e0b-a161-401d-a673-11c06cf1229e" ) ] string "gvfs.time_detected_usec.1516884992931147" array [ ] } ... With the following source code I can read the arguments 0 and 1, since they have simple data types. From argument 2, I can only read the values with simple data types. *Therefore, my question: Which way do I have to go - certainly about the class DBusValues, whose documentation I do not understand - in order to read out the values of all arguments safely and to map them to Gambas types?* Gambas-Code-Cutout -- Public Sub theDBusSignal_Signal(Signal As String, Arguments As Variant[]) Dim vElement As Variant Dim i As Integer Dim aDBusArray As New BusValue If Signal = "VolumeAdded" Or Signal = "VolumeRemoved" Then txaResults.Insert("Number of Arguments from 'Arguments' = " & Arguments.Count & gb.NewLine) txaResults.Insert("Arguments[0] = " & Arguments[0] & gb.NewLine) txaResults.Insert("Arguments[1] = " & Arguments[1] & gb.NewLine) txaResults.Insert("~~" & gb.NewLine) For i = 0 To Arguments[2].Max ' txaResults.Insert("[2][" & Str(i) & "]" & " -> " & Arguments[2][i] & gb.NewLine) txaResults.Insert(TypeOf(Arguments[2][i]) & gb.NewLine) Next Print "Number of Arguments from 'Arguments' = "; Arguments.Count Print "Argument[0] = "; Arguments[0] Print "Arguments[1] = "; Arguments[1]; " | Typ = "; TypeOf(Arguments[1]) Print "Arguments[2] = "; Arguments[2]; " | Typ = "; TypeOf(Arguments[2]) For Each vElement In Arguments Print vElement Next For i = 0 To Arguments[2].Max Print "[2]["; i; "]"; " -> "; Arguments[2][i] Next Endif End Cutout Console: - Number of Arguments from 'Arguments' = 3 - Argument[0] = org.gtk.Private.UDisks2VolumeMonitor Arguments[1] = 0x1449bd0 | Typ = 9 Arguments[2] = (Variant[] 0x16ac228) | Typ = 16 - org.gtk.Private.UDisks2VolumeMonitor 0x1449bd0 (Variant[] 0x16ac228) - [2][0] -> 0x1449bd0 [2][1] -> 2_GB_P [2][2] -> . GThemedIcon drive-removable-media-usb ... drive-removable drive [2][3] -> . GThemedIcon drive-removable-media-usb-symbolic ...drive-removable-media-usb [2][4] -> [2][5] -> [2][6] -> True [2][7] -> True [2][8] -> [2][9] -> [2][10] -> (Collection 0x16ac048) [2][11] -> gvfs.time_detected_usec.1516884992931147 [2][12] -> (Collection 0x16ac188) With kind regards Hans -- 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] The classes XmlRpc and RpcType are identical?
Hello, is it correct that the XmlRpc and RpcType classes of the gb.xml.rpc component have the same methods and constants? Sincerely Hans -- 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] git wiki points!
Am 05.09.2017 um 15:20 schrieb Tyrone Lucero: IT'S better join effors for better results... O.K. Installation of * stable * version of Gambas -- The installation was tested for MINT 17.1 (1) Installing the git program if the program is not already installed: hans@mint71 ~ $ sudo apt-get install git (2) Installation of required packages: hans@mint71 ~ $ sudo apt-get install build-essential g++ automake autoconf libtool libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev postgresql-server-dev-9.3 libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libesd0-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libqtwebkit-dev libqt4-opengl-dev libglew1.5-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm llvm-3.5-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev (3) Download A copy of the repository is downloaded to the local PC in the ~ / gambas directory. The complete repository with about 100 MB must be downloaded only once in the Gambas life - if you do not change in the installation directory. hans@mint71 ~ $ git clone https://gitlab.com/gambas/gambas (4) Change to the * automatically * created directory 'gambas' in the home directory: hans@mint71 ~ $ cd ~/gambas Check immediately after download: hans@mint71 ~/gambas $ git pull Already up-to-date. This result was to be expected ... (5) All tags - ie all stable versions - can be sorted sorted with this command: hans@mint71 ~ $ git tag | sort -V The highest version number then appears at the bottom - which corresponds to the current, stable version (*). hans@mint71 ~/gambas $ git tag | sort -V v1.9.44 v1.9.45 ... v3.9.1 v3.9.2 v3.10.0 The following command brings the source code to the current stable version - currently v3.10.0: hans@mint71 ~/gambas $ git checkout $(git tag | sort -V | tail -n 1) Alternative: Direct input of the stable version from the exploration (*) of the current, stable version: hans@mint71 ~/gambas $ git checkout v3.10.0 Note: With 'checkout' you can quickly rebuild the repository file system so that it corresponds to the version version. This is extremely fast because you have the complete repository on the local disk. (6) The stable version is installed in the following steps: (6.1) ./reconf-all (6.2) LLVM_CONFIG=llvm-config-3.5 ./configure -C (6.3) make (6.4) sudo make install (7) (7.1) Start of Gambas in the console: hans@mint71 $ /usr/bin/gambas3or hans@mint71 $ gambas3 Alternative: (7.2) Create a starter on the desktop (7.2.1) Enter as command /usr/bin/gambas3 (7.2.2) Select a suitable icon for the starter (8th) Update for a new version: (8.1) hans@mint71 ~ $ cd ~/gambas (8.2) hans@mint71 ~ $ sudo make uninstall Go to item 6 ... Regards Hans www.gambas-buch.de -- 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] New domain name for Gambas
Hello, that would be OK: gambas4all Hans -- 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] TerminalView1.Exec(...)
Am 01.09.2017 um 15:05 schrieb Tony Morehen: If you're using a recent commit, you can use hTerminalView.Input("somecommand\n") to run it automatically or don't include "\n" and press ENTER. Hello Tony, [System] Gambas=3.10.90 5bb80e5 (master) OperatingSystem=Linux Kernel=3.19.0-32-generic Architecture=x86_64 Distribution=Linux Mint 17.3 Rosa Desktop=CINNAMON Theme=Gtk Language=de_DE.UTF-8 Memory=1855M I always get the message "Unknown symbol 'Input' in the class 'TerminalView'. What now? Regards Hans -- 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] TerminalView1.Exec(...)
Hello, I currently test the component gb.form.terminal with the class TerminalView. The class works as expected with TerminalView1.Exec (["bash"]) or with TerminalView1.Exec (["sudo", "apt-get", "install", "libxml2-utils"]. Is there a way for TerminalView1.Exec (["bash"]) to pass a command to the terminal and then run it automatically or after ENTER? Best regards Hans -- 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] Switching to GitLab
Hello, After the many discussions and suggestions I would have as a simple user of Gambas as a result a working description (commands and meaningful comments) how to (1) completely deletes an old Gambas version and (2) installed a new * stable * Gambas version. This would have a real practical benefit for everyone! Best regards Hans -- 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] XML - Display structure
Hello, I am unable to read and display the structure of the following XML file /xml.xml/: AnnaText1 PaulText2 Note: Indents for the display - for example, in a textarea - can be safely read from the Node.Depth property. The result should look like this: COMMENT RELEMENT: E1 ELEMENT: E2 ATTRIBUTE: ATTR1 VALUE: Berlin ATTRIBUTE: ATTR2 VALUE: Paris ELEMENT: E3 ELEMENT: E4 ATTRIBUTE: ATTR3 VALUE: w TEXT: Anna /ELEMENT: E4 TEXT: Text1 ELEMENT: E5 ATTRIBUTE: ATTR4 VALUE: m TEXT: Paul /ELEMENT: E5 TEXT: Text1 Text2 /ELEMENT: E3 /ELEMENT: E2 /ELEMENT: E1 Does anyone have an idea or suggestion or even a finished solution for the above mentioned task? My projects with XmlDocument and XmlReader do not display the structure of the xml.xml file correctly. But: Other XML files are displayed correctly. We are looking for a (general) solution for any XML files. Best regards Hans Here is the source code used: Private Sub Xml2TreeView(xmlDoc As XmlDocument, hTreeView As TreeView) ' Root-Element hTreeView.Clear() hTreeView.Add("0", xmlDoc.Root.TagName) AddChildren(1, xmlDoc.Root, 0, hTreeView) End Private Sub AddChildren(iIndex As Integer, xmlElement As XmlElement, iParent As Integer, hTreeView As TreeView) As Integer Dim xChild As XmlElement Dim S As Variant Dim xAttr As XmlNode Dim sAttr As String Dim elements As XmlElement[] Dim x As XMLElement Dim xVal As String For Each xChild In xmlElement.ChildElements xVal = "" 'Extract Element-Value if the element has no children If (xChild.ChildElements.Count = 0) Then xVal = ": " & xChild.Value If InStr(xChild.value, gb.lf) Then xVal = Replace(xVal, gb.lf, " ") 'remove line feeds xVal = Left$(xVal, 35) & " " 'show an extract Endif Endif If xChild.Attributes.Count > 0 Then 'Include attributes if contained in element ' Collect Attributes of the element sAttr = "" For Each xAttr In xChild.Attributes sAttr &= xAttr.name & " = " & xAttr.Value & " " Next hTreeView.Add(Str$(iIndex), xChild.TagName & " " & xVal & " " & Trim(sAttr), Null, Str$(iParent)) Else hTreeView.Add(Str$(iIndex), xChild.TagName & " " & xVal, Null, Str$(iParent)) Endif iIndex = AddChildren(iIndex + 1, xChild, iIndex, hTreeView) Next Return iIndex End Public Sub btnStart_Click() Dim xmlDoc As New XmlDocument(Application.Path &/ "xml.xml") Xml2TreeView(xmlDoc, TreeView1) If TreeView1 <> Null And TreeView1.Count > 0 Then TreeView1.MoveFirst() Repeat TreeView1.Item.Expanded = True Until TreeView1.MoveBelow() Endif TreeView1.MoveBack() TreeView1.Item.EnsureVisible() txaXMLContent.Text = xmlDoc.Content End -- 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] Read XML document directly ...
Hello, Question: Is there any way to access the nodes in an XML document by accessing the nodes and their attributes instead of sequentially iterating over the XML document?If YES, I would like a small example, if your time allows. Best regards Hans -- 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] Difference DateDiff(...) ?
Hello, Why are two different results: Public Sub Main() Dim a, b As Long a = DateDiff("01/01/1900", "01/01/1935", gb.Second) b = DateDiff("01/01/1935", "01/01/1970 ", gb.Second) Print a + b Print DateDiff("01/01/1900", "01/01/1935", gb.Second) + DateDiff("01/01/1935", "01/01/1970 ", gb.Second) End Results: 2208988800 ' ok -2085978496' complement? Best regards Hans -- 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] UDP-Socket-Client
Hello. Does anyone have any experience how to query with a UDP socket client on port 123 the time from a time server? A socket client on port 37 will work correctly, but only the seconds since 1.1.1900 will be returned. This accuracy is not enough. Sincerely Hans -- 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] Serialization Database query result
Hello. What is the possibility to serialize the result of a database query (data type result)? Every idea and approach is welcome. Sincerely Hans -- 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] reading files
Am 20.07.2017 um 20:27 schrieb Tony Morehen: I've uploaded the class with a short command line demo to the software farm. Hello Tony, under which heading can I find the class in the software farm? Honsek -- 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] how to determine if array its empty
Case 1: Dim myArray As String[] --> Array not exist. Case 2: Dim myArray As New String[] --> Array ist empty. Case 3: Dim myArray As New String[] --> Array is not empty! myArray.Add("Value") If Not IsNull(myArray) Then If myArray.Count = 0 Then Print "Array ist empty." Else Print "Array is not empty!" Endif Else Print "Array not exist." Endif Hans -- 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] how to determine if array its empty
Correct? If (Not IsNull(myArray) And myArray.Count = 0) Then Print "Array is empty" Hans -- 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] how to determine if array its empty
Hallo, my idea: Dim myArray As New String[] ' Existiert das Array und ist die Anzahl der Elemente gleich Null, dann ist das Array leer If Not IsNull(myArray) And If myArray.Count = 0 Then Print "Array is empty" Hans -- 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] I need a hint on how to deleted duplicate items in a array
Hello, look here: 8<- Public Function RemoveMultiple(aStringListe As String[]) As String[] Dim iCount As Integer Dim iIndex As Integer Dim sElement As String iIndex = 0 ' Initialisierung NICHT notwendig While iIndex < aStringListe.Count iCount = 0 sElement = aStringListe[iIndex] While aStringListe.Find(sElement) <> -1 Inc iCount aStringListe.Remove(aStringListe.Find(sElement)) Wend If iCount Mod 2 = 1 Then aStringListe.Add(sElement, iIndex) Inc iIndex Endif ' iCount Mod 2 = 1 ? Wend Return aStringListe End ' RemoveMultiple(...) 8<- Hans gambas-buch.de -- 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-Documentation
A warm Hello to all friends of the Gambas programming language, many years ago users complained in various Gambas forum posts about the lack of books about Gambas in the German language. I liked Gambas from the beginning. Its conception allows people, like myself, switching over from other environments as well as ambitioned programmers to work on a range of different tasks in a single language. This motivated me as early as 2008 to design a concept for a Gambas book. For a few years now this book is made available online at www.gambas-buch.de. Many chapters have already been published. With great effort, the team of authors pursues the goal to produce a good description of the components and classes of Gambas and to demonstrate their use in example projects. Every chapter and its parts are also offered as a PDF file, and archives of the tested demonstration projects are available for download. However, our work on the online book is hampered increasingly because some components and their classes have only fragmentary documentation in the Gambas wiki, or none at all. By tolerating this condition, the Gambas developers throw away opportunities for newcomers to discover and use Gambas. A class or component should, in my opinion, only be released after its documentation is complete and correct and put on the Gambas wiki. Do the developers really believe that a potential Gambas user will read all the source code to understand how the properties, methods and events work? (I, for one, have never learned C.) To me, for example, it is clear after over 44 years as a grammar school teacher -- among others for Computer Science -- that nothing motivates more than success und success has to be prepared. This brings us to the crucial point with Gambas: all efforts should currently be directed towards quickly closing the gaps and flaws in the documentation! One only learns a language well by speaking it -- and this is only possible with a good dictionary! Such an excellent programming language as Gambas should enjoy a thorough documentation of the existing components and classes with small projects or code snippets which show the essential properties and methods in action. If you have a look at the current state of the documentation, you will see that it is exceedingly incomplete. Do the developers seriously think that the Gambas programmers can read in a crystal ball if all that's known about a class is the names of its properties, methods and events? The software farm with its projects does not replace a systematic treatment of the basics of the language. The online book wanted to provide just that for the German-speaking Gambas programmers, and those who want to be! If none or only insufficient information about the properties, methods and events of a Gambas class is available, then a newbie or a Gambas programmer, who wants to use this class, will resign and turn to other languages. My wish is essentially just that the developers do their job until the end and provide the documentation for their classes, because only then can their valuable work be truly useful. Only then can Gambas finally make progress. Honsek www.gambas-buch.de -- 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] Class HtmlDocument
Hello, why creates the following source text: Public Sub btnCreateHTMLDocument_Click() Dim hHtmlDocument As HtmlDocument hHtmlDocument = New HtmlDocument *hHtmlDocument.Html5 = False** * Print hHtmlDocument.ToString(True) hHtmlDocument.Save(Application.Path &/ "test.html", True) End this HTML5 document? I would have expected: strict HTML 1.0! Hans -- 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] XMLRPC-Server
Hello Lee, Hi Gerhard (PICOORO), I have now installed a PHP XMLRPC server (version 3) on my local Lighttpd web server - it is just a PHP file and two necessary PHPXMLRPC libraries - and call the defined service with a Gambas XMLRPC client. It works well. Sincerely Hans -- 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] XMLRPC-Server
Hello Lee, RpcServer.Listen relies on ServerSocket which is part of the gb.net component. The documentation does not specify that gb.net is required for gb.xml.rpc, but it apparently is. That's exactly. The missing components were added. Thanks for the hint. The source code for the XMLRPC client and the XMLRPC server is attached. The project works - but unfortunately not as a web service - only locally. Where is the error? What should I do? Sincerely Hans XMLRPCCA-0.0.15.tar.gz Description: application/gzip XMLRPCSA-0.1.1.tar.gz Description: application/gzip -- 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] XMLRPC-Server
Hello, I'm currently experimenting with the gb.xml.rpc component. An XMLRPC client works well (see archive attached). Now I would like to offer on the installed Web server Lighttpd (under Mint 17.1) a webservice (XMLRPC server) and via the XMLRPC client call. The following source code for the XMLRPC server provides an error in line ***. Can someone help me? Hans ' Gambas module file Public hXMLRPC As RpcServer Public Sub Main() Dim hXMLRPCFunction As RpcFunction Dim iXMLRPCPort, iXMLRPCServerMaxConnections As Integer hXMLRPC = New RpcServer As "hXMLRPC" iXMLRPCPort = 9009 iXMLRPCServerMaxConnections = 1 hXMLRPCFunction = New RpcFunction("add2integer", [XmlRpc.xInteger, XmlRpc.xInteger], XmlRpc.xInteger) ' hXMLRPCFunction.Help = ("Addition of 2 integers") hXMLRPC.Register(hXMLRPCFunction) Try hXMLRPC.Listen(iXMLRPCPort, iXMLRPCServerMaxConnections) ' *** If Error Then Print "Error-Text: " & Error.Text & gb.NewLine & "Error-Location: " & Error.Where hXMLRPC.Stop() Endif If hXMLRPC.Listening Then Print "The XMLRPC server listens for port " & Str(iXMLRPCPort) Endif End Public Sub hXMLRPC_RemoteCall(sMethod As String, aParameters As Variant[]) Select Case sMethod Case "add2integer" Sum(aParameters) End Select End Public Sub Sum(aParameters As Variant[]) hXMLRPC.SetReply(aParameters[0] + aParameters[1]) hXMLRPC.Stop() End XMLRPCC-0.0.9.tar.gz Description: application/gzip -- 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] Help Class XmlDocument
Hello, I want to use the XmlDocument class for a project for our Gambas online book (www.gambas-buch.de) to write an XML file and implement this headnote from the documentation: 'This API can be used to read as well as write an XML document'. The following shall be the content of the file Adler Am Hafen 3 03937864322 www.cadalto.net Can someone help me with useful tips and code snippets? Regards, Hans -- 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] Monitoring DBus-Signal ?
Am 19.11.2016 um 17:14 schrieb Hans Lehmann: I want to see the signal 'VolumeChanged' sent by the application 'org.gtk.Private.MTPVolumeMonitor' with the interface 'org.gtk.Private.RemoteVolumeMonitor'. The dbus-monitor program shows: signal sender=:1.10 -> dest=(null destination) serial=319 path=/org/gtk/Private/RemoteVolumeMonitor; interface=org.gtk.Private.RemoteVolumeMonitor; member=VolumeChanged I am not able to observe this DBus signal. The project is attached. The project follows the documentation under the link: http://gambaswiki.org/wiki/doc/dbus#t4 . Hello, this line in attached Project: $hDBusSignal = New DBusSignal(DBus.Session, "org.gtk.Private.RemoteVolumeMonitor", True) As "MySignal" generated an error. Example: USB-Stick in: Under Stack.Backstrace in line 19 (DBusSignal.DBusObserver_Message.19): Error-Message: Typ mismatch: wanted String, got String[] instead USB-Stick out: Under Stack.Backstrace in line 19 (DBusSignal.DBusObserver_Message.19): Error-Message: Typ mismatch: wanted String, got Collection instead Regards, Hans SignalWatch-1.2.11.tar.gz Description: application/gzip -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] DBusSignal Error (Send)
Am 18.11.2016 um 18:16 schrieb Benoît Minisini: > Thus: > > DBus[$sDBusService].Raise($hDBusObject, "GetGBVersion", ["3.9.1"]) > > is replaced by: > > DBus[$sDBusService].Raise($hDBusObject, > "org.gambas.signaltx2.nameversion.GetGBVersion", ["3.9.1"]) Hello, This change has the disadvantage that the signal is not displayed in the introspection! With the code: Event GetGBVersion (version As String), the XML file of Introspection contains the interface 'org.gambas.signaltx.nameversion' and the signal 'GetGBVersion'. However, the interpreter terminates with an error message. What now? What to do? Regards, Hans -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Monitoring DBus-Signal ?
Hello, I want to see the signal 'VolumeChanged' sent by the application 'org.gtk.Private.MTPVolumeMonitor' with the interface 'org.gtk.Private.RemoteVolumeMonitor'. The dbus-monitor program shows: signal sender=:1.10 -> dest=(null destination) serial=319 path=/org/gtk/Private/RemoteVolumeMonitor; interface=org.gtk.Private.RemoteVolumeMonitor; member=VolumeChanged I am not able to observe this DBus signal. The project is attached. The project follows the documentation under the link: http://gambaswiki.org/wiki/doc/dbus#t4 . Sincerely, Hans Code: ' Gambas class file Public hDBusObject As New DBusObject Public hDBusSignal As DBusSignal Public Sub Form_Open() FMain.Resizable = False DBus.Debug = True DBus.Unique = True DBus.Session.Register(hDBusObject, Application.Path) ' o.k. hDBusSignal = New DBusSignal(DBus.Session, "org.gtk.Private.RemoteVolumeMonitor") As "MySignal" End Public Sub MySignal_Signal(Signal As String, Arguments As Variant[]) Print Signal Print Arguments.Count ' If Signal = "VolumeChanged" Then Print ("USB-Stick or SD-Card registered!") ' If Signal = "VolumeRemoved" Then Print ("USB-Stick or SD-Card deregistered!") End SignalWatch-1.2.10.tar.gz Description: application/gzip -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] DBusSignal Error (Send)
Am 17.11.2016 um 02:20 schrieb zainudin ahmad: Hi Hans, I hope this work for you:) (project attach) Yes, that has solved it! The new code in the attached project 'signalsend-0.1.82.tar.gz' is correct. It works fine. Hans -- Author of the german Gambas book gambas-buch.de/dw/doku.php signalsend-0.1.82.tar.gz Description: application/gzip -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] DBusSignal Error (Send)
Hello, in my project 'signaltx2' I get after this source line: DBus[DBus.Name].Raise(NameVersion, "GetGBVersion", ["3.9.1"]) the following error message: Couldn't allocate D-Bus message ! Where is the error in the source code? Can someone help? Project attached. Sincerely Hans -- Author of the german Gambas book gambas-buch.de/dw/doku.php signaltx2-0.1.73.tar.gz Description: application/gzip -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user