Re: [Gambas-user] Profiler for Gambas projects

2009-09-12 Thread Doriano Blengino
Jussi Lahtinen ha scritto:
 It would still have performance impact,
 because interpreter would have to constantly check if profiler section
 of code is needed to execute.
 Compiler isn't used at runtime, so changes should be made to interpreter.
   
I remember the old good days when turbo pascal came out. There was an 
IDE, with integrated compiler and debugger, like gambas. But there were 
also separate, command line, compiler and debugger (that debugger was a 
milestone. Never seen something better yet). Until here, this is similar 
to gambas.

Then, there was a command line profiler. The program to profile only 
needed to have debug information stored in the executable (just like 
gambas). There were two main ways to profile - statistical and another 
one, can't remember how it was named. The statistical method used a 
timer to interrupt the program, and counted the times the program 
counter was in a particular line of code at the time the timer 
interrupted the program. It does not really matter the frequency of the 
timer - what matters is to collect enough data. If a program takes only 
a few seconds to execute, then a high speed timer is needed. If the 
program is long (and at that time it was not uncommon for a program to 
take several hours to do the job), then a slower timer could be used. 
The result of profiling was a text file, which could be read by hand or 
used to have a graphical snapshot. The other method was to count the 
functions usage, func by func. I found the timer solution to be better, 
because normally I can guess how many times a routine gets called - no 
need to have something else to do that.

A gambas program can spend lots of its time in the idle loop and, in 
general, today's program can spend a lot of time in other duties (gui, 
disk, network and so on). So I think that some support for profiling 
could be added in the language, like the DEBUG instruction. For example 
a PROFILE ON or PROFILE OFF. One could surround the whole program or 
just some piece of code by PROFILE ON and PROFILE OFF. When profiling is 
ON, the timer runs and collects data (which is not too much: a single 
integer for every line of source). This way a programmer can see, even 
in a single routine, which is the slowest instruction. By grouping data 
referring to a single SUB, a usage per subroutine can be derived.

The only thing I can add is that, by the time, this profiling loosed 
for me its importance - for several reasons, I think. Computers are much 
faster, compilers are more optimizing, analisys of the task and 
experience tell what to do - better than a profiler. This was clearly 
stated in the turbo profiler documentation: the most important mean to 
write a fast program is to analyze which is the better algorithm, not to 
do tricks at the instructions level. But sometimes a profiler could be 
handy anyway.

Regards,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one 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] Slider problem?

2009-09-12 Thread Doriano Blengino
Benoît Minisini ha scritto:
 Benoît Minisini schreef:
 
 Benoît Minisini schreef:
 
 If you disable a Slider, so Slider1.Enabled = FALSE , it still fires
 it's MouseUp event when clicked.
 This is not what I expected. Is this expected behaviour?

 Gambas 2.16.0 gb.qt.

 Regards,
 Ron_2nd.
 
 This is not a bug, this is by design.

 The bug is in gb.gtk, where mouse events are not raised when Enabled is
 False, and often not raised too when Enabled is True.

 Regards,
   
 Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's
 behaviour too..
 I forgive you if you promise me we don't end up like visual basic ;-)

 Regards,
 Ron_2nd.
 
 I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events
 must be always raised, whatever the value of the Enabled property.
   
Why? Why should mouse events be always raised?

 Regards,
   
 Ok understand now.

 I have to change my code a bit to not run into trouble then when a user
 clicks the disabled control...

 Regards,
 Ron_2nd.

 

 Apparently having the same behaviour in gb.gtk than in gb.qt is impossible. 
 You cannot catch events in gb.gtk before they are processed.
   
I am not really sure, but it seems to me that it is possible. 
Documentation is very poor (disgusting, I could say), but it seems you 
can connect to events at several stages, and even do the event cycle 
yourself. Complicated matter, anyway.
 So I think you will be pleased :-), I have to do the contrary: prevent a 
 disabled control to raise *any* event in gb.qt.

 Regards,

   

Regards,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one 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


[Gambas-user] Problem with UTF-8 in Gambas-connection to MySQL

