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

2009-12-16 Thread Jean-Yves F. Barbier
Ricardo Díaz Martín a écrit :
 Hi to all,
 
 I'm use gambas to write ERP applications. At the first, I got the same
 problem but I decided to use long integer to save currency values. First
 rigth two digits are always showed to users as decimal values.
 
 I'm rewrited all my apps from windows to gambas and they are working now
 with no problems in customers servers.
 
 I allways use a function to show values in controls in app's forms that
 convert database fields values showed in textboxes whose name started int
 dbcur (p.e. dbcurVAT) to value div 100 and works with no problems. I use
 allways the same function to write forms data to database and make the
 reverse proccess.

Hooo, thanks for the ad.

 Its simple and works

Sounds exactly like the commercial about women thin down cream we've
got on tv for months (it works!) (sorry, I couldn't resist:)

So you're truncating everything to 2 decimals, but as I said VAT (and as
a matter of fact almost all french taxes) is *legally* up to 4 decimals;
actually only 2 of them are used, but nothing's saying that tomorrow
is won't be 3 or 4 really used (especially on those times where our
gov morons (pleonasm) are desesperatly looking for money.)

BTW, how do you truncate 19.99657? Down to 19.99 or up to 20.00?
In my family's company a cent error is worth €100,000 fine...

Other PB: most of results could be predictable (as of Nb of decimals),
but some can't (ie: 92.95x1.196=111.1682 OR 145x1.196=173.42),
maths says decimals should be dN1+dN2=5 but in these cases we only have
4 and 2 because of non-significant right zeroes, so you can't obviously
truncate by adding the comma counting 5 from the right.
One of the most used manner to get a selling price is to use a coefficient
which has many decimals (usually a real), how do you determine where to
put the comma in the resultant number??

I see the possibilities, but AFAIK this is a full processor to write
based on a complex numbers model, not to mention error possibilities 
have a tremendous cataclysmic potential in a matter where tax 
administration will be more than happy to chop your head and piss 
on your brain (yeah, they're like that here: when they come it is 
not to search, it is to find; no matter if has real justification or not.)

But may be I'm totally mistaking: I always have had PBs with simple
things.

JY
-- 
God is real, unless declared integer.

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-15 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...
 while only 2% of them want to use financial capabilities. So, that 2% 
 must live with a language not very suitable for accounting. Use long 
 integers, divide them, use format$()... is the reply from Benoit. Does 
 someone remember the Cobol? With a simple declaration picture 99. 
 it created a datatype and managed all the roundings and conversions on 
 that datatype; this was the power of that language. I don't say that 

Don't burry Cobol too fast: for banking *only*, this year will be around
5 milliards Cobol written lines (progression is an avg of 14% per year).

This kinda feature was also stollen from Cobol to be used in dBase, 
which was a great boost for DBs into programming world.

 gambas should implement this, but it would not hurt... it is a matter of 
 choice; I understand that this kind of things is difficult to implement 
 (or, who knows... with OO programming... but the really hard part is the 
 mixing of different types in the same expression).

I totally agree: this also would make the difference between a nice GUI
maker and a mature graphical language.
That's what I was trying to explain (with no such fortune though.)

 The most important application I've written with gambas is something 
 similar to a financial one. I faced problems with gridviews, tableviews, 

Yeah: THIS is why I don't wanna store other things than decimal(n,n);
furthermore, the more you have transformations the less chances you 
have to avoid bugs (especially sneaky ones).

 formats, roundings... all the things we are speaking about just now, and 
 they are not yet fully solved. I think that the way you describe is a 
 hard work, even if it is the only possible at the moment.

I totally Dorianonize :D

JY
-- 
Law of Probable Dispersal:
Whatever it is that hits the fan will not be evenly distributed.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-15 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
 Don't burry Cobol too fast: for banking *only*, this year will be around
 5 milliards Cobol written lines (progression is an avg of 14% per year).
   
 This is a proof that well designed things get a long life. Ok, cobol was 
 invented exactly for that purpose - sadness is that nobody else seem to 
 care much about those good things. And money is the gas (citation from a 
 popular rock song :-)) of the world...

This isn't really true: part of my family owns a company that sell pastry
products (additives etc), their ERP run under UNIX and VT100 consoles
and is entirely written in Cobol.
Many mid to large companies use Cobol, and have problems to find programmers
interested into this language - so there are good days left for those who care.

ADA is also growing because of its very specialized variable definitions
possibilities.

...
 You was more lucky than me, because you was replied perhaps in gambas 
 4; when was my turn to ask, Benoit replied I will not implement 
 currency type in gambas. Stop. What an irony... someone who hates money 
 and financial programs (me) has to be knocked down for a request about 
 currency...

I don't like it either, but there are places to take with good programs.

 But on the side of the possible implementation in gambas, it is a really 
 hard work. I thought a little about the question, not necessarily to 
 propose changes in gambas, but to solve the problems in my application. 
 A new class, which does rounding and formatting could work. Something 
 like dim subtotal as new currency(4,3) would instantiate a variable 
 with three decimals, stored as a long integer. subtotal.picture would 
 return a string representation, subtotal.picture(12) would return a 
 space-leaded string of 12 characters, with the formatted number aligned 
 to the right. subtotal.multiply() would multiply numbers, and so on. 
 Other methods would be required to interface to databases.
 This is the OO way to implement what nando suggested. The problem is 
 that calculi would be no more expressed in the usual, plain way, but in 
 an unnatural way: totalinvoice=amount+vat would turn in 
 totalinvoice.set(amount, vat). After the first look, this could be 
 something one can live with. But overloadable operators would be very 
 appreciated to improve readability and, if impossible, compiler macro at 
 least would help. You can walk around the problem as much as you want, 
 and you finish with forcing a language to do things it never was planned 
 to do. The same as complex numbers in C - you can use them, but what a 
 bore! And, in fact, python supports complex numbers natively.

This is even more complicated - ie: fr law say that precision of VAT rates
is 4 decimals, and as I said before, some items can be invoiced with a
large number of decimals.
For VAT, more than 2 decimals had never been used but could be tomorrow;
so this is an entire int2decimal processor to write (as you wrote, no more
than 2 members to multiply because of that:(

 I must experiment a little with this idea, but I suspect that new 
 classes for every textual gui element would be needed, and it is this 
 part which scares me. I wrote some new components for this, and they 
 work, but they have some quirks I don't understand well. And... I really 
 hate accounting programs...
 
 Uhm... I just readed back the mail about the calculi part. The 
 picturednumber class could evaluate a string... so 
 totalinvoice=amount+vat could be written as 
 totalinvoice.setTo(amount+vat)... double work, but double result... 
 the only problem is that the compiler can not check for the correctness 
 of the expression. Problems again.

I lost too much time with things like that and now strongly consider
to interface all calculation to Python and only keep GB as a GUI.

This shouldn't add that many things to the system: as of Linux, Python 
is a std install, as of Debian, this will only require a few packages 
to add (AND it'll solve docs templates, PDF generation and some other 
dead-ends)

Regards,
JY
-- 
Don't get even -- get odd!

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-15 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...
   
 A strongness inherited from pascal... I gave a look to many, countless 

hmm, I don't think Pascal can define vars as temperature[-10, +50]

 languages, and only few met my own requirements - strong typization, 
 good compiler checks, overloading and, of course!, OO model. One of 
 these was Ada. But I rejected all C- and Java- flavoured. Irony again... 
 C language is the one I use most...

Yes this is the PB, each one has pros  cons.

...
 I lost too much time with things like that and now strongly consider
 to interface all calculation to Python and only keep GB as a GUI.
   
 Betrayer! :-)))

No, this meets what you said above: no language is perfect, so the only
solution is to take whatever you want in some of them (well, not some, 2)

And I'm not a language integrist: I pick what fits my needs.

 Why not interface to cobol directly, then? I don't think your way is 
 viable - it would be even more forcing a language to do things it never 
 was planned for. I think you intend to call /usr/lib/libpython2.xx, 
 perhaps through some wrapper class; interesting... may be this could 
 solve the expressions issue...

I'm far from a specialist, as a matter of fact I didn't used OO before
(only C and ASM a looong time ago) so the only way I see to make a mix
is to call external subroutines through SHELL or EXEC; but if you know
other ways, I'm in.

I don't wanna end up with terrible hacks, nor spend more time to develop
something that already exists in another language: I need it to run the way 
I want in an easy (and maintenable) way - without headaches...

Regards
JY
-- 
You are here:
***
***
 *
  ***
   *
***
 *

 But you're not all there.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 you have Laurux at http://laurux.fr/
 
 but the code is not perfect has it was on the start a code learning
 programme.. but at the end it's a true accounting program... in french
 (Gb2)

BTW, do you plan to have an equivalent of postgresql or python decimal(n,n)
into GB3?
It would be *very* interesting (otherwise you have to filter every line 
through Format$)

JY
-- 
My rackets are run on strictly American lines, and they're going to
stay that way.
-- Al Capone

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Fabien Bodard a écrit :
 you have Laurux at http://laurux.fr/

 but the code is not perfect has it was on the start a code learning
 programme.. but at the end it's a true accounting program... in french
 (Gb2)
 BTW, do you plan to have an equivalent of postgresql or python decimal(n,n)
 into GB3?
 It would be *very* interesting (otherwise you have to filter every line
 through Format$)

 JY

 
 You mean a fixed-point decimal datatype? Or a currency datatype?

A fixed-point decimal
 
 It cannot be done in Gambas 3. So, in Gambas 4 ?

