Re: [Gambas-user] gb3 RC1: using structures to replace the loss of Mk$ functions
> On 04/05/2011 01:39 AM, Kevin Fishburne wrote: > > Alright, I've transformed all the networking code to the suggested > > solution, and it's so close to working I can smell it. While there is > > more code now, I like it better as it's easier to read (important!). > > > > Some code: > > Dim id As Byte > > Dim type As Byte > > Dim data As String > > > > id = Read #udp As Byte > > type = Read #udp As Byte > > If Eof(udp) = False Then data = Read #udp, Lof(udp) - 2 > > > > Using "Lof(udp) - 2" as the length seems to remove bytes from the end > > rather than the beginning. I get an unwanted byte at the beginning as > > well. > > > > Maybe this is a late April Fools joke about endianness? Other than that, > > the whole app is ready to put pixels on the screen again > > After checking my code for bugs (none found, knock on wood) and doing > some experimentation, it looks like sending certain data types using the > new method works fine, but other data has an extra byte added in front > of or in-between variables. Any info about what's really happening is > appreciated. > > Again what I'm trying to do is send an ID (Byte), type (Byte), and a > sequence of arbitrary variables via UDP. When they're received, the ID > and type are read normally as Bytes into variables and the rest of the > data is read into a string and stored in an array for later processing. > The arbitrary variables stored as a string (everything after ID and > type) are later interpreted via the *@() functions and assigned to > variables. To do this I just created a different UDP_Write procedure for > each transaction type so the packets/transactions are properly > assembled. I've attached some code excerpts if anyone desires greater > specificity. > > In summary of the attachments, the failure basically goes like this: > > ' Send username and password. >' Send the transaction. >udp.Begin > Write #udp, id As Byte > Write #udp, 50 As Byte > Write #udp, credentials As String ' credentials = > "myusername,mypassword" >udp.Send > > ' Read the username and password. >id = Read #udp As Byte >type = Read #udp As Byte >If Eof(udp) = False Then data = Read #udp, Lof(udp) ' Username and > password separated elsewhere, not a problem. > > data should be "myusername,mypassword" but it actually is > "^Uanon@codex,mypassword". "\x15" prepends the string, strangely. I > think this errant byte also precedes any number of datatypes that are > send separately and later read as a single string. What is this byte, > and how may I get rid of it? Not strange if you read the doc carefully. :-) When using "WRITE #Stream, AString As String", the length of the string is always written before the string contents. To just write the string contents, you must use the second syntax of WRITE: WRITE #Stream, String, Length -- Benoît Minisini -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb3 RC1: using structures to replace the loss of Mk$ functions
On 04/05/2011 03:34 AM, Benoît Minisini wrote: > > Not strange if you read the doc carefully. :-) > > When using "WRITE #Stream, AString As String", the length of the string is > always written before the string contents. > > To just write the string contents, you must use the second syntax of WRITE: > > WRITE #Stream, String, Length > http://www.youtube.com/watch?v=cJPa8dGBxfM I'll get back to you in the morning if it's still not working. Damn... -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb3 RC1: using structures to replace the loss of Mk$ functions
On 04/05/2011 03:54 AM, Kevin Fishburne wrote: > http://www.youtube.com/watch?v=cJPa8dGBxfM > > I'll get back to you in the morning if it's still not working. Damn.. Works. Thank you. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] shell script output controls gambas
Hi Gurus, I am new to Gambas. I have executed shell script,, the shell script output control the decision. My script / #! /biin/bash host google.com>/dev/null if [ $? -eq 0 ]; then echo "Internet connection is UP" else echo "Internet connection is DOWN" fi // When script output controls the decision controls the gambas form. How to write gambas code. Connection Up meas -> Execute another script Connection Down means -> skip the current form Any one help me.. Advance thanks.. --- -Ganesh. -- Did I learn something today? If not, I wasted it. -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] shell script output controls gambas
On 5-4-2011 12:12, Ganesh Kumar wrote: > Hi Gurus, > > I am new to Gambas. I have executed shell script,, the shell script > output control the decision. > > My script > / > #! /biin/bash > host google.com>/dev/null > if [ $? -eq 0 ]; > then >echo "Internet connection is UP" > else >echo "Internet connection is DOWN" > fi > // > > When script output controls the decision controls the gambas form. > > How to write gambas code. > > > Connection Up meas -> Execute another script > > Connection Down means -> skip the current form > > Any one help me.. > > Advance thanks.. > --- > > -Ganesh. > > Maybe this helps you, it uses the ping command. http://domotiga.nl/browser/trunk/DomotiGa/Ping.module Regards, Ron_2nd. -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] shell script output controls gambas
Shell "YourScript.sh" To sStr If InStr(sStr, "UP") Then 'Internet connection is up, do something... Else 'Do something else. Endif Jussi On Tue, Apr 5, 2011 at 13:12, Ganesh Kumar wrote: > Hi Gurus, > > I am new to Gambas. I have executed shell script,, the shell script > output control the decision. > > My script > > / > #! /biin/bash > host google.com>/dev/null > if [ $? -eq 0 ]; > then > echo "Internet connection is UP" > else > echo "Internet connection is DOWN" > fi > > // > > When script output controls the decision controls the gambas form. > > How to write gambas code. > > > Connection Up meas -> Execute another script > > Connection Down means -> skip the current form > > Any one help me.. > > Advance thanks.. > --- > > -Ganesh. > > > -- > Did I learn something today? If not, I wasted it. > > > -- > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Problem with Search & Replace dialog of Gambas 3 IDE
Hello everyone and Benoit, I got a problem with the Search & Replace dialog of Gambas 3 IDE >From the editor area, I press Ctrl+F to open S&R dialog. The S&R dialog appears and ready haves focus (with the I-beam cursor blinks in the search text box). I type some text (including backspace) but nothing appears in the text box. So I close the R&S dialog, back to the editor area. The cursor of the editor are still at the last postion in the editor (of course). But now when I do something with the editor (click something, move the I-beam cursor...) every things that I typed in the R&S dialog before are applied into the editor at the cursor position ??? This problem happens sometime, not always. Second, I have some external functions in my program . But with 2 functions, if they are called, I will get signal 11 when exit the program (program started from IDE)(attached project). I want to know where this problem comes from: Gambas or my wrong calling those 2 external functions. Thank you! [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.35.11-83.fc14.i686 DistributionVendor=redhat DistributionRelease=Fedora release 14 (Laughlin) [System] CPUArchitecture=i686 TotalRam=1793500 kB Desktop=Gnome [Gambas] Gambas1=Not Installed Gambas2=2.22.0 Gambas2Path=/usr/local/bin/gbx2 *Gambas3=2.99.1* *Gambas3Path=/usr/local/bin/gbx3* demoExtern-0.0.1.tar.gz Description: GNU Zip compressed data -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Can Gambas play mp3 Files?
I've tried to use SDL music component to play mp3 file, but I can't. In Example Music player it loads and seems to start, but holds on 0:00:00 with no action or error. I tried Gambas 2 and Gambas 3 on Ubuntu Studio 10.10, Debian 6, Ubuntu Studio 11.04. No luck. Tomasz Kolodziejczyk - Ksiegowa radzi: Jak załozyc firme w 15 minut? http://linkint.pl/f2968 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Can Gambas play mp3 Files?
On mar 05 abr 2011 18:41:16 ART, Tomek wrote: > I've tried to use SDL music component to play mp3 file, but I can't. In > Example Music player it loads and seems to start, but holds on 0:00:00 with > no action or error. I tried Gambas 2 and Gambas 3 on Ubuntu Studio 10.10, > Debian 6, Ubuntu Studio 11.04. No luck. > Tomasz Kolodziejczyk > > - > Ksiegowa radzi: Jak załozyc firme w 15 minut? > http://linkint.pl/f2968 > > > -- > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Have you read this [0] page? It explains how to install the proprietary codec. In short words: $ sudo apt-get install ubuntu-restricted-extras This is just for Ubuntu, i dont know exactly how to install the codec in the other distros PD: this could be added as a dependency when using ubuntu based distros [0]: https://help.ubuntu.com/community/RestrictedFormats/MP3 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Issue 55 in gambas: extended ASCII codes in textarea control give GTK error.
Status: New Owner: Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 55 by zachsmit...@gmail.com: extended ASCII codes in textarea control give GTK error. http://code.google.com/p/gambas/issues/detail?id=55 Try, TextArea1.text = Chr(144) result: Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed No problem in QT. Version: TRUNK Revision: r3689 Operating system: Linux Distribution: ArchLinux Architecture: x86_64 GUI component: GTK+ Desktop used: Xfce -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Issue 56 in gambas: error with GTK textarea control when line property is set out of bounds
Status: New Owner: Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 56 by zachsmit...@gmail.com: error with GTK textarea control when line property is set out of bounds http://code.google.com/p/gambas/issues/detail?id=56 Try, TextArea1.line = -1 or set value too large (out of bounds) to get: Gtk-CRITICAL **: _gtk_text_line_char_locate: assertion `char_offset >= 0' failed Gtk-ERROR **: Char offset -1 is off the end of the line No problem in QT. Version: TRUNK Revision: r3689 Operating system: Linux Distribution: ArchLinux Architecture: x86_64 GUI component: GTK+ Desktop used: Xfce -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user