2009-09-12 Thread Dima Malkov
(I don't know English well)
Use Debian 5 Lenny -32, Gambas 2.7 from repository.

I develop an account program for russians users. It must work with cyrillic
correct.
I have made MySQL5 (default UTF8) database with direct CHARACTER SET UTF8
option, tables with direct CHARACTER SET UTF8 option. Then connected to it
from gambas, output data to GridView. All string fields were not readable.

I run example Database. It works correct with some french symbols, but
with cyrillic not. Program Database manager do the same.

I get sources of Gambas-2.8.2. Opened main.c file of MySQL driver, find
function
   static int open_database(DB_DESC *desc, DB_DATABASE *db) .
Add string
   fprintf(stderr, Character set GB[%s] mysql[%s]\n,
GB.System.Charset(), mysql_character_set_name(conn)); 
before and after string
   set_character_set(db); .
Compiled only this driver, copied it to /usr/lib/gambas2. Run my program.
Result:
   Character set GB[UTF-8] mysql[latin1]
 Character set GB[UTF-8] mysql[latin1] 
in console.

Why latin1 instead UTF-8?
--
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] Profiler for Gambas projects

2009-09-12 Thread Jussi Lahtinen
 Computers are much faster,

 Still your program can run slowly!


 compilers are more optimizing,

 Gambas compiler do not optimize at all.


 analisys of the task and experience tell what to do - better than a profiler.

 Not true at all. That's almost always opposite!


 This was clearly stated in the turbo profiler documentation: the most 
 important mean to
 write a fast program is to analyze which is the better algorithm, not to
 do tricks at the instructions level.

 Idea of profiler is not to optimize instruction level.
 Profiler is there to tell you, what sub, function, etc. is slowing
down your program.
 With big complicated project, it is very hard to say what is the true
bottleneck.
 You can't run the whole code in your head and see where the problem is.
 But true is that when you optimize, you optimize algorithm, not instructions.

 I highly recommend to put your code into test. If you have written
something with python
 or C/C++, test it with profiler. I bet you will be surprised!


Jussi

--
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] Profiler for Gambas projects

2009-09-12 Thread Jussi Lahtinen
I must add this also...
Profiler is like debugger, if you know where the error is you don't
need debugger,
but many times you don't!
Same thing with profiler, if you know where the bottleneck is you
don't need profiler,
but many times you don't!


Jussi


On Sat, Sep 12, 2009 at 15:39, Jussi Lahtinen jussi.lahti...@gmail.com wrote:
 Computers are much faster,

  Still your program can run slowly!


 compilers are more optimizing,

  Gambas compiler do not optimize at all.


 analisys of the task and experience tell what to do - better than a profiler.

  Not true at all. That's almost always opposite!


 This was clearly stated in the turbo profiler documentation: the most 
 important mean to
 write a fast program is to analyze which is the better algorithm, not to
 do tricks at the instructions level.

  Idea of profiler is not to optimize instruction level.
  Profiler is there to tell you, what sub, function, etc. is slowing
 down your program.
  With big complicated project, it is very hard to say what is the true
 bottleneck.
  You can't run the whole code in your head and see where the problem is.
  But true is that when you optimize, you optimize algorithm, not instructions.

  I highly recommend to put your code into test. If you have written
 something with python
  or C/C++, test it with profiler. I bet you will be surprised!


 Jussi


--
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] Slider problem?

2009-09-12 Thread Ron_1st
On Saturday 12 September 2009, Doriano Blengino wrote:
  I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events
  must be always raised, whatever the value of the Enabled property.
        
 Why? Why should mouse events be always raised?

What if the rightmouse button has a menu option to enable/disable 
the control or you want to popup a message to tell the user it is 
disabled and will not do anything. :)

 
  Regards,
 


Best regards,

Ron_1st

-- 

--
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] Check if a program is already started

2009-09-12 Thread Jussi Lahtinen
Not very elegant, but works:


Dim sOutput As String

Exec [pgrep, -f, -l, NameOfYourProgram.gambas] Wait To sOutput

If Split(Trim$(sOutput), gb.NewLine).Count  1 Then
'Allready running
EndIf


Jussi