Hu?
That's too bad because it is needed to ease accounting purposes.

-- 
Antique fairy tale: Little Red Riding Hood.
Modern fairy tale: Oswald, acting alone, shot Kennedy.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Kari Laine a écrit :
 Hi,
 
 thanks
 
 On Mon, Dec 14, 2009 at 6:03 PM, Fabien Bodard gambas...@gmail.com wrote:
 you have Laurux at http://laurux.fr/

 but the code is not perfect has it was on the start a code learning
 programme.. but at the end it's a true accounting program... in french
 (Gb2)

 
 I don't read a single word French so I have to pass. It would be too
 difficult for me to adapt.

You can take a look at sql-ledger that implements a double-entry
accounting with many accounting plans (but it is written in perl...)

-- 
A man without a woman is like a fish without gills.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Benoît Minisini a écrit :
 Fabien Bodard a écrit :
 you have Laurux at http://laurux.fr/

 but the code is not perfect has it was on the start a code learning
 programme.. but at the end it's a true accounting program... in french
 (Gb2)
 BTW, do you plan to have an equivalent of postgresql or python
 decimal(n,n) into GB3?
 It would be *very* interesting (otherwise you have to filter every line
 through Format$)

 JY
 You mean a fixed-point decimal datatype? Or a currency datatype?
 A fixed-point decimal

 It cannot be done in Gambas 3. So, in Gambas 4 ?
 Hu?
 That's too bad because it is needed to ease accounting purposes.

 
 Why not storing currencies in cents, or fraction of cents, with a Long 
 datatype?
 
No, this is the best way to make mistakes (ie: invoice hardware with
2 decimals, but invoice telephone seconds with 8  connections w/ 3 or 4
on the same invoice, oeuf corse).

Format$ is not very useful because of conversions it involves.

Using integer arithmetics is muuuch tooo slooow.

So the less worse is still Format$.

-- 
Mieux vaut tard que jamais!
[ Better late than never ]

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
...
 I think you are mixing a lot of different things:
 
 - When storing a amount of money in memory, you store it in a Long integer in 
 1/10th of cents. For example, storing 1234,56€ will be stored as 123456

I'm gonna test that, but it implies more load of the DB server side to
convert from one format to the other.

 - When displaying an amount of money, you use Format$(), or your own function.
 
 - When getting an amount of money from the user, you have to convert a string 
 into an amount of 1/10th of cents.
 
 - When getting an amount of money from the outside, or exporting an amount of 
 money to the outside, you must use an standard exchange format based on a 
 string.

This is not acceptable: DB must be able to directly process numbers, 
not to loose 95% of the time to convert a string to a number and
vice versa (many of my process aren't done by GB but into stored 
procedures)

 So I don't see any problem with that. Why are you talking about telephone 
 seconds? We are talking about money, aren't we? Or there is something I 
 didn't 
 understand?

Yep, but some amounts can have many more decimals than others (in telephony,
seconds are usually invoiced with @ least 6 decimals and sometimes 8), so 
mixing that with other number of decimals isn't easy.

This is why definable decimals numbers are so important.

-- 
Q:  How do you keep a moron in suspense?

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Minimum Size of a Form

2009-12-11 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 in gambas 2 the minimum size of a form is set by the size given at the 
 desing...

it's only true if it is a fixed sized, otherwise you can shrink it as you 
want...

-- 
It's the Magic that counts.
-- Larry Wall on Perl's apparent ugliness

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Minimum Size of a Form

2009-12-11 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 ok Error from mine :) ... but for one part the min size is fixed at
 the desing but only for windows with ToolBox option at true

zarb, it would be a good idea to also have min X,Y (not especially linked to
a toolbar)

 And in gambas3 with windows.type at Utility

-- 
If you live in New York, even if you're Catholic, you're Jewish.
-- Lenny Bruce

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] SVN

2009-12-11 Thread Jean-Yves F. Barbier
Norarg a écrit :

PLS avoid cross-posting: open a new post by adressing to 
gambas-user@lists.sourceforge.net

 I would like to try out newer releases of Gambas, fox. 3.0. I had some 
 problems with other releases in the past - in the end gambas did not 
 work at all. I have tried to figure it out, but did not found what I am 
 looking for: does a SVN substitute a stable version, or do they live 
 side by side? I assume, that a lot of lib's have to be changed.

usually SVN is for development:
gb2 SVN is bug fixing and adding new features, new stable versions comes
 from it when the developer decide it is good enough for release,
gb3 SVN is pure dev and change almost every day.

 I ask this, because I don't want to mess up the system - again :) 
 Meanwhile I am perfect in setting up Ubuntu from the ground... lol what 
 a heavy part ... but my internet-connection is that slow, I need two 
 days to download the newest lib's and changes from ubuntu after the 

well, if you're so slow forget about building gb: you'll need many dev
libs, and the total isn't light weight (the only reason would be to test
gb3, or because you absolutely need a gb2 fix or new feature.)

 ground installation. (And please don't tell me, get a faster 
 internet-connection, one do not get it on the country-side of argentina).

may be this could help you (depending on the budget you can|want engage)
http://www.tempestcom.com/services/satrbgan_plans.aspx

 thanks in advance,

Our friends from land where flying dragons comes from are very welcome :D

JY
-- 
Christianity has not been tried and found wanting; it has been found
difficult and not tried.
-- G. K. Chesterton

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Minimum Size of a Form

2009-12-11 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 ok Error from mine :) ... but for one part the min size is fixed at
 the desing but only for windows with ToolBox option at true

O_o: I checked Toolbox and my CPU climbed up to 100% (gbx2), starting 
the application but not showing anything!?

-- 
Trouble always comes at the wrong time.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2009-12-05 Thread Jean-Yves F. Barbier
Ron a écrit :
...   
 runned valgrind tool for a while.
 
 And I got a rather strange winner, I got 3 milion calls of _add_char in
 gb_error.c
 
 Some debug code hanging around or something like that?
 
 See attached valgrind file.

May be that's a source for what I noticed (Debian sid, XP2600+, 1.5GB RAM):
if I start a GB project while there a CPU (or I/O) hungry process running,
half the time GB says its running, but no window shows on screen.

JY
-- 
In which level of metalanguage are you now speaking?

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Remotly Debug

2009-12-03 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :

 
 Your new threads are never attached to another non-related thread when I 
 receive them. Why? I use KMail: do other people see the same thing than me?

I use idedove (thunderbird) and see them ok (however he's cross-posting...)

-- 
coitus interruptus, n:
A jerky movement following the words (by either sex partner)
I want to have your child.

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Xview selection cursor info

2009-12-01 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 si :
 
 PUBLIC SUB OBS_Open()
 
 ' IF IsNull($sfrmNouveau) THEN Error.Raise(Vous devez définir un
 formulaire Nouveau)
 ' IF IsNull($sModifier) THEN Error.Raise(Vous devez définir un
 formulaire Modifier)
 IF IsNull($hGrid.DataField) THEN ERROR.Raise(Vous devez definir
 le champ identificateur)
$hGrid.Refresh
$hGrid.Grid.Row = 0
 END
 
 
 you need to modify FList...

Crap: I put it into RichDataGrid instead of here; I still have a great
deal to learn!

Thanks Fabien

-- 
Real computer scientists don't comment their code.  The identifiers are
so long they can't afford the disk space.

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Xview selection cursor info

2009-11-30 Thread Jean-Yves F. Barbier
Hi,

On a tableview, I need:
* Make the selection cursor to appear on 1st line at opening, 
* Selection cursor's position (row) into the grid,
* 1st  last rows visible into the grid

I how could I get that?

-- 
So, is the glass half empty, half full, or just twice as
large as it needs to be?

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] pb loading an picture into a string

2009-11-26 Thread Jean-Yves F. Barbier
Hi,

Here is a (very big) PB:

...
  ' Get picture /path/name.ext
  INfile = FileChooser1.SelectedPath
  
  FileSize = Stat(FileChooser1.SelectedPath).Size
  
  ' Read file into a string
  INstream = OPEN INfile FOR INPUT 
'  READ #INstream, INstring, Lof(INstream)  ' NA: Returns 238 bytes
  READ #INstream, INstring, FileSize' Erk: same thing :(
  CLOSE #INstream
PRINT INstring length (Len, String.Len) =   Len(INstring)   -   
String.Len(INstring)

Returns 298 - 234 when I read a small picture.png file!??
How could I correctly read this image wothout any loss?

Purpose is to read it correctly, convert it to base64 and send it to a 
postgresql
procedure (and, of course, the opposite.)

JY
-- 
For a man to truly understand rejection, he must first be ignored by a cat.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] pb loading an picture into a string

2009-11-26 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...

Ok, I found what was wrong: as there is no conversion between a string
and a picture, I must write the string to a file and read it as a picture,
the string was written as of WRITE #INstream, OUTstring, String.Len(OUTstring)
 instead of: WRITE #INstream, OUTstring, Len(OUTstring)

Sorry for the noise.

JY
-- 
Love cannot be much younger than the lust for murder.
-- Sigmund Freud

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] RAD PB

2009-11-26 Thread Jean-Yves F. Barbier
Hi,

I've got something strange: when I try to move my cursor with
the mouse pointer it selects text between the current cursor
place and the place I selected (even after a restart of gambas RAD)

-- 
small, adj.:
Is it in yet?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] RAD PB

