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

2009-04-15 Thread jbskaggs
I am not saying goto isnt needed at all- just that to do what he is doing it isn't. Furthermore too many goto's create spaghetti code which becomes really hard to follow. :) But I do get what your saying and I have used goto's the same way- though not in a while. For me it was when I began to

Re: [Gambas-user] handling database nulls

2009-04-15 Thread Stephen Bungay
OK, you have nulls and need values... you could use COALESCE... SELECT COALESCE(FieldName,0) AS FieldName FROM TableName; This will result in any NULL values being returned as zeros. Hope this helps you out. Steve. nando wrote: > What about testing if it's null first as in... > > IF IsN

Re: [Gambas-user] binary numeral system

2009-04-15 Thread Simonart Dominique
vlahonick vlahonick a écrit : > > hello all :D > > i am trying to create a program that calculates a number from the binary > numeral system and gives a result > > example of what the program will do : > > we have the number (at binary numeral system) 10011 > > so to have result we have to do

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

Re: [Gambas-user] open office text document

2009-04-15 Thread jbskaggs
Okay I went to Openoffice and I created a file and added some text altered the text size, formatting, etc and saved as html. Openoffice gives warning about losing some formating I ignore that and save. Then in Gambas2 I have a form with Textedit1 and I add: textedit1.text=file.load("filename.ht

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

2009-04-15 Thread jbskaggs
That would be really easy in Gambas! Becuase Gambas is object oriented goto's aren't needed. Let me give you a step by step how to do one screen and you can then change it or redo it how you like. step 1: create a form with a textbox, a picture box, and three buttons. Put your reading select

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

2009-04-15 Thread Marc Carson
I want to make a short adventure game that lets users read text and look at an image that explains where they are in the story, and then lets them make a decision like, 1) get in the car or 2) run and call the police. These choices then branch into other choices, and at many points the player m

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

[Gambas-user] (pas de sujet)

2009-04-15 Thread CROZET Georges
-- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com

Re: [Gambas-user] open office text document

2009-04-15 Thread juelin
dear JB SKaggs, thank you for your reply. Now i have convert the textdocument (odt) to html. then I read the htmlfile and insert it to TEXTEDIT object. But I see only the HTML-Text (with tags) What must I do, that I see only the text? kind regards Jürgen jbskaggs wrote: > > I convert odt to HTM

Re: [Gambas-user] handling database nulls

2009-04-15 Thread Jeff
On Wed, 2009-04-15 at 16:19 +0800, Werner wrote: > Bruce wrote: > > This has sort of been asked before. However, the answers I have found > > haven't > > helped. > > > > My database has a LOT of integer fields, arranged into sets of fieldwork > > results. The majority of them contain nulls, qui

[Gambas-user] Bug or intended pointer behavior? (in Gambas3)

2009-04-15 Thread Jussi Lahtinen
Hi! I have code like this; Dim Points As New POINT[] Dim pResult As Pointer some initialization of variable Points pResult = Alloc(8, 10) functionX(pResult) Class POINT: Public x As Short Public y As Short This way code works fine. But way this fails? functionX(Points.Data)

Re: [Gambas-user] handling database nulls

2009-04-15 Thread Bruce
On Wednesday 15 April 2009 18:45:56 Werner wrote: > Werner wrote: > > Bruce wrote: > >> This has sort of been asked before. However, the answers I have found > >> haven't helped. > >> > >> My database has a LOT of integer fields, arranged into sets of fieldwork > >> results. The majority of them c

Re: [Gambas-user] handling database nulls

2009-04-15 Thread Werner
Werner wrote: > Bruce wrote: > >> This has sort of been asked before. However, the answers I have found >> haven't >> helped. >> >> My database has a LOT of integer fields, arranged into sets of fieldwork >> results. The majority of them contain nulls, quite validly as the data for >> a >>

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 > > databrowser1.filter ="clientcode=" & uno > > > Bes

Re: [Gambas-user] handling database nulls

2009-04-15 Thread Werner
Bruce wrote: > This has sort of been asked before. However, the answers I have found haven't > helped. > > My database has a LOT of integer fields, arranged into sets of fieldwork > results. The majority of them contain nulls, quite validly as the data for a > particular set may not have been e

[Gambas-user] handling database nulls

2009-04-15 Thread Bruce
This has sort of been asked before. However, the answers I have found haven't helped. My database has a LOT of integer fields, arranged into sets of fieldwork results. The majority of them contain nulls, quite validly as the data for a particular set may not have been entered or even collected