Re: [Gambas-user] How do you deal with multiple objects (Textboxes)

2013-12-13 Thread nando
. (you may think the speed difference might be trivial, but it is important to me) Also, remove or delete all the items in OBJECT[] if you destroy the controls. You may have pointers pointing to invalid/unused memory. -Nando -- Original Message --- From: Charlie To: gambas-user

Re: [Gambas-user] SteamOS and GAMBAS

2013-12-16 Thread nando
Made my day. "Other than available software, there is nothing about Windows remotely superior to GNU/Linux." - Kevin Fishburne -- Original Message --- From: Kevin Fishburne To: gambas-user@lists.sourceforge.net Sent: Sun, 15 Dec 2013 16:02:11 -0500 Subject: Re: [Gambas-user] S

Re: [Gambas-user] Serial port control

2013-12-23 Thread nando
it for your devices. I assure you it can certainly do it without fail. -Nando -- Original Message --- From: Randall Morgan To: mailing list for gambas users Sent: Sun, 22 Dec 2013 23:35:33 -0800 Subject: Re: [Gambas-user] Serial port control > I think the RTheshold of VB sim

Re: [Gambas-user] Serial port control

2013-12-23 Thread nando
for 124 bytes. Both of these can be a Gambas Class and the second function is the public function. You can use _new to instantiate the serial port control. You don't need to create it at design time. I used techniques like this and it works like a charm. -Nando -- Original Me

Re: [Gambas-user] Gambas Future or what kind of Gambas we want.

2014-01-23 Thread nando
. Thank you -Nando -- Original Message --- From: Jussi Lahtinen To: mailing list for gambas users Sent: Thu, 23 Jan 2014 03:31:56 +0200 Subject: Re: [Gambas-user] Gambas Future or what kind of Gambas we want. > I would guess by far the largest number of potential > &

[Gambas-user] databrowser.delete and databrowser.filter

2009-04-14 Thread nando
Hi, first sorry for my little english. i have two questions: can i change the way databrowser.delete works? I don't want it to really delete a register, i have a field called online (yes/no), and i want just to change that value. Is it posible with databrowser? the other question is about databr

Re: [Gambas-user] databrowser.delete and databrowser.filter

2009-04-15 Thread nando
Thank you, now it really works El mié, 15-04-2009 a las 02:57 +0200, Ron_1st escribió: > On Tuesday 14 April 2009, nando wrote: > > dim uno as string > > uno=datacontrol1.value > > databrowser1.filter ="clientcode=uno" > > > Chane it to >

Re: [Gambas-user] handling database nulls

2009-04-15 Thread nando
What about testing if it's null first as in... IF IsNull(dbresult!rangeheight) THEN 'it's null here, you might want to do something like dp.rangeheight=0 ELSE dp.rangeheight=$dbresult!rangeheight ENDIF -- Original Message --- From: Bruce To: gambas-user@lists.sourceforg

Re: [Gambas-user] Writing a "Choose Your Own Adventure" prototype

2009-04-15 Thread nando
The following is not a true statement: 'Becuase Gambas is object oriented goto's aren't needed.' I use Gambas in an OO way and sometimes GOTO is very clear and I use it. I also use GOTO when I control to go exactly someplace and (possibly) not test or run unnecessary code in-between. I also u

[Gambas-user] databrowser toolbar - delete

2009-04-16 Thread nando
hi, is there a way when i press the del button in the toolbar not to delete the register in the database but modify the register to set it as inactive? Thank you -- Stay on top of everything new and different, both insid

Re: [Gambas-user] A refreshing a gui question

2009-04-17 Thread nando
I heavily use ver 1. I found out through experimentation that I get more of what I think it should do by using WAIT or making the SUB very small. In either case, it appears that the runtime needs to have a change to 'do things'. -- Original Message --- From: richard terry To: mai

Re: [Gambas-user] Catch NULL character

2009-04-19 Thread nando
Actually, the NULL character is a true character. Specifically, it is CHR$(0) <---zero. It is an actual character in ASCII and other sets. Alternatively, NULL is used in databases, Java, C, others to describe certain situation. Java: Null pointer is a pointer which has a value of zero and theref

Re: [Gambas-user] More null problems

2009-04-20 Thread nando
I would set them all to false first, then do a case statement, then case else is unknown as a 'catch-all' -- Original Message --- From: Bruce To: gambas-user@lists.sourceforge.net Sent: Mon, 20 Apr 2009 15:59:26 +1000 Subject: [Gambas-user] More null problems > I have a set of t