2009-11-26 Thread Jean-Yves F. Barbier
Jean-Yves F. Barbier a écrit :
 Hi,
 
 I've got something strange: when I try to move my cursor with
 the mouse pointer it selects text between the current cursor
 place and the place I selected (even after a restart of gambas RAD)

It has gone (?), sorry for the noise

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] pb loading an picture into a string

2009-11-26 Thread Jean-Yves F. Barbier
Charlie Reinl a écrit :
...
Thanks Charlie, I'll try it.

-- 
The world really isn't any worse.  It's just that the news coverage
is so much better.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] db retrieve

2009-11-26 Thread Jean-Yves F. Barbier
Hi,

How can I retrieve a field returned by a stored procedure?

SP:
CREATE OR REPLACE FUNCTION common.testbytea_sel(Pid OID) RETURNS TEXT AS $$ 
DECLARE
MyPic   BYTEA;
MyStringTEXT;
BEGIN
SELECT pic INTO MyPic FROM common.testbytea WHERE id = Pid;
MyString = encode(MyPic, 'base64');
RETURN MyString;
END;
$$ LANGUAGE PLPGSQL STRICT SECURITY DEFINER;

GB:
sqlQry = SELECT * FROM common.testbytea_sel(  RowNb  );
resQry = $DBConn.Exec(sqlQry)

PB: what resQry!??? shall I ask for?

-- 
Sorry, no fortune this time.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] db retrieve

2009-11-26 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
...
 
 You can access result fields by index too:
 
 resQry[0], reqQry[1], ...

Haaa this sounds very good too :)

-- 
Bringing your mate to a convention is like taking a game warden hunting.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] base64 encoding/decoding

2009-11-25 Thread Jean-Yves F. Barbier
Jean-Yves F. Barbier a écrit :
 Hi,
 
 I saw that gb.xml has base64 but there's no docs, does somebody 
 have written encoding/decoding routines for strings?

Forget it: I find a pure Gambas one 

-- 
After all, all he did was string together a lot of old, well-known quotations.
-- H. L. Mencken, on Shakespeare

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] problem with a file

2009-11-25 Thread Jean-Yves F. Barbier
Hi,

I read an .png file,
transform it into Base64, 
write it to a PG DB table through a stored procedure (as TEXT), 
and retrieve it.

My PB is: the original file length is 298 Bytes and my reading is 234
and I don't know why (whatever method I use instead od Base64, file's
always truncated.)

Here are the Hex readings:
ORIGINAL
   89 50 4E 47  0D 0A 1A 0A  00 00 00 0D  49 48 44 52  00 00 00 18  00 
00 00 18  08 06 00 00  .PNGIHDR
001C   00 E0 77 3D  F8 00 00 00  F1 49 44 41  54 48 89 B5  93 4B 0E C2  20 
14 45 0F  B5 89 13 E3  ..w=.IDATH...K.. .E.
0038   C0 44 07 BA  B5 2E 82 A5  B0 08 F6 67  34 0E 4C FD  E0 A4 D4 7E  A0 
3C 2B BD  23 E0 DD 77  .D.g4.L~.+.#..w
0054   EE A3 A4 B0  B0 94 C4 E4  4C E5 82 CD  DA 26 FB 27  0D 31 F0 2F  41 
C1 82 14  2C 09 1A 1D  L.'.1./A...,...
0070   CC 85 C7 42  7A 9B 7F E1  A1 90 22 07  70 32 CC 2F  72 4D DF 82  9B 
5B 94 13  86 76 ED 4C  ...Bz..p2./rM...[...v.L
008C   35 DF D3 14  7B D3 77 1B  63 00 A1 47  2D FE 06 A3  80 D0 64 C3  73 
89 27 1A  90 5B A3 80  5...{.w.c..G-.d.s.'..[..
00A8   D8 63 75 CF  25 9E 68 40  6E 15 00 4A  DB F5 D4 24  A1 C9 52 1E  CF 
F4 FF C1  2A 05 08 29  .cu@n..j...$..r.*..)
00C4   E1 29 81 DA  7F A2 97 D2  F6 98 24 0A  A5 B4 3D 01  4F F8 BE 41  0D 
DC 73 05  34 AC BA 1B  .)$...=.O..A..s.4...
00E0   00 70 55 DA  EE FF 25 2B  6D 0F C0 B5  DD 0F EA 05  B0 75 A6 3A  CF 
84 EF 80  0B F0 8E 05  .pU...%+mu.:
00FC   78 95 C0 46  1A D4 80 6F  C0 63 54 13  F4 AF 9C A9  9E 11 70 09  BC 
24 43 2C  A6 0F 34 AA  x..F...o.cT...p..$C,..4.
0118   60 57 32 C0  EB 38 00 00  00 00 49 45  4E 44 AE 42  60 82
  `W2..8IEND.B`.

RETRIEVED
   89 50 4E 47  0D 0A 1A 0A  00 00 00 0D  49 48 44 52  00 00 00 18  00 
00 00 18  08 06 00 00  .PNGIHDR
001C   00 E0 77 3D  F8 00 00 00  F1 49 44 41  54 48 89 B5  93 4B 0E C2  20 
14 45 0F  B5 89 13 E3  ..w=.IDATH...K.. .E.
0038   C0 44 07 BA  B5 2E 82 A5  B0 08 F6 67  34 0E 4C FD  E0 A4 D4 7E  A0 
3C 2B BD  23 E0 DD 77  .D.g4.L~.+.#..w
0054   EE A3 A4 B0  B0 94 C4 E4  4C E5 82 CD  DA 26 FB 27  0D 31 F0 2F  41 
C1 82 14  2C 09 1A 1D  L.'.1./A...,...
0070   CC 85 C7 42  7A 9B 7F E1  A1 90 22 07  70 32 CC 2F  72 4D DF 82  9B 
5B 94 13  86 76 ED 4C  ...Bz..p2./rM...[...v.L
008C   35 DF D3 14  7B D3 77 1B  63 00 A1 47  2D FE 06 A3  80 D0 64 C3  73 
89 27 1A  90 5B A3 80  5...{.w.c..G-.d.s.'..[..
00A8   D8 63 75 CF  25 9E 68 40  6E 15 00 4A  DB F5 D4 24  A1 C9 52 1E  CF 
F4 FF C1  2A 05 08 29  .cu@n..j...$..r.*..)
00C4   E1 29 81 DA  7F A2 97 D2  F6 98 24 0A  A5 B4 3D 01  4F F8 BE 41  0D 
DC 73 05  34 AC BA 1B  .)$...=.O..A..s.4...
00E0   00 70 55 DA  EE FF 25 2B  6D 0F  
  .pU...%+m.

Could somebody tell me why this happens?

JY
-- 
You will be dead within a year.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] problem with a file

2009-11-25 Thread Jean-Yves F. Barbier
Jean-Yves F. Barbier a écrit :
...
 Could somebody tell me why this happens?

I've the same problem with another file; so now I suspect the String 
to be utf-8 and to throw me out before the end of the conversion
because of an odd combination of bytes.

O_o SWELL: TextStr = Conv(TextStr, utf-8, ascii) returns a 
Bad string conversion...  (d° for Conv$)

What do I do now??

-- 
BOFH excuse #128:
Power Company having EMP problems with their reactor

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] problem with a file

2009-11-25 Thread Jean-Yves F. Barbier
Jean-Yves F. Barbier a écrit :
 Jean-Yves F. Barbier a écrit :
 ...
 Could somebody tell me why this happens?
 
 I've the same problem with another file; so now I suspect the String 
 to be utf-8 and to throw me out before the end of the conversion
 because of an odd combination of bytes.

A comparison between what's in DB and uuencode give the same result
except uuencode has 3 more chars: DB is ==  and uuencode is = 
(with a CR between 2nd and 3th =)

As = means a space, I may consider it is the same.

So PB is located in base64 to string, but nothing seems wrong in the
code.

Counting Base64 Bytes gives 400 in and 400 out, but output string
is 234 instead of 298.  Arrgh

-- 
I am ecstatic that some moron re-invented a 1995 windows fuckup.
-- Alan Cox

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] problem with a file

2009-11-25 Thread Jean-Yves F. Barbier
nospam.nospam.nos...@gmail.com a écrit :
 Jean-Yves F. Barbier wrote:
 
 Arrgh
 
 I wish I had a dollar for every time gambas has done that to me.
 
 Perhaps you might post the stored procedure.

why? The string sent is the same as the one retrieved.

My PB's not there: it is in the string processing, BUT the code's correct,
so I strongly suspect it is an UTF-8 issue (as there's no possibility to
read|convert into an ASCII string, so 2 bytes may be concatenated as one).

I double checked and it always occurs at the same place, it also happens with
other files, but the content of these files is normal...

-- 
  May I ask a question?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Hi,

How can I escape a picture in order to insert it into a BYTEA 
postgresql data field?

-- 
Cocaine: using tomorrow's energy today.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
richard terry a écrit :

No Richard, I can't do that for:

* I already have a connection, and I wanna keep connection number as low 
   as possible,

* I do things as they should be done, so not any direct user permission 
   on any DB schema/table/index/sequence/etc; So I can't insert anything
   directly,