On Sat, Sep 12, 2009 at 15:50, Johny Provoost johny.provo...@skynet.be wrote:
 Hi,

 Is there a command to check if a program (programed in Gambas) is
 already running?
 I want to avoid that a program is started twice.


 Johny Provoost


 --
 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


--
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] intel i7 - parallel processing

2009-09-12 Thread Jussi Lahtinen
I have found problems with multi-threading, not so much because of gambas.
But how to spilt a task for multi-threading! It would be interesting
to know what
solutions people has invent.


Jussi



On Sat, Sep 12, 2009 at 02:25, nando nand...@nothingsimple.com wrote:
 I run simultaneously multiple Gambas apps on a multicore cpu -
 some very cpu and I/O intensive and SHELLing big scripts
 in the background.
 Most impressed I'm with is dual Atom with hyperthreading
 which looks like four cores to the kernel.
 My apps are not the same (ie parallel programs).
 The kernel does wonderful job working and balancing things out.
 Parallel programming and multi-threading is where things are going.
 Gambas isn't either (yet).
 I written a few programs that SHELLs multiple identical Gambas progams
 as if it was like a single multi-thread program.  Works fine.
 Benoit et al has done a wonderfuljob!
 -Fernando



 -- Original Message ---
 From: Ivan Williams ivanwm...@yahoo.com
 To: gambas-user@lists.sourceforge.net
 Sent: Fri, 11 Sep 2009 13:01:36 -0700 (PDT)
 Subject: [Gambas-user] intel i7 - parallel processing

 Greetings

      I currently program in gambas on a P4 Dual Core with 2 GB RAM and will 
 be
 upgrading to a I7 system by the end of the quarter.  I am wondering if anyone
 out there is programming on a i7 and if so, what kind of speed are you 
 seeing in
 program execution?  Also, have you had any success in parallel programming 
 with
 gambas and if so are you willing to share your code?

 Thank You

 Ivan

 I never saw a wild thing sorry for itself.
 A small bird will drop frozen dead from a bough
 Without ever having felt sorry for itself.
 -- D.H. Lawrence

 http://www.usconstitution.net/const.html

 Linux - Live Free or Die.

 --
 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
 --- End of Original Message ---


 --
 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


--
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] Slider problem?

2009-09-12 Thread Benoît Minisini
 On Saturday 12 September 2009, Doriano Blengino wrote:
   I didn't change the behaviour of gb.qt because of gb.gtk. Mouse
   events must be always raised, whatever the value of the Enabled
   property. 
 
  Why? Why should mouse events be always raised?
 
 What if the rightmouse button has a menu option to enable/disable
 the control or you want to popup a message to tell the user it is
 disabled and will not do anything. :)
 

Actually you must never use Mouse events directly unless you know what you do, 
because then you cannot handle the keyboard events that are associated with.

For example, if you open a popup menu inside a mouse event, that is actually a 
bug. The menu won't open if you press the Menu keyboard button. You must use 
the Menu event instead.

In the same way, control that must answer to a double-click have an Activate
event that you must use instead of DblClick.

Regards,

-- 
Benoît Minisini

--
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] Application_mousedown() + Application_keypress() ?

2009-09-12 Thread Benoît Minisini
 I'm trying to get an application-wide mouse down event to register.  I
 found that when I do a Form_mousedown() it only triggers when you click
 on an empty part of the form, not when you're clicking on any type of
 control.  I'm looking for something that will trigger whenever you hit
 the mouse button.  (My app is going to be full screen, so I don't care
 if it works outside of the app window or not.)
 
 During my searching of the list archives, I found someone tried to use
 Application_Keypress() as a way to get a key press while the app is
 running.  Well, I tried it and it doesn't work, nothing happens:
 
 Static Public Sub Application_Keypress()
 Message.Info(Key.code)
 End
 
 I tried it on Gambas 2.8 and I even compiled Gambas 3.0 r2329 and that
 didn't change anything.  I am using GTK only (Ubuntu).  Any ideas?
 
 Thanks,
 Lee
 

There is no global pointer event handler, only Application_KeyPress(). But 
apparently it does not work with gb.gtk... Can you try with gb.qt to see if at 
least Application_KeyPress() is called? Note that this function must be 
defined in the startup class!