Re: [Gambas-user] C Code character manipulation - alternatives

2009-05-22 Thread nando
Technically, C doesn't 'put' garbage values into variables. Those values just happen to be there if you don't set it to something. Gambas wonderfully sets numeric variables to zero. You can think of it as NULL, I suppose, but ZERO is a numeric description dealing with numbers whereas NULL is usual

Re: [Gambas-user] Smooth Scrolling (not happening)

2009-05-22 Thread nando
Run a new separate program just for the credits and make sure it is placed on the screen exactly where you want it to be. A possible future feature Benoit, The Tools include many things like Listbox, etc. Can there be something that is a container just for an already compiled Gambas program???

Re: [Gambas-user] C Code character manipulation - alternatives

2009-05-23 Thread nando
If you're looking for something CAD OpenOffice comes with Draw which is very similar to Corel in many ways. I use it to make PC Boards and drawings/etc. It works very well!! You might not have a link to it, so at the text prompt, type oodraw -Fernando -- Original Message --- From

Re: [Gambas-user] WAIT in sub reverses number

2009-06-04 Thread nando
I had a similar thing happen a while ago. It is caused because of something like this: When a key event happens, there is a key value associated with the event. BUT the WAIT allows the next key event to happen before the first key event actually finishes and exits the SUB for that key value So the

Re: [Gambas-user] Confusion in Data Types

2009-06-08 Thread nando
Float and Double is not as simple an explaination as the Int and others. You should read a Wiki on floating point storage and issues involving it. What you're attempting to do is a difficult thing because you're getting to the limits of float numbers and straddling the edge of NAN and other wierd t

[Gambas-user] datasource filter

2009-06-25 Thread Nando
Hello, how can i set the filter property of a datasource for 2 fields. Example: filter where id =value and nprice>dat id and nprice are fields, and value and dat are variables I can filter one of them but not them together Thank you an d sorry for my little english ---

Re: [Gambas-user] Gambas performances

2009-08-17 Thread nando
My question is: are you really testing Gambas or kernel networking (snmp)?? -- Original Message --- From: Olivier Cruilles To: mailing list for gambas users Sent: Mon, 17 Aug 2009 20:27:44 +0200 Subject: [Gambas-user] Gambas performances > Hello Benoit, > > Just a question ab

Re: [Gambas-user] Obtain my IP with Gambas

2009-09-09 Thread nando
The way I do it is by shelling the ip command At the prompt: ip addr | grep -w "inet" I have redirected it to a file and parse items the lines I have used SHELL ".." FOR READ and used PROCESS_READ to parse the lines Somebody may have something much more elegant. -Fernando -- Origin

Re: [Gambas-user] intel i7 - parallel processing

2009-09-11 Thread nando
I run simultaneously multiple Gambas apps on a multicore cpu - some very cpu and I/O intensive and SHELLing big scripts in the background. Most impressed I'm with is dual Atom with hyperthreading which looks like four cores to the kernel. My apps are not the same (ie parallel programs). The kernel

Re: [Gambas-user] serial port

2009-09-19 Thread nando
In my Linux serial port experience, serial port devices are named: /dev/ttyS0..9 and upwards /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. I have done a lot of serial port stuff with Gambas. I know that trying to open then with the serial port control will fail is non-exising

Re: [Gambas-user] stop file COPY

2009-09-28 Thread nando
You would have to find the pid of the copy program such as something like the following to help find the exact command: pgrep "cp..." then use kill, pkill This may lesd you in a direction. -Fernando -- Original Message --- From: Dimitris Anogiatis To: mailing list for gambas user

Re: [Gambas-user] Arithmetic failure in project..Solution