* I already have a big trigger on this table (ON INSERT) and I don't
   wanna bloat it (and this wouldn't solve the PB.)

So I *really* need to send an escaped string to my procedure.

Regards

JY

 On Wednesday 25 November 2009 05:30:52 Jean-Yves F. Barbier wrote:
 Hi,

 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?

 Having mucked around with this interminably looking at different ways, the 
 solution is in the picture database sample file, but basically do something 
 like this and you won't need to manually escape anything. You would use a 
 different connection method like in the picture db not my function 
 (modDbconnect), I've commented this for  you
 
 Public Function Image_Save(ImagePath As String, Optional fk_Image As Integer 
 = 
 0) As Integer
   Dim newPicture As result
   Dim $Result As Result
   Dim img As Image
   Dim tempfile As String 
   Dim conn As Connection
  'get the connection to the backend
  conn = modDBConnect.Get_Connection()
 'connect to the table
   newPicture = conn.Create(all_images)
 'save the picture file to a tempory file
   img = Image.Load(ImagePath) 
   tempFile = Temp()  .png
   img.Save(tempFile)
 'save to the database
   If Not fk_image Then
 newPicture[image] = File.Load(tempFile)
 newPicture.Update()
 'don't worry about this I just needed the pk, perhaps there is an easier way
 $Result = modDBConnect.exec_query(Select currval('all_images_pk_seq') as 
 pk_image)
   End If 
   Return $Result!pk_image
 
 End
 
 Think that's ok, notify me if dosn't work, but follow the picture databas in 
 samples line by line.
-- 
A watched clock never boils.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture PS

2009-11-24 Thread Jean-Yves F. Barbier
richard terry a écrit :
... 
 Don't forget to commit your transaction
 
 
 sample table:
 
 CREATE TABLE all_images
 (
   pk serial NOT NULL,
   image bytea,
   deleted boolean,
   CONSTRAINT all_images_pkey PRIMARY KEY (pk)
 )
 WITH (
   OIDS=FALSE
 );
 ALTER TABLE all_images OWNER TO easygp;
 GRANT ALL ON TABLE all_images TO easygp;
 GRANT ALL ON TABLE all_images TO staff;
^^^
You like to live *very* dangerously...
 
 
 Note also with gambas. I've raised this with the list/devel/benoit and had no 
 replies but after much angst it seems that you can't address schema.table, ie
 you cannot do this:
 
  newPicture = conn.Create(myschema.all_images)

This is not acceptable, nor usable!

 I got tripped up for many many hours trying to figure out why these damn 
 things wouldn't save, even when I just put a table called images into 
 public, until I realised that throughout my db (of 350 odd tables scattered 
 over 28 schemas, I have several image tables in different schemas so gambas 
 was baulking without an error message when it got to the reference to image 
 as  table. (hence the temporary name I've provided you all_images as I've 
 not yet removed all the other tables due to my extensive use of views which 
 I'll have to laboriously correct!
 
 So in the end I've decided single table for all bytea data which I keep in 
 public and (touch wood) seems to work quickly and easily. apparently you can 
 store up to 1GIG in a bytea field but I suspect putting it in there could be 
 real slow. 

I've got quite a same DB.

Once again, this is not acceptable and a large flaw in design, not to
mention the lack of security.

 You can use client side lo_creat,  and lo_import  functionsto directly write 
 to blobs (different to bytea) in postgres as user (not the server side 
 functions) but though easy to do on the postgres command line, I've not 
 figured out how to do it in sql, and no-one on the postgresql novice list 
 seemed to  know either. 

You can do that if your procedure gain the SU permissions, which, once again,
is not acceptable (at all.)

 I spent probably 10 hours trawling the net to find a solution and though 
 millions of references to it the 'smart $$%%^ ers' all sound really 
 knowledgable by quoting the postgresl docs which in the end to idiots like 
 myself mean nothing, but no-one seems to be able to offer a practicel sql 
 solution. If you find out let me know.

I'm gonna ask the Pg ML; if there's no possibility I'll leave gambas and
return to Python.

 Hope this all helps.

Unfortunately not :(

Regards
JY
-- 
X-rated movies are all alike ... the only thing they leave to the
imagination is the plot.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture PS

2009-11-24 Thread Jean-Yves F. Barbier
richard terry a écrit :
...
 Note also with gambas. I've raised this with the list/devel/benoit and had no 
 replies 

Ducking is never a good answer...

-- 
The proof of the pudding is in the eating.
-- Miguel de Cervantes

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Hi,

 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?

 
 Normally, if the postgresql field datatype is BYTEA, the gb.db component will 
 see it as a blob.
 
 Let's suppose the field name is Picture. You will do:
 
 MyResult!Picture = File.Load(/path/to/picture/file)
 
 Is it what you need?

NO, I need the opposite:  
sqlQry = SELECT MyTable_ins(MyPicture);

where MyTable_ins(TEXT) is a stored PLPGSQL procedure that do
an indirect insert into myschema.mytable

-- 
Every journalist has a novel in him, which is an excellent place for it.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Charlie Reinl a écrit :
...
 http://www.ms-office-forum.net/forum/sitemap/index.php?t-243720.html
 
 - encode the binary file using base64 and store as TEXT
 - is using ADODB.Stream (are there something like that in gambas )

Thanks Charlie

-- 
Q:  What does it say on the bottom of Coke cans in North Dakota?
A:  Open other end.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Benoît Minisini a écrit :
 Hi,

 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?
 Normally, if the postgresql field datatype is BYTEA, the gb.db component
 will see it as a blob.

 Let's suppose the field name is Picture. You will do:

 MyResult!Picture = File.Load(/path/to/picture/file)

 Is it what you need?
 NO, I need the opposite:
 sqlQry = SELECT MyTable_ins(MyPicture);

 where MyTable_ins(TEXT) is a stored PLPGSQL procedure that do
 an indirect insert into myschema.mytable

 
 OK. So MyPicture must be a string including quoted binary data?
 
 Alas there is no public access to the internal driver function that quotes 
 binary data for a blob. Do you want me to add it in Gambas 3? Something like 
 DB.QuoteBlob()?
 
What would also be nice would be direct conversions (ie: from String
to Picture and reverse)

-- 
 Assume a virtue, if you have it not.  -William Shakespeare

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] base64 encoding/decoding

2009-11-24 Thread Jean-Yves F. Barbier
Hi,

I saw that gb.xml has base64 but there's no docs, does somebody 
have written encoding/decoding routines for strings?

-- 
Really??  What a coincidence, I'm shallow too!!

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] keep forms into a form

2009-11-23 Thread Jean-Yves F. Barbier
Hi,

Is there a manner to keep my forms into my main form? 
other than using a workspace that apparently force children 
to appear as tabs.
And to have them as icons (or anything else) into this main 
form when minimized?

JY
-- 
Every time you manage to close the door on Reality, it comes in through the
window.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] bug?

2009-11-19 Thread Jean-Yves F. Barbier
Ricardo Díaz Martín a écrit :
 Looks like all is ok. Maybe you can try writing Error.Clear() on before of
 TRY $DBConn.Open

it don't change anything: this time I stripped the DB name and it goes its
way to 1st reading and failed (result is unavailable)
 
 I'm not sure if problem is related with posgresql because I'm using mysql in
 my apps.

may be

-- 
Offer may end without notice.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] strange behaviour property visible

2009-11-17 Thread Jean-Yves F. Barbier
gb 2.17 debian sid
==

Hi,

I've got something strange: if I don't add a wait line between
a visible property and a call, it don't work at all:

PUBLIC SUB btnOk_Click()
  MDB.MyHost = txtbHost.Text
  MDB.MyDB = txtbDB.Text
  MDB.MyUsr = txtbLogin.Text
  MDB.MyPass = txtbPass.Text
  IF MDB.DBConnect() THEN 
lblWait.Visible = TRUE
WAIT 0.01   ' mandatory otherwise lblWait don't appear
MDB.Fill_DB_Tree()
lblWait.Visible = FALSE
ME.Close
  ENDIF 
END

-- 
Angels we have heard on High
Tell us to go out and Buy.
-- Tom Lehrer

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] strange behaviour property visible

2009-11-17 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
 It is not strange - it is simply normal.
 Screen refresh is done in the main loop (every graphical application 
 does so, even in other OSes), so you will not see screen changes when 
 your code is running an event handler. If you really want, you put a 
 WAIT (may be without parameters: in this case it only calls the main 
 loop, which updates the screen, with no added delay).

Thanks Doriano, I didn't understood the doc about that :)

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] wish

2009-11-17 Thread Jean-Yves F. Barbier
Hi,

It would be (very) nice to have the possibility to freely format text
in ValueBox for I/O (may be the same syntax as in DBase screens).

-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] bug?

2009-11-16 Thread Jean-Yves F. Barbier
Debian sid
gb 2.17
==

Hi,

I've got a module with public string  connection:

PUBLIC $DBConn AS NEW Connection
PUBLIC MyHost AS String
PUBLIC MyDB AS String
PUBLIC MyUsr AS String
PUBLIC MyPass AS String
'-
PUBLIC FUNCTION DBConnect() AS Boolean
PRINT MyDB  .  MyHost  .  MyUsr  :  MyPass
  WITH $DBConn