-- 
Benoît Minisini

--
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] How to crash the IDE

2009-09-12 Thread Benoît Minisini
 Hi,
 
 On 2.15.0 .
 Editing a form select the Background change feature, select Free colour and
 write into the HEX  colour: HDFDFFF 
 
 --  Type mismatch Wanted Integer got Null Instead
FColourChooser.txtHexa_Change.372
 ...and IDE dies.
 
 Regards
 Pino
 

It is fixed in revision 2332.

Regards,

-- 
Benoît Minisini

--
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] a IDE-Bug in 2.16.0 rev 2323

2009-09-12 Thread Benoît Minisini
 Am Freitag, den 11.09.2009, 13:34 +0200 schrieb Benoît Minisini:
   Salut Benoit,
  
  
   [OperatingSystem]
   OperatingSystem=Linux
   KernelRelease=2.6.24-24-generic
   DistributionVendor=ubuntu
   DistributionRelease=Ubuntu 8.04.3 LTS
  
   [System]
   CPUArchitecture=i686
   TotalRam=506932 kB
  
   [Gambas]
   Gambas1=gbx-1.0.17
   Gambas1Path=/usr/bin/gbx
   Gambas2=2.16.0
   Gambas2Path=/usr/local/bin/gbx2
   Gambas3=2.99.0
   Gambas3Path=/usr/local/bin/gbx3
  
   - gambas2
   -- 2.16.0
   Revision: 2323
   /usr/local/bin/gbx2
  
   changing in IDE-Editor the sub/function by selecting it in the ComboBox
   raise an Error and IDE crashes.
 
  I cannot reproduce the bug - please give some details about what you did
  exactly.
 
  Regards,
 
 Salut,
 
 today I cannot reproduce the bug too.
 What I do, I often do, is changing in an open IDE the projects, run
 them, test them.
 Move sometimes the place where the project is stored (move them).
 Yesterday, after the a couple of reproduction off that bug, I copied the
 last gambas-IDE to my home, loaded and started  it, then I'v chosen the
 project and could reproduce the error the 3 objects had all a NULL
 value.
 
 What I did: I stood in the code editor and wanted to change into another
 SUB, which I choose in the combobox.. and hoped ...and crashed.
 
 Send you the stack.
 

It should be fixed in revision 2332. It won't crash, but I don't know why it 
crashed.

Regards,

-- 
Benoît Minisini

--
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] Check if a program is already started

2009-09-12 Thread Jesus Guardon
Just another way:

PUBLIC FUNCTION pidOf(program AS String) AS Boolean
 'checks if a program is running
 DIM gotpid AS String = 
 DIM running AS Boolean = FALSE
 TRY SHELL pidof   program TO gotpid
 IF gotpid THEN
 running = TRUE
 ELSE
 running = FALSE
 ENDIF
 RETURN running
END

Usage:

IF pidOf(yourProgram) THEN whatever...

At least it works for me

Cheers

Jesus

Jussi Lahtinen escribió:
 Not very elegant, but works:
 
 
 Dim sOutput As String
 
 Exec [pgrep, -f, -l, NameOfYourProgram.gambas] Wait To sOutput
 
 If Split(Trim$(sOutput), gb.NewLine).Count  1 Then
 'Allready running
 EndIf
 
 
 Jussi

--
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] Slider problem?

2009-09-12 Thread Ron_1st
On Saturday 12 September 2009, Benoît Minisini wrote:
  On Saturday 12 September 2009, Doriano Blengino wrote:
I didn't change the behaviour of gb.qt because of gb.gtk. Mouse
events must be always raised, whatever the value of the Enabled
property. 
  
   Why? Why should mouse events be always raised?
  
  What if the rightmouse button has a menu option to enable/disable
  the control or you want to popup a message to tell the user it is
  disabled and will not do anything. :)
  
 
 Actually you must never use Mouse events directly unless you know what you 
 do, 
 because then you cannot handle the keyboard events that are associated with.
 
 For example, if you open a popup menu inside a mouse event, that is actually 
 a 
 bug. The menu won't open if you press the Menu keyboard button. You must 
 use 
 the Menu event instead.