2009-10-02 Thread nando
Friend, I have gone through your project and I ran it with these changes: (1) in SUB action_click...insert above this line: result = (exposure * (guidenumber / distance) * (flashcompensation) * (multicompensation)) these four lines: IF gn_feet.Value = TRUE THEN guidenumber = (input_gn.Value / 3

Re: [Gambas-user] Really weird socket problem

2009-10-19 Thread nando
My experience over the years with Gambas and really odd issues that appears to point to Gambas failing always (ALWAYS!) was that Gambas did not fail, but something else broke. Unless you have a hard drive failure, bad cable, etc, your Gambas is almost certainly working just fine. Something else cha

Re: [Gambas-user] serial port.

2009-10-19 Thread nando
If you want to send a binary 37 to serial port Sport, then you can do any of these: 1. Print #Sport, "%"; 2. Print #Sport, Chr$(37); 3. S=Chr$(37) Write #Sport, S, 1 You do not have to 'convert' to binary. -Fernando -- Original Message --- From: abdurrahman ulusoy To:

[Gambas-user] from ubuntu to archlinux

2009-11-03 Thread nando
Hello first of all, sorry about my english. My problem is, 5 days ago i switched from ubuntu 9.04 (kde) to archlinux (kde). I have a program to manage my company, wich worked ok. Now all the forms and controls in the program are in the wrong place. I mean, in full screen, in ubuntu i was able to s

Re: [Gambas-user] from ubuntu to archlinux

2009-11-03 Thread nando
revision, and I did fix it > manually. > > Do you forms have Scaled property on? > If so forms are scaled with desktop font size. > > Jussi > > > > On Tue, Nov 3, 2009 at 14:32, nando wrote: > > Hello > > first of all, sorry about my english. >

Re: [Gambas-user] Setting a checkbox value

2009-11-21 Thread nando
Workaround I use. 1. Use an OPTIONAL boolean in the Click Event. 2. The user clicking defaults to false but you manually send a true in code. 3. Then your click event simply returns if the optional is true. -Fernando -- Original Message --- From: bbb888 To: gambas-user@lists.sour

Re: [Gambas-user] Serial ports in Gambas

2009-11-24 Thread nando
Serial Port support in Gambas is 100% I've been using it 100% uptime for almost 5 years. Look at the NETWORKING Serial Port Example. -Fernando -- Original Message --- From: Kari Laine To: Gambas-user@lists.sourceforge.net Sent: Mon, 23 Nov 2009 05:50:24 +0200 Subject: [Gambas-use

Re: [Gambas-user] How can I create radio (mutually exclusive) menu?

2009-11-28 Thread nando
Radio Buttons only make sense when you use more than ONE. Placing them on a PANEL container makes them a 'family' and are grouped together so that only one can be selected TRUE. If you don't want to see the panel border, you can have no border. If you use only ONE Radio Button, it will always be T

Re: [Gambas-user] How can I create radio (mutually exclusive) menu?

2009-11-29 Thread nando
A radio button is one thing. A Checkbox is another thing. Below, somebody wrote..."OK, but how can I get the standard 'radio check' icon" Someone is confused using Radio from radio button and Check from Checkbox. There is no check for radio... If you place two radio buttons on one panel, they are E

Re: [Gambas-user] Serial Port Change Events Not Working after Upgrade to Karmic

2009-12-05 Thread nando
Benoit, Just to let you know, for your information only. My serial port applicationS that have been running 24 hours for 4 years on over 150 computers works much better when pull out All less 1 byte each _Read event as opposed to. I've found out that sometimes, rarely, _Read didn't fire and this w

Re: [Gambas-user] Serial Port Change Events Not Working after Upgrade to Karmic

2009-12-05 Thread nando
I found out that reading one by one is a slow process, I found out that reading all Lof will in a rare instance _READ will not fire when only 1 byte arrives immediately after. I find it works correctly 100% when I read Lof()-1 and rely on _Read to fire again. for the one remaining and the new one

Re: [Gambas-user] Timer

2009-12-13 Thread nando
>From using it and from Benoits previous help, My understanding of Timer is as follows: When the Timer is supposed to fire, it will if the Interpreter is available to invoke the SUB with the Timer code. If some other SUB is busy or if CPU loaded, it is not noticed..and forgotten. What two things

Re: [Gambas-user] Financial program

2009-12-14 Thread nando
My contribution to this conversation is.. Always INT or LONG for money. Keep a global variable to divide by (for example 2 decimal places) 100 when printing/displaying things to humans... -OR- to take the string and insert a period for cents (North America) Make a really nice SUB to return a format

Re: [Gambas-user] About financial program in Gambas

2009-12-16 Thread nando
For your info only... I always use INT or LONG for accounting and money. So, (here in Canada), $42.87 is 4287 I keep the tax (8%) as a float, therefore 8.25% is 8.25 This is ok for tax because rounding is needed. For example: 4287 * 8.25 = 35367.75 / 100 = 353.6775 add .5 for 5/4 round up down = 3

Re: [Gambas-user] Problems retrieving the original values

2009-12-17 Thread nando
SQLite REAL is 8B IEEE floating point number Gambas FLOAT is the exact same thing. 1. Make sure your Gambas var is FLOAT and not SINGLE 2. What you see 5.819279E+8 is only a visual representation to humans of what the value really is. Use FORMAT$ to represent it differently the way you wan

Re: [Gambas-user] fastest way to "zero-out" a huge binary file

2010-01-23 Thread nando
Gentlemen, The Gambas program below does not write ZERO's in all locations. The part of the file that is before the seek will have garbage and if you found them to appear to be zero, you are just lucky - this time. perform this shell command: dd if=/dev/zero of=Elevation.tmp bs=65537 count=65537

Re: [Gambas-user] Invitation to connect on LinkedIn

2010-03-01 Thread nando
The invitation went to everyone on the list. -- Original Message --- From: Ahmed Nashith To: Joan Lucì Labòrda Sent: Sun, 28 Feb 2010 19:10:36 -0800 (PST) Subject: [Gambas-user] Invitation to connect on LinkedIn > LinkedIn > Ahmed Nashith souhaite se connecter à vou

Re: [Gambas-user] MySQL query problems with apostropies

2010-04-06 Thread nando
Strings that contain these three characters: quote, double quote and backslash need to be escaped. You escape them by having a backslash immediately before it. Example: Patty O'Lantern would be... Patty O\'Lantern One way is to make a small function that will insert a backslash when it finds a

Re: [Gambas-user] Parallel Port - Illegal Seek -

2010-04-06 Thread nando
Using SEEK is not correct. If you think of the parallel port as a file, you cannot seek. It doesn't make sense. You can only read and write. What are you trying to accomplish ? -Fernando -- Original Message --- From: Bjorn Macintosh To: gambas-user@lists.sourceforge.net Sent: Fr

Re: [Gambas-user] Parallel Port - Illegal Seek -

2010-04-07 Thread nando
Seek will not change the address. -- Original Message --- From: Doriano Blengino To: nand...@nothingsimple.com, mailing list for gambas users Sent: Wed, 07 Apr 2010 11:06:42 +0200 Subject: Re: [Gambas-user] Parallel Port - Illegal Seek - > nando ha scritto: > > Usin

Re: [Gambas-user] MySQL query problems with apostropies

2010-04-07 Thread nando
iling list for gambas users Sent: Wed, 07 Apr 2010 15:33:12 -0400 Subject: Re: [Gambas-user] MySQL query problems with apostropies > On Tue, 2010-04-06 at 16:27 -0500, nando wrote: > > Strings that contain these three characters: quote, double quote and > > backslash > > need

Re: [Gambas-user] Did anybody try to run stepper motors through paralel port

2010-04-18 Thread nando
I use Gambas for nearly real-time work and it performs remarkably well, actually quite impressed. Far better than VB I have a data stream at 13.5 Kbps coming in from a remote modem requiring immediate work and turn around output. It might not seem like a fast stream, but the remote end requires a r

Re: [Gambas-user] serial port issue

2010-04-21 Thread nando
I use 6 serial ports, sometimes usb mixed in, No problem in Gambas whatsoever -Fernando -- Original Message --- From: Ron To: mailing list for gambas users Sent: Wed, 21 Apr 2010 15:29:37 +0200 Subject: Re: [Gambas-user] serial port issue > I have no experience with the cable i

Re: [Gambas-user] Wait statements > stack overflow (gb3)

2010-05-09 Thread nando
If I understand correctly from my Gambas programming experience and Benoit's comments over the years... A WAIT inside an event may allow the event to recursively retrigger if there are new events for that event. For example: A button click that does a lot of work. If you click the button while th

[Gambas-user] IDE editor (small) bug? Gambas 2.9

2010-08-18 Thread nando
Example: IF X < 1 OR X > 100 THEN 'My comment here Highlight any part of the line then press the TAB key. Tabs are inserted at the beginning of the line. -Fernando -- This SF.net email is sponsored by

Re: [Gambas-user] IDE editor (small) bug? Gambas 2.9

2010-08-19 Thread nando
) bug? Gambas 2.9 > 2010/8/18 nando : > > Example: > > > > IF X < 1 OR X > 100 THEN                 'My comment here > > > > Highlight any part of the line then press the TAB key. > > Tabs are inserted at the beginning of the line. > > > >