.Type = postgresql
.Host = MyHost
.Name = MyDB
.Port = 5432
.Login = MyUsr
.Password = MyPass
  END WITH 
  TRY $DBConn.Open
  IF ERROR THEN 
 Message.Error((Can't connect to DB)  \n\n  Error.Text)
RETURN FALSE
  ELSE 
RETURN TRUE
  ENDIF 
END

If I forget to fill MyHost  MyDB from the class that calls it, the 
function don't raise any error and returns TRUE (?)

How can that be?

JY
-- 
I don't care what star you're following, get that camel off my front lawn!
-- Heard in Bethlehem

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
 
 About recover any kind [...] from into a loop, I don't understand. 
 Perhaps you want to scan all the controls residing on a form - there is 
 the Controls[] property for that. Or you want to stream out all the 

Yes you got it Doriano! :D

 properties of an object, perhaps to a file? This is possible too, I 
 think - look at the Object class (or the Class class, can't remember), 
 which has method to inspect... objects.

Thanks

-- 
You will gain money by a fattening action.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 the same  but with a collection to share the result

yes that is my (new) question
 
 2009/11/14 Doriano Blengino doriano.bleng...@fastwebnet.it:
 Jean-Yves F. Barbier ha scritto:
 Doriano Blengino a écrit :
 

 About recover any kind [...] from into a loop, I don't understand.
 Perhaps you want to scan all the controls residing on a form - there is
 the Controls[] property for that. Or you want to stream out all the


 I am suspecting you are transferring data from and to a database...
 don't know why  I suspect...

you're right :)


under python, I used a very usefull class: storage; it gives some'
like that:
jytest1g= Storage(view=jytest1g, ovldim=(900,400), fld=[])
jytest1g.fld.append(Storage(type='ST', name='name', lenmax=65,   lensup=1, 
nn=True))
jytest1g.fld.append(Storage(type='ST', name='note', lenmax=128,  lensup=1, 
nn=True))

I wanna make the same thing to recover DB user's rights (per schemas, tables
and per fields), but I don't see how to make it under gambas

-- 
Q:  What do you do if an Irishman throws a pin at you?
A:  Run like hell, he's got a grenade in his mouth!!

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 the same  but with a collection to share the result

the access is also *very* easy:

 o = Storage(a=1)
 o.a
1
 o['a']
1
 o.a = 2
 o['a']
2
 del o.a
 o.a
None


-- 
Sensible and responsible women do not want to vote.
-- Grover Cleveland, 1905

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...
 You can do the same in gambas, using Object[] or Collection, and 
 creating a class for every kind of record.

I found coll[key]=value and I think that could do the trick,
I'm gonna test this tonite

 Unfortunately I don't know them enough to explain to you. But I can 
 spend two words about python and ruby, and in general these agile 
 languages. They are very handy, but also two problems arise. The first 
 is that, in your example, if you write o.a, where o and a are two 
 identifiers (because they are not surrounded by apices or quotes), they 
 don't resolve to two fixed address in memory - so they are no more 
 identifiers. This wastes a lot of CPU cycles, because the interpreter 
 must scan all pool of objects to find them. In other words, python is 
 *slow*. Good to explain concepts, but in practical, heavy applications 

Yeah, I agree; it is easy to see that on my old C2.4GHz

 it is a pain. We can compare two programming IDEs: gambas and some other 
 written in python (Boa? or others I can't remember...). On my machine, 
 they simply suck - when gambas is quick and responsive. And think that 
 an IDE is not a particulary heavy application.
 
 The second problem is that, I think, they don't check enough at compile 
 time (because they can't). For me, coming from pascal, this is a big 
 issue. Most of the time the compiler (pascal, or C) catches all my 
 typing errors, and the rest is ok. But if the compiler does not catch 

well, that doesn't prevent mallocs missing...

 errors, you are never sure that your code is ok. I am already critic 
 with some constructs that gambas does not check enough (for me) - so I 
 really can't stand with less rigid languages.

there should be 2 modes: regular (work as of now, useful when you just have
one proc to test, even if syntax doesn't match for similar things) and strict
(check every detail).

 Just a simple opinion. I think that if you investigate well your needs, 
 you will find a clean and effective way to solve with gambas.

this is the problem: I learn it while making my pgm.

-- 
Good news.  Ten weeks from Friday will be a pretty good day.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...
 But back to your problem: why you talked about the Tag property? It 
 seems to me that that does not gets in so much?

because I've got some forms that display data coming from multiple tables,
so using Tag property looks like the easiest solution to store 
schema.table.field

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...

 I can't see two modes for this. My best thought about compilers is the 
 Borland Delphi 3 pascal compiler. It compiled something 4000 lines per 
 second on pentium II, which means that for an average project you didn't 
 even notice the compiling time. And I never found a bug in the compiler, 
 or language. Up to now, I didn't find something so fast, solid, 
 reliable. But I leaved the windows world, so I must adapt myself to 
 something else.

This is because Benoît is not working hard enough.
We could go in together for a pot and buy him ball and chain, also tie him
to his desk, send him pizzas and have a webcam survey with a buzzer to
awake him.

-- 
Love is not enough, but it sure helps.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] tags

2009-11-14 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
...

 This is because Benoît is not working hard enough.
 We could go in together for a pot and buy him ball and chain, also tie him
 to his desk, send him pizzas and have a webcam survey with a buzzer to
 awake him.
 
 
 arf... scarry !

I also saw a transparent poo chair on a Japaneese site, so we could check 
if everything's alright for him, and at the same time earn money for his
pizzas by selling connexions to scat perverts; nice doubleshot ain't it?

-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] tags

2009-11-13 Thread Jean-Yves F. Barbier
Hi,

Is it possible to recover any kind of widget's value only from
its tag (as far as tags are all numerics 0,1,2...) from into a loop?

-- 
Debian Hint #6: There is no hint #6. Submit a hint today !

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] date member order presentation

2009-11-10 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 2009/11/10 Jean-Yves F. Barbier 12u...@gmail.com:
 Hi,

 I use a postgresql database, and I need to display dates (in a modified
 TableView) according to DB (ISO: -mm-dd, with separator '-', not '/'),
 otherwise it displays 10/11/2009, but waits for an input such as 2009-11-10
 when I search.

 How can I do that?

 
 are you using the gambas db type Date ?.

No, it is to format display in the code you gave me :)

-- 
real buddy, n.:
Someone who'll go downtown and get two blowjobs, and come back
and give you one.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] date member order presentation

2009-11-09 Thread Jean-Yves F. Barbier
Hi,

I use a postgresql database, and I need to display dates (in a modified
TableView) according to DB (ISO: -mm-dd, with separator '-', not '/'),
otherwise it displays 10/11/2009, but waits for an input such as 2009-11-10
when I search.

How can I do that?

-- 
A door is what a dog is perpetually on the wrong side of.
-- Ogden Nash

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] PING Benoît (ServerSocket)

2009-11-06 Thread Jean-Yves F. Barbier
Kad Mann a écrit :
...
 
 I have the problem on linux and linux alone. Windows has nothing to do
 with it.

windows might be disturbing the force...
...

 Also nothing to do with it. The problem occurred first when a Windows
 server was involved, however it has also happened since on a standalone
 linux talking to itself on localhost. The second time I posted about the

this points the code, as Benoît suggest, not the network

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] PING Benoît (ServerSocket)

2009-11-05 Thread Jean-Yves F. Barbier
Ron a écrit :
 Kad Mann wrote:
 On Thu, 2009-11-05 at 14:45 +0100, Jean-Yves F. Barbier wrote:
   
 Benoît Minisini a écrit :
 ...
 
 But if rebooting your Linux server does not make the application work 
 again, I 
 can't really suspect Gambas, as it does not save anything on the hard 
 disk, 
 especially the network component.

 Did you test the connection with telnet, or any other non-Gambas program? 
 Did 
 you test another socket server application not made in Gambas?

 The only possibility I see would be a memory corruption in the network 
 component - it is possible, I didn't write it :-). By reading the source 
 code 
 of the Listen() method, I didn't see anything that could lead to that. But 
 I 
 will check again.
   
 May be a RAM is corrupted, running a full memtest86+ could reveal that
 (well @ least 2 tests: while physically swapping RAMs between tests in order
 to completely test low addresses of the 1st one)
 
 Gawd! I've got 8Gig to test. I'll take the advice, just to make sure but
 the problem has happened on two machines with the very same symptoms.
 Thanks.

   
 Just thinking out loud maybe it helps.
 
 You talked about a Windows machine at one end, maybe also check its 
 firewall and antivirus settings, if any.
 I know for example Kaspersky 2010 sits between all the network 
 connections you have, maybe some strange pattern is seen as evil, and 
 the connection gets cut off in the middle. Check logs.

Yeah, absolutely right.

Moreover, back in 2001, norton antivirus clobbered the network (10Mb)
down from 780KB/s to 140KB/s even after uninstallation (!)

-- 
I'd love to kiss you, but I just washed my hair.
-- Bette Davis, Cabin in the Cotton

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] DataBrowser bugs

2009-11-04 Thread Jean-Yves F. Barbier
gb 2.17 Debian sid
qt
SQL requests are written, not using intrinsic
postgresql 8.4.1
table test(
 id serial primary key,
 label varchar(8) not null,
 date_cre timestamp default now(),
 date_mod timestamp default NULL,
 mri_users_cre integer default 1,
 mri_users_mod integer default NULL,
 front boolean default true
);
==
Hi,

Former state:
rows 1-7  have values,
rows 8-10 have been deleted
DataBrowser have all table fields but only display: label  front =
  WITH datbro_Civ.GridView
' La colonne 'id' est là pour retourner une réf, pas pour être vue
.Columns[0].Width = 0
.Columns[0].Resizable = FALSE
.Columns[1].Text = Civilités
.Columns[1].Width = 175
.Columns[1].Resizable = FALSE
' Y'a ptêt une autre manière pour avoir accès à ces champs
'  que de les cacher, mais je ne sais pas comment (?)
.Columns[2].Width = 0
.Columns[2].Resizable = FALSE
.Columns[3].Width = 0
.Columns[3].Resizable = FALSE
.Columns[4].Width = 0
.Columns[4].Resizable = FALSE
.Columns[5].Width = 0
.Columns[5].Resizable = FALSE
' La dernière colonne est tjrs visible même à largeur 0 :( (bug? = oui)
'   donc comme on en a que 2 à afficher sur 6, il faut que la 2nde soit la 
dernière (évangile selon St-Gridview)
' ET ne pas oublier de changer l'ordre des champs dans le DataBrowser
.Columns[6].Text = Devant ?
.Columns[6].Width = -1
.Columns[6].Resizable = FALSE
  END WITH