The Mennu event was the one I mean as example.

 
 In the same way, control that must answer to a double-click have an Activate
 event that you must use instead of DblClick.
 
 Regards,
 


Best regards,

Ron_1st

 -- 


--
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] Form_Resize

2009-09-12 Thread Charlie Reinl
Salut,

is that my, or a general problem, on gambas2 2.16 I can make forms
bigger, but not smaller...or did I miss something ?
That I remarked on my White-A4-PalmTop for Debug-Watch-Windows but now
I find that on a form in the project (see example).
-- 
Amicalment
Charlie


firstTry-0.0.1.tar.gz
Description: application/compressed-tar
--
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] Profiler for Gambas projects

2009-09-12 Thread Doriano Blengino
Jussi Lahtinen ha scritto:
 I must add this also...
 Profiler is like debugger, if you know where the error is you don't
 need debugger,
 but many times you don't!
 Same thing with profiler, if you know where the bottleneck is you
 don't need profiler,
 but many times you don't!
   
I don't know what kind of programs you write, so I can easily go wrong. 
But... to speak of profiling when using python seems to me a nonsense.
I think the following and, I repeat, I could be wrong. You can teach to me.

If a program does networking, database, or uses complex libraries, then 
the bottleneck is almost always outside the program itself. So it makes 
little difference in using python, gambas or assembler. If the program 
does intense computation, then it is a nonsense to use interpreted 
languages. So I ask again: what kind of program you write? We can take 
gambas for example. It has wonderful graphics, superb database 
capabilities, networking libraries and all the rest. For average 
applications, there is little speed difference between a gambas one and 
a C++ compiled one. Well. Try to write a CAD program, a word processor 
(a serious one), a sound or image editor with gambas, and you will find 
a hard life. The power of todays CPUs hides the burden, but it is still 
there. So I really don't understand. That's all.

Regards,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one 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] Form_Resize

2009-09-12 Thread Benoît Minisini
 Salut,
 
 is that my, or a general problem, on gambas2 2.16 I can make forms
 bigger, but not smaller...or did I miss something ?
 That I remarked on my White-A4-PalmTop for Debug-Watch-Windows but now
 I find that on a form in the project (see example).
 

This always behaved like that: modal forms cannot be shrinked smaller than 
their initial size. It is feature, not a bug.

Regards,

-- 
Benoît Minisini

--
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] Workspace and scrollbars

2009-09-12 Thread Benoît Minisini
 Good morning to all,
 
 is it possible to use scrollbars with workspace when a form is bigger
 than visible screen area?
 

You can put all your form contents inside a ScrollView before putting the form 
inside the workspace.

-- 
Benoît Minisini

--
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 UTF-8 in Gambas-connection to MySQL

2009-09-12 Thread Benoît Minisini
 (I don't know English well)
 Use Debian 5 Lenny -32, Gambas 2.7 from repository.
 
 I develop an account program for russians users. It must work with cyrillic
 correct.
 I have made MySQL5 (default UTF8) database with direct CHARACTER SET UTF8
 option, tables with direct CHARACTER SET UTF8 option. Then connected to it
 from gambas, output data to GridView. All string fields were not readable.
 
 I run example Database. It works correct with some french symbols, but
 with cyrillic not. Program Database manager do the same.
 
 I get sources of Gambas-2.8.2. Opened main.c file of MySQL driver, find
 function
static int open_database(DB_DESC *desc, DB_DATABASE *db) .
 Add string
fprintf(stderr, Character set GB[%s] mysql[%s]\n,
 GB.System.Charset(), mysql_character_set_name(conn)); 
 before and after string
set_character_set(db); .
 Compiled only this driver, copied it to /usr/lib/gambas2. Run my program.
 Result:
Character set GB[UTF-8] mysql[latin1]
  Character set GB[UTF-8] mysql[latin1] 
 in console.
 
 Why latin1 instead UTF-8?

What is the value of DB.Charset just after you have connected to the database 
in Gambas?

What happens if you uncheck the use encoding menu entry if the popup menu in 
the database manager?

Can you send me your database contents, or part of it, so that I test by 
myself?

-- 
Benoît Minisini

--
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