[Gambas-user] Class Constructor private var questions

2012-02-12 Thread nando
I wanted to verify that.. example: I have a class called 'X' with a private variable PRIVATE my_int AS INTEGER = -14 PUBLIC SUB _NEW()'===constructor=== my_int = -15 END Questions: 1) The =-14 act as a constructor automatically for a _NEW instantiation? 2) The =-15 occur as a manu

Re: [Gambas-user] Memory problems with Gambas3

2012-02-19 Thread nando
I had a similar huge problem with pictures. I found it to be this: When I made a new picture, even if using an existing control, the old picture still consumed the memory - it wasn't freed. I solved it by doing (recalling from memory so I may have syntax wrong) picture.clear which deallocated the

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-23 Thread nando
felder as STRING[] is a parameter passed into sub It is no good outside of SUB What you should do is make your sub PUBLIC FUNCTION ListeKundeFelder(schlysselnr AS String, felder AS String[]) AS STRING[] and return the string[], assigning it to the original felder[] -Fernando -- Or

[Gambas-user] Possible suggestion/question

2012-02-25 Thread nando
Benoit, I came across the need to call many different common small pieces of code multiple times. Naturally, we tend to make a SUB just for all of them. I wondered if you'd consider resurrecting GOSUB {label} which is in the same sub. It would be in the same scope, no parameters allowed and act