INSERT into table = Refresh of DataBrowser shows new row ONLY when
it is ascending sorted on 'label' 
(descendant order don't show it AND is totally false - even in an ASCII way!)

Sort by 'front' = New row doesn't appear anymore AND descending order 
is totally false (shows: True, False, F..., False, True)

Making the primary key column visible don't change anything.

Well, after a small test, any descending order is *always* false :(

ie ascending:
Co.
GmBH
Inc.
SA 
SARL
sarl2
sarl3
SAS
sro

descending:
SARL
SA
sro
GmBH
Inc.
Co.
SAS
sarl2
sarl2

as a matter of fact is seems to be superseded by primary key ascending order.
so it is truly unusable at all.

JY
-- 
No group of professionals meets except to conspire against the public at large.
-- Mark Twain

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] DataSource missing feature

2009-11-04 Thread Jean-Yves F. Barbier
Hi,

In a DataSource, I can't use a postgresql notation such as:
schema.table

The PB is I have multiple tables with same names in different
schemas; so how could I reach them?

-- 
You will be dead within a year.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] screen WxH

2009-11-04 Thread Jean-Yves F. Barbier
Hi,

can I get the whole screen width  height without using any maximized
form to do that?

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] screen WxH

2009-11-04 Thread Jean-Yves F. Barbier
Steven James Drinnan a écrit :
 use 
 
   Desktop.Height
   Desktop.Width

Thanks to both of you

JY
-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] module or class?

2009-11-03 Thread Jean-Yves F. Barbier
Hi all,

I don't understand very well the difference(s) between these two 
kinds; doc says if I put a procedure in a module I can call it 
directly, but in fact I can't: I must call it with its prefix,
such as in a class: module.procedure

So what's really the difference?

JY
-- 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] DataView bug?

2009-11-03 Thread Jean-Yves F. Barbier
Gambas 2.17 / Debian sid package
Postgresql 8.4.1
gb.qt

Hi,

I made a small test with a DataView; sorting is working for
all columns except for the primary key one: it _only_ 
restore natural order (1, 2, 3, ..) but don't display a 
reverse order with a second click.

BTW the Mode property returns some' like unobtainable help :(

JY
-- 
* PerlGeek is really a space alien
* Knghtktty believes PerlGeek

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] synchronize 2 DataSource

2009-11-03 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Hi,

 is it possible to synchronize 2 DataSource onto 2 different forms?:
 I want A to only have a tabular display (such as DataView), and B
 to be the create/modif/delete one (w/ DataControls); so I want B
 to display the selected line in A at opening.

 
 Not automatically, but why not using only one DataSource then?
 
Because my input form's quite huge: if I put it under the DataView it'll
take half the screen heigth (@ least!), so I want to totally separate browse
and input/mod/del.

-- 
// Minor lesson: don't fuck about with something you don't fully understand
-- the dosdoom source code

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] DataView bug?

2009-11-03 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Gambas 2.17 / Debian sid package
 Postgresql 8.4.1
 gb.qt
 
 Hi,

 I made a small test with a DataView; sorting is working for
 all columns except for the primary key one: it _only_
 restore natural order (1, 2, 3, ..) but don't display a
 reverse order with a second click.
 
 Not really a bug, but a missing feature.

This is really missing: with current state you can't use the primary as
a doc's reference (ie: an invoice number) if you have many thousand lines

 BTW the Mode property returns some' like unobtainable help :(

 JY

 
 This is the same Mode property as GridView, ListView... Multiple selection is 
 just not allowed at the moment.

Ok, thanks

-- 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] modules

2009-10-25 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Benoît Minisini a écrit :
 Hi list,

 I wonder if it is possible to create modules dependencies in order to
 automatically load N modules when you only select one?

 JY
 You mean, when loading a module at runtime?
 well, both @ runtime and when beginning the project when you choose the
 components modules you need.
 ie: base_erp that calls users, clients, suppliers, docs, ... without having
 to check them.

 
 I don't understand what you need: can you give more details?
 
ok, I wanna make a software that is broken in different system-like modules 
(as of gb.qt, gb.gtk...) and I'd like the dependencies to be automatic
when I start another project base upon these modules

-- 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] modules

2009-10-24 Thread Jean-Yves F. Barbier
Hi list,

I wonder if it is possible to create modules dependencies in order to
automatically load N modules when you only select one?

JY
-- 
Praise the Lord and pass the ammunition.
-- Stephen Coonts, The Minotaur

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] modules

2009-10-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Hi list,

 I wonder if it is possible to create modules dependencies in order to
 automatically load N modules when you only select one?

 JY

 
 You mean, when loading a module at runtime?

well, both @ runtime and when beginning the project when you choose the
components modules you need.
ie: base_erp that calls users, clients, suppliers, docs, ... without having
to check them.

-- 
Chaos is King and Magic is loose in the world.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] packaging

2009-10-05 Thread Jean-Yves F. Barbier
Jorge Carrión a écrit :
 I had the same problem.
 Solution:
 download that package.deb and distribute with your application. Add a little
 install.sh who installs both .debs and all is ok.

Fortunately, you don't need that under Debian; you have 2 solutions:

* For a small number of dependencies, you have special fields in the package
   that each address a list: Null, Suggest, Recommend  Depend, Depend oblige
   the depending package(s) to be installed at the same time of yours
   (solution that Petit Eric told you about),

* For a large number of dependencies, you can create an emty meta-package that
   only contains the needeed links as described above.

HTH

JY
-- 
The most important service rendered by the press is that of educating
people to approach printed matter with distrust.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambase and modbus

2009-10-03 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...
 I wrote in C, some time ago, an embedded application using modbus on RS-422.
 It is not a difficult matter, at least the part I was interested in - my 
 device acted as a server, and a MMI (a touch screen LCD panel) was 
 attached to it.

Oops, my fault, I forgot to tell precisions:
* It is in fact ModBus TCP,
* I'll use it for a HA cluster that'll retrieve info from some concentrators
  (900 sensors dispatched on 4 concentrators)

 If you are interested in, I can send some C source code and perhaps the 
 official documentation I used to write it (available for free in the 
 Internet). I don't remember if my implementation was full or had only 
 the relevant part, but it was simple and short enough to be translated 
 easily to gambas; there was only the CRC-32 (or whatever checksum) which 
 was a little CPU intensive, but I suppose an i386 computer has far more 
 power than a poor embedded microcontroller...

Thanks Doriano, but I think I've found what I need: 
I already retrieve docs from modbus.org, and find OpenSCADA (written in C++)
that seems to be ok to do the trick.
I only need to make some tests, and asked the hardware installer to try to
get a simulator from his supplier.

JY
-- 
You will think of something funnier than this to add to the fortunes.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambase and modbus

2009-10-02 Thread Jean-Yves F. Barbier
Mike a écrit :
 Jean-Yves F. Barbier wrote:
 Hi folks,

 Does anybody have experience (and code) of ModBus driven by Gambas?

 JY
   
 ASCII or RTU

either

-- 
Eat shit -- billions of flies can't be wrong.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambase and modbus

2009-10-02 Thread Jean-Yves F. Barbier
Petit Eric a écrit :
 find some of my first tool here :
 http://www.plcs.net/downloads/index.php?direction=0order=directory=Misc
 http://www.plcs.net/downloads/index.php?direction=0order=directory=Modicon

Ok thanks, but there not much.  Anyway, I think I found what I need with
OpenScada.

-- 
Acid absorbs 47 times its own weight in excess Reality.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambase and modbus

2009-10-02 Thread Jean-Yves F. Barbier
Werner a écrit :
...
 Depends on what you use it for, it's not free for commercial purposes.
 
 You have propably seen
 http://copyleft.free.fr/wordpress/index.php/libmodbus/

Thanks Werner, this look interesting.

But AFAIK, GPLv3  LGPLv3 don't forbid commercial use as far as you provide
a meaning to get all sources to the client (for short, it's better to supply
compiled AND source:) and retain the copyleft and credits to original creators.

JY
-- 
This fortune intentionally left blank.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gambase and modbus

2009-10-01 Thread Jean-Yves F. Barbier
Hi folks,

Does anybody have experience (and code) of ModBus driven by Gambas?

JY
-- 
 Overfiend well, excellent.  I get to tear someone a new asshole.
-- in #debian-devel

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Can't access PostreSQL schemas

2009-09-25 Thread Jean-Yves F. Barbier
José Luis Castro a écrit :
 Hi Benoît. Thanks for your kind answer.
 
 I must say, however, the database was created and it's maintained using the
 application PGAdmin, so I can say with absolute security that the table
 I'm trying to acces has been created, in fact, with a primary key. Also I
 ran a lot of queries from PGAdmin and everything works just fine; so a
 priori I think the database and tables are well designed.
 On the other hand, I tried to access from Gambas 2.16, another table of the
 same database, but a one that is not into the schema (for instance, has the
 same sctructure, keys and indexes) and works fine when using the Edit()
 method. That's the reason I think this is a problem with schemas.