[Gambas-user] Dim Keyword..I noticed something

2012-02-26 Thread nando
I am using some keywords as Integer vars DIM {event} AS INTEGER DIM {timer} AS INTEGER In the IDE, the second line automatically capitalized and highlighted as a keyword with keyword color. In Gambas2. Maybe it propagated forwards into Gambas 3 -Fernando --

Re: [Gambas-user] How to organize dependent lists

2012-02-28 Thread nando
I would do it this way 1) I would make a class for data 1. If contains whatever PRIVATEs you wish 2) I would make an OBJECT[] which hold as many of the above class instances you need 3) I would make an OBJECT[] which hold as many of the above OBJECT[] as you need item 1: OBJECT[] has two OBJEC

Re: [Gambas-user] How to organize dependent lists

2012-02-28 Thread nando
The second level OBJECT[] actually turns out to be an array of Classes. My experience is people understand the OBJECT[] way because of the container within a container concept. It is the same thing :) -- Original Message --- From: tobi To: i...@eilert-sprachen.de, mailing list f

Re: [Gambas-user] Gambas has Gosub now!

2012-03-03 Thread nando
Superb work! Bravo! -- Original Message --- From: Benoît Minisini To: mailing list for gambas users Sent: Sun, 04 Mar 2012 02:23:57 +0100 Subject: Re: [Gambas-user] Gambas has Gosub now! > Le 04/03/2012 02:03, Emil Lenngren a écrit : > > Nice work! > > About "occupying" the Ret

Re: [Gambas-user] Gambas has Gosub now!

2012-03-05 Thread nando
Simple answer: yes Complex answer: yes -- Original Message --- From: Ru Vuott To: mailing list for gambas users Sent: Sun, 4 Mar 2012 15:23:24 + (GMT) Subject: Re: [Gambas-user] Gambas has Gosub now! > > But I get a compile error: > > error: 'TRANS_GOTO' has no member named

Re: [Gambas-user] gb3: how to check if event is pending execution before it triggers

2012-03-17 Thread nando
How about this... Let's say you want the Frame to render not less than 0.5 seconds after reading UDP stuff...but only if there is no UDP stuff to read. So, make a Timer that is solely for Frame render/updating. When UDP_Read triggers, store your data to render/update, but don't render it yet. A

Re: [Gambas-user] WebPage support in Gambas

2012-03-18 Thread nando
If you wanted to know, an English term for Nothing is engraved in the marble would be Nothing is etched in stone. === One thing I am thinking right off the top is the equivalent to sessions in PHP where a specific folder on the server holds something equivalent that is sent by the brows

Re: [Gambas-user] WebPage support in Gambas

2012-03-18 Thread nando
Thank you!!! I'm going to migrate Thank you Benoit -- Original Message --- From: Benoît Minisini To: nand...@nothingsimple.com, mailing list for gambas users Sent: Mon, 19 Mar 2012 00:40:17 +0100 Subject: Re: [Gambas-user] WebPage support in Gambas > Le 19/03/2012 00:1

Re: [Gambas-user] Delete sentance between words in a file.

2012-03-27 Thread nando
An Very Simplified Example: (Best viewed in fixed-width font) (There are many other (and better) ways to do this) A = "A Tall Lad Sold All The Desks" '12345678901234567890123456789 29 characters long R = "Tall Lad Sold All The"This sub string is to be removed (21 chars long) 'Remo

Re: [Gambas-user] Delete sentance between words in a file.

2012-03-28 Thread nando
Yup. Too much beer. -- Original Message --- From: Rolf-Werner Eilert To: gambas-user@lists.sourceforge.net Sent: Wed, 28 Mar 2012 11:58:43 +0200 Subject: Re: [Gambas-user] Delete sentance between words in a file. > Just > > > D = B + C 'Combine both together >

Re: [Gambas-user] Load hidden file to variable?

2012-04-02 Thread nando
A hidden file IS hidden by default from normal views. So, the result appears to be correct. (Benoit: maybe a flag is needed for hidden files in call?) Nevertheless, LOAD ought to work with hidden files too. (Are your permissions correct) Files extensions and associations are a windoze thing and don

Re: [Gambas-user] Problem with row count in mysql

2012-04-05 Thread nando
My two cents worth: I see a few problems: 1) There is an erroneous END just above PRINT iData near the end of your example or something is out of order(?) 2) iData is a Result data type and not an INTEGER...and iData doesn't have the row counts but iData.count is an INTEGER 3) Internally M

Re: [Gambas-user] gb3: incorrect solution to If...Then condition

2012-04-27 Thread nando
messy over many calculations. -Nando -- Original Message --- From: Jussi Lahtinen To: mailing list for gambas users Sent: Fri, 27 Apr 2012 21:44:08 +0300 Subject: Re: [Gambas-user] gb3: incorrect solution to If...Then condition > If Sin(0.5) ^ 2 + Cos(0.5) ^ 2 <> 1

[Gambas-user] Gambas 2 on CentOS 6.2 does not compile

2012-05-16 Thread nando
Full clean install CentOS 6.2 As per README in Gambas2 STEP 1: ./reconf-all (no error) STEP 2: ./configure -C (no error but some gambas packages were disabled) STEP 3: ./make (this is just the last part of the console) libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/lib/qt-3.3/includ

[Gambas-user] Gambas 3 on CentOS 6.2 does not compile

2012-05-16 Thread nando
Full clean CentOS 6.2 Gambas 3 === Gambas ./configure -C results || || THESE COMPONENTS ARE DISABLED: || - gb.db.sqlite2 || - gb.gsl || - gb.image.imlib || - gb.opengl || - gb.pdf || - gb.sdl || - gb.sdl.sound || - gb.v4l || ===

Re: [Gambas-user] New feature in Gambas 3

2012-05-19 Thread nando
Nice! -- Original Message --- From: Benoît Minisini To: mailing list for gambas users Sent: Sat, 19 May 2012 13:58:19 +0200 Subject: [Gambas-user] New feature in Gambas 3 > Hi, > > I have just added the ability to profile a project from the IDE. > > This is not finished yet.

Re: [Gambas-user] "mutex" applications

2012-06-06 Thread nando
I'd like to suggest a form property called 'Singleton' when _new or _init is called (whichever creates the object) then it will not create a second and only return the first instance of it. Somewhat like a module. -- Original Message --- From: Benoît Minisini To: mailing list fo

Re: [Gambas-user] mysql float behaviour

2012-06-27 Thread nando
Primary keys are supposed to be unique unrelated to the actual data such as an INT with auto increment so there will never, ever be duplicates. If you use actual data (like a name) you CAN get duplicates and you are breaking the design theory. If you think you'll never get a duplicate, you will.

Re: [Gambas-user] VB to Gambas conversion question

2012-07-28 Thread nando
Not a cast It is Forced Double at compile time. 0 is usually interpreted when compiled as 0 (integer) 0.0 would be interpreted as non-integer 0# same thing but forces the representation as double. Reason behind doing this: if you have a double array t#(0..25) when you do t#(I) = 0 The zero co

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread nando
I'd say, if a number has been inputted and it's in the range -90 ... + 90 then it is a valid long. No more testing required. Period!!! If you multiply it by 6 zero's then it could be -90,000,000 ... +90,000,000 and you're defeating the whole thing. What you're doing is pointless. for this snippet.

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread nando
That's perfectly fine. Let me offer this plan of attack. Test if it is between -90 and +90 multiply by 1,000,000 into an INTEGER which chops all decimal digits to the right of the decimal point. then if you need float, divide by 1,000,000. But if you do that , don't be surprised for digits farther

Re: [Gambas-user] Unending cycle "For...Next" with variable As Byte