José, did you set your schema up into the 'search_path' variable ?

-- 
Reality is a cop-out for people who can't handle drugs.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Can't access PostreSQL schemas

2009-09-25 Thread Jean-Yves F. Barbier
José Luis Castro a écrit :
 Sorry, Jean-Yves: I have no idea how to do that. Is it necessary? Or -better
 answered- when is necessary to declare a search_path variable?
 Thaks for your help.

search_path is a system variable, unique for each role.

command to see what's going on is: 
show search-path;
default path is: $user,public
this command can be issued by a regular user.

however, if you happen to create new schemas, only the postgres user has
total control of it (ONLY with qualified table's name if you don't update
the postgres SU search_path variable, such as: schema2.table5), for a user,
you must inclued the new schema in its search_path otherwise he'll see the
schema but won't be able to access what's in it.
(this not exactly true, as it depend on the permissions you're gonna GRANT to 
him,
but until you haven't got further, this would be a loss of time)

permanent alteration can be done by postgres user as:
ALTER USER mybeloveduserthatilovesomuch SET search_path TO 
schema1,schema2,schema3...;

This is a very important command as most of the time you suppress any
rights from the public schema (WARNING: there's a 'public' ROLE AND a 'public' 
SCHEMA!!!)
in order to gain the possibility to enable/disable the CONNECT possibility
for any user that must have access to this DB (and also other type of access).

This also gives the user the possibility to retrieve rows from a table that is 
listed
into its search_path.


Things are a tiny bit more complicated, but this should do.

JY
-- 
Q:  How many Democrats does it take to enjoy a good joke?
A:  One more than you can find.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] chop project

2009-09-23 Thread Jean-Yves F. Barbier
Charlie Reinl a écrit :
 Salut Jean-Yves,

 Poseidon the father of gambas, raised gambas-components for that.
 
 And that is what I do. My programs are compiled as components, so I can
 use them as program, embed then in other programs or just call them from
 an other program.

 To unify the args[], all these programs have a String[]Array PROPERTY
 called CallingArgs[] in which I fill at start up the Application.Args. 
 Now I can overwrite it at the caller.
 
 Here an Example.
 
 PUBLIC SUB btnPrint_Click()
 DIM args AS String[]
 DIM $TheCalledTwo AS FViewer  
IF NOT IsNull($TheCalledTwo) THEN $TheCalledTwo.close()
$TheCalledTwo = NEW FViewer  -- calling the FViewer-Component which
   has a Form and can be called 
'txtFile.Text
TRY $TheCalledTwo.CallingArgs.Clear()
args = gettingArgusPreview()
$TheCalledTwo.CallingArgs = args -- filling the args[]
$TheCalledTwo.Show -- and make visible
 END
  
 Have fun
 Charlie

Thanks Charlie, I think I've got my solution

-- 
The most difficult thing about surviving AIDS is trying to convince
your parents that you're Haitian.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] chop project

2009-09-22 Thread Jean-Yves F. Barbier
Hi people,

I wonder if it is possible to chop a big project into some smaller ones?

My only problem is to keep a kinda global class linked to all sub-projects
in oder to pass parms from one sub-project to another; is there a manner
to do that or not?

JY
-- 
Life is like an onion: you peel it off one layer at a time, and sometimes
you weep.  -- Carl Sandburg

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Balloon

2009-09-15 Thread Jean-Yves F. Barbier
Stefano Palmeri a écrit :
...
 This is a little example that shows the problem on my box.
 
 Gambas 2.15.1
 KDE 3.5.10
 Qt 3.3.8b
 GTK2 2.12.12
 
 The balloon flashes when using gtk.gb.

Debian sid
GB2.15.2-1 (deb package)
Qt3.3.8b-6
GTK2  2.16.6-1

Tests using your project:
time (sec)  From   Tab

Qt   5  5
GTK  0.55

JY
-- 
Who is D.B. Cooper, and where is he now?

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Profiler for Gambas projects

2009-09-11 Thread Jean-Yves F. Barbier
Jussi Lahtinen a écrit :
 I haven't use Valgrind, but I think yes, but I'm only interested about
 performace analysis.

I think that's a nice idea, when I 1st used a python profiler, I found
many places where small modifications greatly improved execution time.

JY
-- 
I know things about TROY DONAHUE that can't even be PRINTED!!

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Database manager Save Table problem

2009-09-10 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
...
 Apparently on other database systems, two index can have the same name 
 provided they are on different tables.

? strange (and I'm not sure this fit in SQLs standards)

However, in PG, you can't have a doublon, either it is from tables, indexes,
sequences (exception for functions, unless args are the same) unless your
items are in different schemas.

 I will modify the postgresql driver to add the table name before each index, 
 it should solve the problem.

Be careful because this is PG's standard naming system; an index is 
automatically named as:
tablename_columnname_key (..._pkey for primary keys)

 And, as usual, someone finds a bug just after a new version is released. :-)

Yeah, Murphy's law is and endless PITA, just like french taxes spontaneous 
generation...

But cheer up, even though you're doing great ;-)

JY
-- 
Q:  Why do firemen wear red suspenders?
A:  To conform with departmental regulations concerning uniform dress.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2009-09-09 Thread Jean-Yves F. Barbier
David Villalobos Cambronero a écrit :
 Hi, is there an easy way to obtain my IP address?

by shell, I use:
ifconfig | grep inet | cut -d: -f2 | cut -d' ' -f1 | grep -v 127

if you have multiple interfaces, you must add (for each unwanted): 
| grep -v nnn.nnn.nnn.nnn
at the end

HTH
JY
-- 
I don't mind what Congress does, as long as they don't do it in the
streets and frighten the horses.
-- Victor Hugo

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2009-09-09 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 On Wednesday 09 September 2009, Benoît Minisini wrote:
  it's OK, I think there must be something like User.IP :)

  Regards


 --
 David
 The IP address is not related to the user at all.
 How about System.IP?


 However David Villalobos did not tell which IP he wants.
 I do have a IP at the incomming connection of my building.
 For me known as WAN and a IP at the box, known to me as LAN.

 http://www.myipaddress.com for your WAN IP address :)

 Best regards,

 Ron_1st

 
 IP address are attached to network interfaces, and I'm not sure that a 
 network 
 interface could not have several IP, and different types of IPs.

yep, that's right. 
ie: you can easily attach multiple IP adresses to an Ethernet interface as 
aliases,
thus having one ethernet HW I/F that have 10 different IP addresses.
 
 Instead of adding thousands lines of code to the interpreter, I think the 
 better is parsing the output of the ifconfig command.
 
that's right too, many programs/scripts return different strings, obliging
the dev to consider each possible return

JY
-- 
I'm rated PG-34!!

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] DataBrowser

2009-08-31 Thread Jean-Yves F. Barbier
Mathias Ebermann a écrit :
 No, Charlie,
 I didn't mean the headers. I know how to rename them.
 
 What I meant is:
 In my DataSource table I have a field ProducerID.
 That points to another table Producers with the key field id and the 
 field Name.
 Now I would like to have the Column Producers.Name in the list instead of 
 ProducerID.
 I mean the field values of the records, not the headers.

I'm afraid you have to use a view, Mathias; but if there's another solution
I'm interested in too.

JY
-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Installing Gambas2