2012-10-02 Thread nando
When using Byte data type The loop iteration when j=255 is 255 + 1 = 0 Thus, the end condition of j>255 can never happen It is an endless loop. This 'problem' is correct operation for the datatype used. This issue arises always at the boundary of the datatype when math takes it beyond the possibl

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-11 Thread nando
Is this translatable ? X = 7 PRINT "You have " & X & If(X <> 1, "messages", "message") & " waiting." -- Original Message --- From: Caveat To: gambas-user@lists.sourceforge.net Sent: Wed, 10 Oct 2012 11:57:15 +0200 Subject: Re: [Gambas-user] Example to IIF: what is meant here >

Re: [Gambas-user] Array slicing - how is it done in Gambas?

2012-10-11 Thread nando
An alternate consideration is to create a dynamic object array and .add the myString[] elements you want. You'll end up with an array of pointers to the original string text. No copying of data, just pointers. I've done this in the past. Works very nice. -- Original Message --- Fr

Re: [Gambas-user] text files

2008-08-26 Thread nando
I use WRITE a lot and was confused at the beginning. There are two different methods... WRITE #hfile, "Stuff"'This writes 7 bytes to file <2 Byte length> + 'Stuff' WRITE #hfile, "Stuff",5 'This writes 5 bytes to file 'Stuff' with nothing extra. If you do not have the length, then the 2 byte

Re: [Gambas-user] Multi threaded apps

2008-09-05 Thread nando
I think multi-threaded would be wonderful and groundbreaking, but much work. Hypothetical example: PUBLIC SUB Button1_Click() NEW THREAD (Low Priority) DIM x AS INTEGER PRINT Button1.Thread 'this indicates which thread it is (1,2,3,4...) 'because clicking the b

Re: [Gambas-user] How to lock a file

2008-09-25 Thread nando
Can you tell why you have to lock it.. for what reason? -- Original Message --- From: Almanova Sistemi <[EMAIL PROTECTED]> To: mailing list for gambas users Sent: Wed, 24 Sep 2008 15:40:53 +0200 Subject: [Gambas-user] How to lock a file > Hi, > > I have a problem with LOCK > >

Re: [Gambas-user] How to lock a file

2008-10-07 Thread nando
In some applications, I create a folder as a lock. The existance of the folder indicates 'locked' It works very well and is used through Samba to share the lock on both the linux and windows side. -Fernando -- Original Message --- From: Benoit Minisini <[EMAIL PROTECTED]> To: mail

Re: [Gambas-user] How to lock a file

2008-10-07 Thread nando
assenbuch" FOR READ AS #dtnr > > and so on. While I am writing this email, I find that this has one big > drawback: If the lock file was made by someone else and that app > crashed, my program will wait forever for the lockfile to disappear. So > one should add a counter, e. g. 5 seconds,

Re: [Gambas-user] Binary compare of files?

2008-10-18 Thread nando
You want to use the code below, but use a large block size like 8192 or 32768. It doesn't have to be a perfect binary size. I suggest not to use SHA or MD5 because if you're reading in the files to compute SHA or MD5, you might as well forget wasting the time to compute and simply compare the str

Re: [Gambas-user] Binary compare of files?

2008-10-20 Thread nando
s" Sent: Sun, 19 Oct 2008 19:40:45 +0300 Subject: Re: [Gambas-user] Binary compare of files? > On Sun, Oct 19, 2008 at 7:02 AM, nando <[EMAIL PROTECTED]> wrote: > > > You want to use the code below, > > Hi nando, > > Ok what code you mean? > > > but u

Re: [Gambas-user] sending command to stdin

2008-10-20 Thread nando
Seems to me you want to use -s -i options with Fs then your gambas will send commands using TCP port 9800. -- Original Message --- From: "Joshua Higgins" <[EMAIL PROTECTED]> To: "mailing list for gambas users" Sent: Sun, 19 Oct 2008 11:15:33 +0100 Subject: [Gambas-user] sending c

Re: [Gambas-user] sending command to stdin

2008-10-20 Thread nando
t; FOR INPUT OUTPUT. Is it possible to read output over TCP? > > On Mon, Oct 20, 2008 at 4:50 PM, nando <[EMAIL PROTECTED]> wrote: > > > Seems to me you want to use -s -i options with Fs > > then your gambas will send commands using TCP port 9800. > > > >

Re: [Gambas-user] Emulating wizard Back/Next navigation

2008-12-11 Thread nando
Perhaps the following ideas... Every step in the wizard has an associated form for whatever it does for that step. Every form has a SUB for 'backwards' and 'forwards so that when NEXT is clicked, the forwards code runs, which is whatever is required for moving to the next form (ie: perform work, v

Re: [Gambas-user] Emulating wizard Back/Next navigation

2008-12-11 Thread nando
= -1 THEN ArrNav.Add(me) > >> > >> this makes reverse navigation possible by indexing the array or a > >> similar method. However, I am not able to work out all the bugs > >> resulting from this because it gets crazy when you try to move back, > >> the

Re: [Gambas-user] Emulating wizard Back/Next navigation

2008-12-12 Thread nando
leaves a footprint in > >>>>> this object array > >>>>> for instance, the form's open() event would have something like this > >>>>> > >>>>> IF ArrNav.find(me) = -1 THEN ArrNav.Add(me) > >>>>> > >>

Re: [Gambas-user] Hex string to float

2008-12-12 Thread nando
Two Questions: 1) Is the HEX you show below the HEX representation of 4B of a IEEE 4B Float? 2) How do you get these values? (read in from file? something else?) -Fernando -- Original Message --- From: "Ron_1st" To: gambas-user@lists.sourceforge.net Sent: Fri, 12 Dec 2008 19:42:0

Re: [Gambas-user] Hex string to float

2008-12-13 Thread nando
users Sent: Sat, 13 Dec 2008 13:28:33 +0100 Subject: Re: [Gambas-user] Hex string to float > nando schreef: > > Two Questions: > > 1) Is the HEX you show below the HEX representation of 4B of a IEEE 4B > > Float? > > 2) How do you get these values? (read in from file? som

Re: [Gambas-user] Hex string to float

2008-12-13 Thread nando
I'm sorry, but I cannot see this as correct. Saving a 4 byte value in integer format then reading in the same 4 byte value and place it in an float variable performs no conversion. Conversion is needed due to how we want to interpret the type of data. -- Original Message --- From

Re: [Gambas-user] Hex string to float

2008-12-14 Thread nando
ks, -Fernando -- Original Message --- From: Doriano Blengino To: nand...@nothingsimple.com, mailing list for gambas users Sent: Sat, 13 Dec 2008 20:05:54 +0100 Subject: Re: [Gambas-user] Hex string to float > nando ha scritto: > > I'm sorry, but I cannot see this as c

Re: [Gambas-user] Hex string to float

2008-12-14 Thread nando
brilliant! -- Original Message --- From: Benoit Minisini To: nand...@nothingsimple.com, mailing list for gambas users Sent: Sun, 14 Dec 2008 22:28:35 +0100 Subject: Re: [Gambas-user] Hex string to float > On dimanche 14 décembre 2008, nando wrote: > > My apologies t

Re: [Gambas-user] URL encoding "%20"

2008-12-30 Thread nando
This is what I use. It simply replaces all %?? hex values with the correct char and not just %20 with char$(32). FUNCTION urlencode(s AS String) AS String DIM p AS Integer 'position in string for % DIM h1 AS Integer 'the hex 2 digits, separately DIM h2 AS Integer REPEAT p = Instr(s,"

Re: [Gambas-user] URL encoding "%20"

2008-12-31 Thread nando
@lists.sourceforge.net Sent: Wed, 31 Dec 2008 09:14:21 -0800 (PST) Subject: Re: [Gambas-user] URL encoding "%20" > @Rob: Yes you are right. > @Benoit: Thanks > @Doriano: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm > @Nando: All the samples does not only %20 ;) > >

Re: [Gambas-user] Ask About POS Programming using Gambas

2009-01-09 Thread nando
Here is a suggestion and is what I do: (I use ver 1.17) Make a TIMER which is only for printing to the printer. It is set for 1 second and all it does is try to print chars to the printer. When an error condition comes up, it won't print until the next second. Works ok for me. I have a global St

Re: [Gambas-user] Minor bug with READ & WRITE commands?

2009-01-16 Thread nando
Benoit, Question regarding the line: > > WRITE #pResult + (ii * 8), .x does WRITE see it casted as variant or int ? -Fernando -- Original Message --- From: Benoit Minisini To: mailing list for gambas users Sent: Fri, 16 Jan 2009 03:50:16 +0100 Subject: Re: [Gambas-user] Minor bu

Re: [Gambas-user] Gambas is slower than Python??

2009-01-18 Thread nando
After reading all the comments about speed, optimization, etc, do not forget that an optimizing compiler will absolutely poduce faster execution time: Since this code reads no data, saves no data and doesn't print any calculated data, then why even perform GetSubstring when nobody cares about what

<    1   2   3   >