2009-08-29 Thread Jean-Yves F. Barbier
Bill-Lancaster a écrit :
 Have been using Gambas for only a short while.
 
 Having moved to a new computer I get error when installing Gambas
 (gambas2-2.15.2).
 
 After make install the following error occurs  (the previous steps were
 error free)
 
 /usr/bin/install -c gbx2 /usr/local/bin/gbx2
 
 /usr/bin/install: cannot create regular file `/usr/local/bin/gbx2':
 Permission denied

you compiled GB as a user and tried to install it in a system path.
 
either compile it into root account (or use fakeroot) to install it 
in a system path, or as a user but change the installation path to 
any directory you're able write to (and make sure that this path is
part of the $PATH env variable to directly access your executable.)

-- 
Electro my computer was once one of the building blocks of a great
  pyramid

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Installing Gambas2

2009-08-29 Thread Jean-Yves F. Barbier
Bill-Lancaster a écrit :
 Jean - thanks for the quick reply.
 I get permission denied when I try to navigate to root.

whao, I think you misunderstood me: I didn't say cd to /root,
I said BE the root user. (but anyway, that is not normal to be
refused /root access as a user @ least for read, except of course
for some sensible files)

If you don't know how to go to root from user, type:
su -  (the '-' IS important: man su)
then enter the password of root user;
normally the prompt will change from '$' (user) to '#' (root)
and you'll be really root user.

When you reach this point, 'cd /pathofzesource', 'make clean', 
'./configure', and 'make install' should do the work.

 What is fakeroot ?

As I only use Debian it may be typical from it.
It creates a pseudo-root environment and allow you to make some stuffs
only root is permitted (but I re-read the doc and it was a bad idea: you
can manipulate root files, but not install to system path with it)

JY
-- 
Just because your doctor has a name for your condition doesn't mean he
knows what it is.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
David Villalobos Cambronero a écrit :
 Hi, this is my first try!! any comment
...

Debian SID
===

[OperativeSystem]   
OperativeSystem=Linux 
KernelRelease=2.6.25.4
Distribution=Debian GNU/Linux squeeze/sid \n \l == head -n1 /etc/issue | 
cut -d '\' -f 1
   ^
[Hardwate]

[Gambas]
Gambas=
Gambas2=2.15.2
Gambas3=

===

It is: OperatingSystem

Works ok for me :)

JY
-- 
Q:  What's the difference between a man and the weekend?
A:  The weekend never comes too soon.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
David Villalobos Cambronero a écrit :
 Hi, this is my first try!! any comment

About Debian: there's also a /etc/debian_version

JY
-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
Joshua Higgins a écrit :
 I've adapted David's original script, adding more distro detection and cpu
 architecture identification.

Debian sid
==

[OperatingSystem]

OperatingSystem=Linux
KernelRelease=2.6.25.4
CPUArchitecture=i686
Distribution=squeeze/sid

[Gambas]
Gambas1=
Gambas2=2.15.2
Gambas3=

==

Looks good :)

JY
-- 
printk(ufs_read_super: fucking Sun blows me\n);
-- /usr/src/linux/fs/ufs/ufs_super.c

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
...

 /usr/bin/gbx* are symbolic links that points at where Gambas is installed, so 
 it would be cool to use it to get the Gambas installation path.

ls -Al /usr/bin/gbx*

-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
Joshua Higgins a écrit :
 M0E Lnx, can you try this?
 
 2009/8/24 M0E Lnx m0e@gmail.com
 
 and the overall output is not good...

 your quotes are throwin the whole thing off I think
...

V2 is also ok for Debian

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
David Villalobos Cambronero a écrit :
 Thanks Joshua, I'll add your code ASAP, just let me finish some small changes.
 
 Can we try this, specially on vector Linux? Please.
 
 I now adding ./reconf-all, etc are pending, just be paitient.

PB under Debian:


sed: impossible de lire /etc/lsb-release: Aucun fichier ou dossier de ce type
sed: impossible de lire /etc/lsb-release: Aucun fichier ou dossier de ce type
sed: impossible de lire /etc/lsb-release: Aucun fichier ou dossier de ce type
sed: impossible de lire /etc/lsb-release: Aucun fichier ou dossier de ce type
./report: line 42: gbx : commande introuvable
./report: line 44: gbx3 : commande introuvable


Output:
===

[OperatingSystem]
OperatingSystem=Linux
KernelRelease=2.6.25.4

[Distribution]
ID=
RELEASE=
CODENAME=
DESCRIPTION=

[Hardware]
Architecture=2.6.25.4

[Gambas]
Gambas=
Gambas2=2.15.2
Gambas3=


Architecture is relevant.

JY
-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
M0E Lnx a écrit :
 As I said before, vector has both, /etc/vector-version and
 /etc/slackware-version

bad vektor, change vektor.
it seems it is the only distro that has a doublon as /etc/*-version  ...
make sure it is native and don't come from a change/upgrade

-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
M0E Lnx a écrit :
 I think most slackware derivates have 2 also..
 I know ubuntu has a ubuntu and a debian identifier as well
 
 this is not unique to vectorlinux

PLS answer against the good node, otherwise this heavy thread will fast
look like crap.

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
Joshua Higgins a écrit :
... 
 Please test this if you can...

Seems to work ok under Debian sid:
==

[OperatingSystem]

OperatingSystem=Linux
KernelRelease=2.6.25.4
CPUArchitecture=i686
DistributionVendor=debian
DistributionRelease=squeeze/sid

[Gambas]
Gambas1=Not Installed
Gambas2=2.15.2
Gambas2Path=/usr/bin/gbx2
Gambas3=Not Installed


I guess this is most needed for ML reports (and for Bênôît:)

However, for web compatibility reporting, this quest could last
a long time.
Somebody recently posted about: http://www.cdash.org/ 
this may be THE (web reporting) solution, as it is very easy to 
add a new distro (also to add an existing but modified distro, 
such as, for example, Debian Lenny + backports)

JY
-- 
If men couldn't fuck there'd be a bounty on their heads.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Need help / call for volunteers

2009-08-24 Thread Jean-Yves F. Barbier
Joshua Higgins a écrit :
 Okay, so this version of the script with the additions by Fabien seems to be
 fairly stable.
 
 Also now includes system total ram.
 
 Now outputs to gambas_report.log instead of report2.log.

Works good with Debian sid:
===

[OperatingSystem]
OperatingSystem=Linux
KernelRelease=2.6.25.4
DistributionVendor=debian
DistributionRelease=squeeze/sid

[System]
CPUArchitecture=i686
TotalRam=1556336 kB

[Gambas]
Gambas1=Not Installed
Gambas2=2.15.2
Gambas2Path=/usr/bin/gbx2
Gambas3=Not Installed

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


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

2009-08-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Charlie Reinl a écrit :
 ...

 At the moment, I choose the second solution, except that I don't know
 exactly how to implement the independant versioning system. Must think
 about it more...

 Regards,
 Hey ? and Dr. House ? ;)
 He's cheating Charlie: the day he talked about House MD there
 was no broadcast in fr (may be he has built a pirate decoder in Gambas:)

 JY
 
 I never cheat. I'm a good guy. :-)

Hm, denegation is not plausible (Charlie, build a Gambas-Polygraph!)

JY
-- 
  Our comedies are not to be laughed at. -Samuel Goldwyn

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] webcam weirdness

2009-08-24 Thread Jean-Yves F. Barbier
Ron_1st a écrit :
... 
 The pwc driver returns a v4l2 installation.
 The gb.v4l component can't handle v4l2 complet/correct but only v4l1 ATM

normally no: ie: camstream uses the v4L1 compatibility mode that I compiled
into my kernel (but may be the program spcifically ask for that mode, which
could explain why it don't work with MyWebCam)

 I have the same problem with the philips cams, i.e. PCVC645, and flash 
 (adobe) 
 and i'm using flashcam package http://flashcam.sourceforge.net
 A project to make Adobe Flash for Linux support V4L2 webcams or video devices.

I avoid using adobe products in general (not free, super-bloatted, unexistant
security (a very small worm is enough to activate it and spy you through
flash webcam/mike facility); and you don't know what is transmitted to adobe), 
and flash in particular, as it don't have *any* interest in it.
(the only thing it does very well is making my old CPU jump straight to 100% 
each time I'm obliged to use it.)

 It's using a modified vloopback from the motion project.
 This is in use for webcam on the intraweb site.

I successfuly installed Ekiga in many places: it is fully m$n compatible,
can uses many sound codecs, and the H264 video mode has really an amazing
quality (on a LAN, and if you have a good WC, you're close to DVD quality:)
Try it, you'll love it.
 
 Ron_1st

JY_666th
-- 
If rash develops, discontinue use.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] webcam weirdness

2009-08-24 Thread Jean-Yves F. Barbier
Steven James Drinnan a écrit :
 Try 
 
 for 32bit systems
 
 LD_PRELOAD='/usr/lib/libv4l/v4l1compat.so' gambas2
 

YES Steven, that's working :)

JY
-- 
A woman was in love with fourteen soldiers.  It was clearly platoonic.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 you can do that by hand !
 
 no ?
 
 in TreeView_Expand()
 
 Last.Item.Selected=true
 
Ok Fabien, thanks it is working :) 

but I didn't find any reference to that in the documentation: even a grep
didn't return anything:(
grep -R Last.Item /usr/share/gambas2/help/help/* = nada
grep -Rw Last /usr/share/gambas2/help/help/* =
   /usr/share/gambas2/help/help/changes.html:Gambas Documentation - Last Changes
   /usr/share/gambas2/help/help/changes.html:Last Changes
   /usr/share/gambas2/help/help/help.html:a href=changes.htmlLast 
Changes/anbsp;nbsp;nbsp;
   /usr/share/gambas2/help/help/lang/stat.html:liLast modification time.
 
I can learn quite fast, but not out of nowhere.

JY
-- 
You will be dead within a year.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Jean-Yves F. Barbier
Laurent Carlier a écrit :
...
 I can learn quite fast, but not out of nowhere.

 JY
 
 Perhaps here:
 http://64.128.110.55/help/lang/last
 
 Returns a reference to the object that raised the last event

yaah: on the site, but NOT existant into the package's docs :(

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] CheckBox_MouseUp huge PB

2009-08-23 Thread Jean-Yves F. Barbier
Jean-Yves F. Barbier a écrit :
 Hi list,
 
 In my application I use CheckBoxes to displayset|unset individual rights from
 a database.
 
 When I check|uncheck one, the corresponding xxx_MouseUp() is directly issuing 
 an SQL
 request to GRANT|REVOKE the corresponding right.
 However, for some CheckBoxes I must *reverse* the check as it seems they're 
 not 
 set|unset as entering xxx_MouseUp() - AND this behaviour isn't the same from 
 one
 CheckBox to another!??
 
 Is it a normal behaviour?

2.15.2 regular Debian sid package

A small test show (once all events are terminated):

action   uncheck   check
   GTK
..._MouseDown()n/a  n/a
..._MouseUp()  n/a  n/a
..._Click() 0   -1

   Qt
..._MouseDown()-10  
..._MouseUp()  -10
..._Click() 0   -1

This don't seem to be a normal behaviour as I also set a counter to seek the 
procs order:
they are executed as they're listed here.

So, may be MouseDown() could represent the Checkbox status before it occurs
(in which case it should be the only one reversed), but surely not MouseUp 
 Click: they should be the same and alike Click().

Of course, this is all false if MouseXXX events begin before the change of 
status.

How about that?

Does anybody have a tree showing where and when events and changes take place?

JY
-- 
Now I can finally explain to everyone why I do this.  I just got $7 worth
of free stuff for working on Debian !

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


  1   2   3   >