Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Adrien Prokopowicz
Le dimanche 10 juin 2012 00:32:16 Benoît Minisini a écrit :
> Le 10/06/2012 00:02, Adrien Prokopowicz a écrit :
> > I have another little question.
> > 
> > In the project I sent you, I added two lines after FillRect() :
> >Draw.Text("Gambas", 50, 50)
> >Draw.Text("Gambas", 100, 100)
> > 
> > The first takes around 2 msec, the second only 120usec.
> > Is there any font loading, or something like that, when calling draw.text
> > ?
> 
> I imagine that Qt loads each font glyph only when it actually needs it.
> 
> The second time you display "Gambas", the six glyphs are already loaded,
> and so drawing is faster.

No, I tried to change the text in the second call, and results are the same.
But I launched callgrind on my example, and I saw that for a few calls to 
Draw_text, there is one call to QFontMetrics, that loads the font only once 
(call to QFontDatabase::load, then to fontconfig). 

I find the calls to fontconfig very slow, but this is another problem. This one 
is solved. :-)

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Benoît Minisini
Le 10/06/2012 00:02, Adrien Prokopowicz a écrit :
> I have another little question.
> In the project I sent you, I added two lines after FillRect() :
>
>Draw.Text("Gambas", 50, 50)
>Draw.Text("Gambas", 100, 100)
>
> The first takes around 2 msec, the second only 120usec.
> Is there any font loading, or something like that, when calling draw.text ?
>

I imagine that Qt loads each font glyph only when it actually needs it.

The second time you display "Gambas", the six glyphs are already loaded, 
and so drawing is faster.

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Adrien Prokopowicz
Le samedi 9 juin 2012 23:24:58 vous avez écrit :
> Le samedi 9 juin 2012 22:46:46 Benoît Minisini a écrit :
> > >> Here is a little test project.
> > >> 
> > >> And I just noticed that there isn't this problem with gb.gtk. So for
> > >> me it's a
> > >> bug in gb.qt4.
> > > 
> > > On my machine, Draw.Begin with gb.gtk takes about 120 micro-seconds the
> > > first time it is called, 50 us the next times. With gb.qt4, it takes
> > > about 300 us each time.
> > > 
> > > So I don't understand how it could take 20 ms on your machine: it means
> > > that my PC is 66x faster than yours!
> > 
> > I added a little optimization in revision #4819: is it better on your
> > machine?
> 
> Yes, this is really better ! It passed from 20ms to 300us, even around 120us
> sometimes. Thanks !

I have another little question.
In the project I sent you, I added two lines after FillRect() :

  Draw.Text("Gambas", 50, 50)
  Draw.Text("Gambas", 100, 100)

The first takes around 2 msec, the second only 120usec.
Is there any font loading, or something like that, when calling draw.text ?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] rev. 4815 - "Extern" doesn't work ?

2012-06-09 Thread Ru Vuott
Mooolto bene, Benoît !
Very good. Now, it works.

Bye

Vuo





--- Sab 9/6/12, Benoît Minisini  ha scritto:

> Da: Benoît Minisini 
> Oggetto: Re: [Gambas-user] rev. 4815 - "Extern" doesn't work ?
> A: "mailing list for gambas users" 
> Data: Sabato 9 giugno 2012, 16:04
> Le 09/06/2012 15:53, Benoît Minisini
> a écrit :
> > Le 09/06/2012 14:06, Ru Vuott a écrit :
> >> I feel that I can no longer invoke external
> functions contained in
> >> libraries.
> >> In fact all my programs, that contain calls to
> external functions by
> >> Extern, now they return to me - on the line where
> there is the
> >> external function call - the error: "Illegal
> function" ! :-O
> >>
> >> Can you control it ?
> >>
> >> Regards
> >>
> >> P.S.: My updated: rev 4815
> >>
> >
> > I confirm. I will look at it...
> >
> 
> OK, fixed in revision #4817.
> 
> -- 
> Benoît Minisini
> 
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's
> security and 
> threat landscape has changed and how IT managers can
> respond. Discussions 
> will include endpoint security, mobile security and the
> latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Adrien Prokopowicz
Le samedi 9 juin 2012 22:46:46 Benoît Minisini a écrit :
> >> Here is a little test project.
> >> 
> >> And I just noticed that there isn't this problem with gb.gtk. So for
> >> me it's a
> >> bug in gb.qt4.
> > 
> > On my machine, Draw.Begin with gb.gtk takes about 120 micro-seconds the
> > first time it is called, 50 us the next times. With gb.qt4, it takes
> > about 300 us each time.
> > 
> > So I don't understand how it could take 20 ms on your machine: it means
> > that my PC is 66x faster than yours!
> 
> I added a little optimization in revision #4819: is it better on your
> machine?

Yes, this is really better ! It passed from 20ms to 300us, even around 120us 
sometimes. Thanks !

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Benoît Minisini
>> Here is a little test project.
>>
>> And I just noticed that there isn't this problem with gb.gtk. So for
>> me it's a
>> bug in gb.qt4.
>>
>
> On my machine, Draw.Begin with gb.gtk takes about 120 micro-seconds the
> first time it is called, 50 us the next times. With gb.qt4, it takes
> about 300 us each time.
>
> So I don't understand how it could take 20 ms on your machine: it means
> that my PC is 66x faster than yours!
>

I added a little optimization in revision #4819: is it better on your 
machine?

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Benoît Minisini
Le 09/06/2012 21:05, Adrien Prokopowicz a écrit :
> Le samedi 9 juin 2012 20:45:49 Benoît Minisini a écrit :
>> Le 09/06/2012 19:41, Adrien Prokopowicz a écrit :
>>> Hi all,
>>>
>>> in my project I have a cached DrawArea that I need to redraw each time it
>>> is resized. My code is like this :
>>>
>>> Public Sub RefershDrawArea()
>>>
>>> Draw.Begin($drawArea)
>>>
>>> 'Drawing methods here ...
>>>
>>> Draw.End
>>>
>>> End
>>>
>>> That works perfectly, but when I launch the profiler, he tells me that the
>>> Draw.Begin() method takes a lot of time (around 20 ms).
>>>
>>> Is there a way to make this call faster ? Or maybe a way to do only one
>>> call to Begin() when the user starts resizing and to End() when it stops
>>> ?
>>>
>>> Regards,
>>> Adrien.
>>
>> Please provide a project that shows that!
>
> Here is a little test project.
>
> And I just noticed that there isn't this problem with gb.gtk. So for me it's a
> bug in gb.qt4.
>

On my machine, Draw.Begin with gb.gtk takes about 120 micro-seconds the 
first time it is called, 50 us the next times. With gb.qt4, it takes 
about 300 us each time.

So I don't understand how it could take 20 ms on your machine: it means 
that my PC is 66x faster than yours!

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Adrien Prokopowicz
Le samedi 9 juin 2012 20:45:49 Benoît Minisini a écrit :
> Le 09/06/2012 19:41, Adrien Prokopowicz a écrit :
> > Hi all,
> > 
> > in my project I have a cached DrawArea that I need to redraw each time it
> > is resized. My code is like this :
> > 
> > Public Sub RefershDrawArea()
> > 
> >Draw.Begin($drawArea)
> >
> >'Drawing methods here ...
> >
> >Draw.End
> > 
> > End
> > 
> > That works perfectly, but when I launch the profiler, he tells me that the
> > Draw.Begin() method takes a lot of time (around 20 ms).
> > 
> > Is there a way to make this call faster ? Or maybe a way to do only one
> > call to Begin() when the user starts resizing and to End() when it stops
> > ?
> > 
> > Regards,
> > Adrien.
> 
> Please provide a project that shows that!

Here is a little test project. 

And I just noticed that there isn't this problem with gb.gtk. So for me it's a 
bug in gb.qt4. 

TestCacheArea-0.0.1.tar.gz
Description: application/compressed-tar
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Benoît Minisini
Le 09/06/2012 19:41, Adrien Prokopowicz a écrit :
> Hi all,
>
> in my project I have a cached DrawArea that I need to redraw each time it is
> resized. My code is like this :
>
> Public Sub RefershDrawArea()
>
>Draw.Begin($drawArea)
>
>'Drawing methods here ...
>
>Draw.End
>
> End
>
> That works perfectly, but when I launch the profiler, he tells me that the
> Draw.Begin() method takes a lot of time (around 20 ms).
>
> Is there a way to make this call faster ? Or maybe a way to do only one call
> to Begin() when the user starts resizing and to End() when it stops ?
>
> Regards,
> Adrien.
>

Please provide a project that shows that!

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Window position error on applying stored "geometry"

2012-06-09 Thread RICHARD WALKER
>
> Gambas 3.2 will be released soon, so maybe it is not worth it?
>
> The bug was in gb.gtk. I misunderstood the GDK functions about monitors
> & screens and how the full screen size must be computed. Now gb.gtk and
> gb.qt4 should behave the same.

I think I might agree that waiting for the 3.2 release would be a
practical way to go, but for one thing; Mageia 2 users would be
dependent on a "backport" type release to reap all of the benefits. As
it is the v3.1.1 in Mageia 2 repository has been retro-fitted with a
DrawingArea bug-fix, but in general the update mechanism Mageia
operates will not normally go to a new version. I will see if Matteo
Pasotti has a view on this - he is one of the packagers.

In the meantime I will get to learn a little more about how Gambas is
structured by seeing if I can isolate the changes you implemented to
fix this issue and, perhaps, get it into a form which can be applied
to the 3.1.1 release.

Thanks again, Benoît

R

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Draw.Begin/End execution time

2012-06-09 Thread Adrien Prokopowicz
Hi all,

in my project I have a cached DrawArea that I need to redraw each time it is 
resized. My code is like this :

Public Sub RefershDrawArea()

  Draw.Begin($drawArea)

  'Drawing methods here ...

  Draw.End

End

That works perfectly, but when I launch the profiler, he tells me that the 
Draw.Begin() method takes a lot of time (around 20 ms).

Is there a way to make this call faster ? Or maybe a way to do only one call 
to Begin() when the user starts resizing and to End() when it stops ?

Regards,
Adrien.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] GB.JIT Crashes

2012-06-09 Thread Sebastian Kulesz
Hi! I'm getting a crash when I place the fast keyword on top of a
module. The output:

19PushClassExpression
gbx3: jit.h:145: virtual llvm::Value* Expression::codegen_get_value():
Assertion `false && "codegen_get_value not done yet for this type"'
failed.

If you need the source let me know!

Thanks!

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Issue 255 in gambas: TextBox_LostFocus event bug?

2012-06-09 Thread gambas

Comment #3 on issue 255 by sot...@gmail.com: TextBox_LostFocus event bug?
http://code.google.com/p/gambas/issues/detail?id=255

It is fixed, thanks!


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Issue 256 in gambas: When executing a project on a read-only with profiling enabled the program crashes

2012-06-09 Thread gambas
Status: New
Owner: 
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 256 by sebi...@gmail.com: When executing a project on a read-only  
with profiling enabled the program crashes
http://code.google.com/p/gambas/issues/detail?id=256

If I start a project from a read only location, it crashes without even  
starting with the following message:

gb.profile: cannot create profile file '.prof.5200': Permission denied

If the profile file can't be created on the project's folder, either  
disable profiling or use /tmp to store it.


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Issue 255 in gambas: TextBox_LostFocus event bug?

2012-06-09 Thread gambas
Updates:
Status: Fixed

Comment #2 on issue 255 by benoit.m...@gmail.com: TextBox_LostFocus event  
bug?
http://code.google.com/p/gambas/issues/detail?id=255

It should be fixed in revision #4818. Can you confirm?


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Jussi Lahtinen
OK, while that solution might work, it sucks.
Instead see new attachment (IncludeProblem-2.0.tar.gz).

Jussi



On 9 June 2012 16:57, Jussi Lahtinen  wrote:

> Thinking more closely your problem, I think I know what you need.
>
> You try to avoid writing *many* lines like this;
> sParameterNameArray = NEW String[MAXIMUM_CSV_PARAMETERS]
>
> That is caused by broken object design, usually because you need to use
> old code which had different approach than OO.
> I have had same problems.
>
> I attached my suggestion how to implement this
> (IncludeProblem-0.0.1.tar.gz).
> Is it working solution?
>
> Jussi
>
>
>
>
>
>
> On 9 June 2012 16:18, Jussi Lahtinen  wrote:
>
>>
>> C thrives on #include without showing signs of design problems.
>>>
>>
>> Yes, I know, I wasn't talking about C, I was talking about object
>> oriented language, Gambas.
>>
>>
>>
>>
>>> Tens of thousands of external lines of code can be pulled in with
>>> a dozen #include statements, leaving the code completely manageable,
>>> readable and a lot more powerful than any other competing method.
>>>
>>
>> Yes, but you use #include with libraries, not with programs that aren't
>> designed for that.
>> Or you have design problem.
>>
>>
>>
>> For example, in module_a.module you might have
>>>
>>>...
>>>
>>>
>>> and in a file called initialise_csv_variables.include it would contain:
>>>
>>>  PRIVATE WordMarker1 AS Integer
>>>  :
>>>  '200 further variable declarations and initialisations
>>>  :
>>>  PRIVATE sParameterNameArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
>>>  PRIVATE sParameterValueArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
>>>
>>> The #include files can contain any amount of well trodden
>>> proven gambas code which is maintained in only one file.
>>>
>>
>> So, basically you would add module/class called initialise_csv_variables,
>> and you use that module/class in modules a and b.
>>
>>
>>
>>
>>> I will argue that adding C like #include functionality saves a ton of
>>> work in mega programs which are already working well, but now
>>> needs to be expanded even further.
>>>
>>
>> I don't understand how.
>> You would still need to write that initialise_csv_variables.include file,
>> you could as well write it as module/class.
>>
>> Jussi
>>
>>
>>
>


IncludeProblem-2.0.tar.gz
Description: GNU Zip compressed data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Issue 255 in gambas: TextBox_LostFocus event bug?

2012-06-09 Thread gambas
Updates:
Status: Accepted
Labels: -Version Version-TRUNK

Comment #1 on issue 255 by benoit.m...@gmail.com: TextBox_LostFocus event  
bug?
http://code.google.com/p/gambas/issues/detail?id=255

(No comment was entered for this change.)


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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

2012-06-09 Thread Jussi Lahtinen
Thanks!
512 is almost enough, so, I'm sure 4096 is more than enough for my purposes.

Jussi



On 9 June 2012 16:41, Benoît Minisini  wrote:

> Le 05/06/2012 21:06, Jussi Lahtinen a écrit :
> > Yes.
> > My project is pretty huge.
> >
> > Jussi
> >
>
> OK. In revision #4816, you can define the GB_PROFILE_MAX environment
> variable with the maximum profile file size, in megabytes.
>
> The maximum value is 4096 Mb. I hope it will be enough!
>
> Regards,
>
> --
> Benoît Minisini
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Jussi Lahtinen
Sorry, maybe I need to re-read!

Jussi



On 9 June 2012 18:02, Jussi Lahtinen  wrote:

> Bruce, please re-read. I'm against idea of #include being new keyword.
>
> Jussi
>
>
>
>
> On 9 June 2012 17:00, Bruce  wrote:
>
>> On Sat, 2012-06-09 at 13:51 +0100, jm wrote:
>> > On Sat, 2012-06-09 at 02:45 +0300, Jussi Lahtinen wrote:
>> > > Maybe I'm just too tired, but I don't understand the point.
>>
>> Jussi, maybe I'm just too old as well as tired, but I can't grasp the
>> point of taking an object oriented language and trying to jam an old
>> (albeit well tested) non-OO concept into it.
>>
>> Joe, I am having some degree of trouble really understanding your value
>> proposition. Especially the last post (which I have snipped in entirety,
>> sorry). All I can grasp from reading it several times is that you feel
>> that #include has some productivity value in providing what we call
>> inheritance and polymorphism.
>>
>> I am not trying to put you down but I really can't grasp the ideas of
>> "thousands" of parameters and "hundreds" of initialisations.
>>
>> { We, here at paddys-hill have tens of clients (well a few tens anyway )
>> that use a dozen or so applications, the code base encompasses around
>> two hundred or so classes and modules organized into around thirty
>> components and libraries.  The total code size is less than 25,000 lines
>> and I would guess that probably 60% or more of that is comments. At a
>> guess, the "largest" method calls would be 7 parameters, and they are
>> just convenience calls to a class constructor.  By far the "largest"
>> chunk of code is a library that downloads the text of around 40 web
>> pages a day (about 40,000 text lines), parses them, normalises them and
>> uploads them to the central database. I just checked and it's 6345 lines
>> of code, so about 2400 working lines, which are mainly involved in text
>> parsing (things like discerning "Mac Donald" and "MacDonald" or "Miss
>> Jane O'Donnel" and "Ms Jan ODonnell" are the same names). The primary
>> application that uses this library runs once a day and adds about 1200
>> rows to a central postgresql database and can update anywhere between 2
>> and 10,000 other rows.  It takes "about" 10 minutes.  The central
>> database has just over 3.2 million rows, the clients each have a
>> sub-mirrored database of who-knows-what size.}
>>
>> Anyway, I hope you can see from the above {} that those numbers you are
>> using are fairly un-emotive to the reader.
>>
>> regards
>> Bruce
>>
>>
>>
>>
>>
>> --
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Jussi Lahtinen
Bruce, please re-read. I'm against idea of #include being new keyword.

Jussi



On 9 June 2012 17:00, Bruce  wrote:

> On Sat, 2012-06-09 at 13:51 +0100, jm wrote:
> > On Sat, 2012-06-09 at 02:45 +0300, Jussi Lahtinen wrote:
> > > Maybe I'm just too tired, but I don't understand the point.
>
> Jussi, maybe I'm just too old as well as tired, but I can't grasp the
> point of taking an object oriented language and trying to jam an old
> (albeit well tested) non-OO concept into it.
>
> Joe, I am having some degree of trouble really understanding your value
> proposition. Especially the last post (which I have snipped in entirety,
> sorry). All I can grasp from reading it several times is that you feel
> that #include has some productivity value in providing what we call
> inheritance and polymorphism.
>
> I am not trying to put you down but I really can't grasp the ideas of
> "thousands" of parameters and "hundreds" of initialisations.
>
> { We, here at paddys-hill have tens of clients (well a few tens anyway )
> that use a dozen or so applications, the code base encompasses around
> two hundred or so classes and modules organized into around thirty
> components and libraries.  The total code size is less than 25,000 lines
> and I would guess that probably 60% or more of that is comments. At a
> guess, the "largest" method calls would be 7 parameters, and they are
> just convenience calls to a class constructor.  By far the "largest"
> chunk of code is a library that downloads the text of around 40 web
> pages a day (about 40,000 text lines), parses them, normalises them and
> uploads them to the central database. I just checked and it's 6345 lines
> of code, so about 2400 working lines, which are mainly involved in text
> parsing (things like discerning "Mac Donald" and "MacDonald" or "Miss
> Jane O'Donnel" and "Ms Jan ODonnell" are the same names). The primary
> application that uses this library runs once a day and adds about 1200
> rows to a central postgresql database and can update anywhere between 2
> and 10,000 other rows.  It takes "about" 10 minutes.  The central
> database has just over 3.2 million rows, the clients each have a
> sub-mirrored database of who-knows-what size.}
>
> Anyway, I hope you can see from the above {} that those numbers you are
> using are fairly un-emotive to the reader.
>
> regards
> Bruce
>
>
>
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Configuration issue with gb.desktop

2012-06-09 Thread tobi
On Sat, 09 Jun 2012, Benoît Minisini wrote:
> Le 06/06/2012 20:12, tobi a écrit :
> > Hi,
> >
> > I just moved to a new machine and tried to compile gambas3 again. On make, 
> > I get with gb.desktop:
> >
> > make[5]: Entering directory `/home/woodap/sources/gambas3/gb.desktop/src'
> > /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
> > -D_REENTRANT   -pipe
> > -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os  -MT 
> > gb_desktop_la-main.lo
> > -MD -MP -MF .deps/gb_desktop_la-main.Tpo -c -o gb_desktop_la-main.lo `test 
> > -f 'main.c' || echo
> > './'`main.c
> > libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pipe -Wall 
> > -Wno-unused-value
> > -fsigned-char -fvisibility=hidden -g -ggdb -Os -MT gb_desktop_la-main.lo 
> > -MD -MP -MF
> > .deps/gb_desktop_la-main.Tpo -c main.c  -fPIC -DPIC -o 
> > .libs/gb_desktop_la-main.o
> > In file included from main.c:26:0:
> > x11.h:27:22: fatal error: X11/Xlib.h: No such file or directory
> > compilation terminated.
> >
> > Yes! I never had any X on this machine (unlike on the old one where 
> > everything got compiled).
> > Shouldn't the component be disabled by the configure script when required 
> > headers are not found?
> >
> > Regards,
> > Tobi
> >
> 
> I fixed things in the configuration process in revision #4815. Can you 
> try it? It should correctly disable gb.desktop there X11 is not there.
> 
> -- 
> Benoît Minisini
> 
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

Yes, disables now.

Regards,
Tobi

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] rev. 4815 - "Extern" doesn't work ?

2012-06-09 Thread Benoît Minisini
Le 09/06/2012 15:53, Benoît Minisini a écrit :
> Le 09/06/2012 14:06, Ru Vuott a écrit :
>> I feel that I can no longer invoke external functions contained in
>> libraries.
>> In fact all my programs, that contain calls to external functions by
>> Extern, now they return to me - on the line where there is the
>> external function call - the error: "Illegal function" ! :-O
>>
>> Can you control it ?
>>
>> Regards
>>
>> P.S.: My updated: rev 4815
>>
>
> I confirm. I will look at it...
>

OK, fixed in revision #4817.

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Bruce
On Sat, 2012-06-09 at 13:51 +0100, jm wrote:
> On Sat, 2012-06-09 at 02:45 +0300, Jussi Lahtinen wrote:
> > Maybe I'm just too tired, but I don't understand the point.

Jussi, maybe I'm just too old as well as tired, but I can't grasp the
point of taking an object oriented language and trying to jam an old
(albeit well tested) non-OO concept into it.

Joe, I am having some degree of trouble really understanding your value
proposition. Especially the last post (which I have snipped in entirety,
sorry). All I can grasp from reading it several times is that you feel
that #include has some productivity value in providing what we call
inheritance and polymorphism.

I am not trying to put you down but I really can't grasp the ideas of
"thousands" of parameters and "hundreds" of initialisations.  

{ We, here at paddys-hill have tens of clients (well a few tens anyway )
that use a dozen or so applications, the code base encompasses around
two hundred or so classes and modules organized into around thirty
components and libraries.  The total code size is less than 25,000 lines
and I would guess that probably 60% or more of that is comments. At a
guess, the "largest" method calls would be 7 parameters, and they are
just convenience calls to a class constructor.  By far the "largest"
chunk of code is a library that downloads the text of around 40 web
pages a day (about 40,000 text lines), parses them, normalises them and
uploads them to the central database. I just checked and it's 6345 lines
of code, so about 2400 working lines, which are mainly involved in text
parsing (things like discerning "Mac Donald" and "MacDonald" or "Miss
Jane O'Donnel" and "Ms Jan ODonnell" are the same names). The primary
application that uses this library runs once a day and adds about 1200
rows to a central postgresql database and can update anywhere between 2
and 10,000 other rows.  It takes "about" 10 minutes.  The central
database has just over 3.2 million rows, the clients each have a
sub-mirrored database of who-knows-what size.}

Anyway, I hope you can see from the above {} that those numbers you are
using are fairly un-emotive to the reader.  

regards
Bruce




--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Jussi Lahtinen
Thinking more closely your problem, I think I know what you need.

You try to avoid writing *many* lines like this;
sParameterNameArray = NEW String[MAXIMUM_CSV_PARAMETERS]

That is caused by broken object design, usually because you need to use old
code which had different approach than OO.
I have had same problems.

I attached my suggestion how to implement this
(IncludeProblem-0.0.1.tar.gz).
Is it working solution?

Jussi





On 9 June 2012 16:18, Jussi Lahtinen  wrote:

>
> C thrives on #include without showing signs of design problems.
>>
>
> Yes, I know, I wasn't talking about C, I was talking about object oriented
> language, Gambas.
>
>
>
>
>> Tens of thousands of external lines of code can be pulled in with
>> a dozen #include statements, leaving the code completely manageable,
>> readable and a lot more powerful than any other competing method.
>>
>
> Yes, but you use #include with libraries, not with programs that aren't
> designed for that.
> Or you have design problem.
>
>
>
> For example, in module_a.module you might have
>>
>>...
>>
>>
>> and in a file called initialise_csv_variables.include it would contain:
>>
>>  PRIVATE WordMarker1 AS Integer
>>  :
>>  '200 further variable declarations and initialisations
>>  :
>>  PRIVATE sParameterNameArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
>>  PRIVATE sParameterValueArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
>>
>> The #include files can contain any amount of well trodden
>> proven gambas code which is maintained in only one file.
>>
>
> So, basically you would add module/class called initialise_csv_variables,
> and you use that module/class in modules a and b.
>
>
>
>
>> I will argue that adding C like #include functionality saves a ton of
>> work in mega programs which are already working well, but now
>> needs to be expanded even further.
>>
>
> I don't understand how.
> You would still need to write that initialise_csv_variables.include file,
> you could as well write it as module/class.
>
> Jussi
>
>
>


IncludeProblem-0.0.1.tar.gz
Description: GNU Zip compressed data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] rev. 4815 - "Extern" doesn't work ?

2012-06-09 Thread Benoît Minisini
Le 09/06/2012 14:06, Ru Vuott a écrit :
> I feel that I can no longer invoke external functions contained in libraries.
> In fact all my programs, that contain calls to external functions by Extern, 
> now they return to me - on the line where there is the external function call 
> - the error: "Illegal function" !  :-O
>
> Can you control it ?
>
> Regards
>
> P.S.: My updated: rev 4815
>

I confirm. I will look at it...

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Configuration issue with gb.desktop

2012-06-09 Thread Benoît Minisini
Le 06/06/2012 20:12, tobi a écrit :
> Hi,
>
> I just moved to a new machine and tried to compile gambas3 again. On make, I 
> get with gb.desktop:
>
> make[5]: Entering directory `/home/woodap/sources/gambas3/gb.desktop/src'
> /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
> -D_REENTRANT   -pipe
> -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os  -MT 
> gb_desktop_la-main.lo
> -MD -MP -MF .deps/gb_desktop_la-main.Tpo -c -o gb_desktop_la-main.lo `test -f 
> 'main.c' || echo
> './'`main.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pipe -Wall 
> -Wno-unused-value
> -fsigned-char -fvisibility=hidden -g -ggdb -Os -MT gb_desktop_la-main.lo -MD 
> -MP -MF
> .deps/gb_desktop_la-main.Tpo -c main.c  -fPIC -DPIC -o 
> .libs/gb_desktop_la-main.o
> In file included from main.c:26:0:
> x11.h:27:22: fatal error: X11/Xlib.h: No such file or directory
> compilation terminated.
>
> Yes! I never had any X on this machine (unlike on the old one where 
> everything got compiled).
> Shouldn't the component be disabled by the configure script when required 
> headers are not found?
>
> Regards,
> Tobi
>

I fixed things in the configuration process in revision #4815. Can you 
try it? It should correctly disable gb.desktop there X11 is not there.

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gridview keypress question

2012-06-09 Thread Benoît Minisini
Le 06/06/2012 13:29, Richard Terry a écrit :
> Hi List,
>
> I've got a grid with several columns.
>
> If I use the arrow keys, then the grid focus moves up/down or to the
> next/previous column.
>
> I want to over-ride this keypress behaviour, but can't manage it.
>
> If iI even try and detect a keypress n this event, nothing happens
>
> public Sub  Gridview1_Keypress()
>
>   print key.code
>
> end
>
> I''ve looked at the properties and can't seem to find one which will
> allow me to over-ride this behaviour.
> Probably something dumb I'm not seeing.
>
> Any help appreciated.
>

Yep. The problem comes from the Gambas GUi events internal design.

The GridView control is a compound control written in Gambas. 
Consequently, it will see the keyboard events *before* the GridView user.

For native controls, this is the contrary: you get its keyboard events 
before it handles them.

I don't know if I will be able to have the same behaviour in the two 
cases. But I will try. :-)

If you can't wait, there is a workaround: using an Observer on the 
GridView internal ScrollArea to catch the keyboard events before the 
GridView sees them. That way:

MyObserver = New Observer(MyGridView.Children[0]) As "MyGridViewObserver"

...

Public Sub MyGridViewObserver_KeyPress
...
End

Tell me if that workaround actually works.

Regards,

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Window position error on applying stored "geometry"

2012-06-09 Thread Benoît Minisini
Le 08/06/2012 03:34, RICHARD WALKER a écrit :
> That certainly took longer than it should, but I have finally managed
> to get revision #4809 built and manually installed (at least I have a
> menu entry and the desktop icon for the ide has revealed itself) and I
> have tested my test-bed project in a real dual monitor setup (and in
> the pseudo-xinerama Xephyr window), and it works everywhere!
>
> Thank you, Benoît, for the fix. May I ask where the problem was found?
> I would very much like to have a go at patching the Gambas3
> distributed by Mageia and maybe get it into a Mageia bug-fix update.
>
> Richard
>

Gambas 3.2 will be released soon, so maybe it is not worth it?

The bug was in gb.gtk. I misunderstood the GDK functions about monitors 
& screens and how the full screen size must be computed. Now gb.gtk and 
gb.qt4 should behave the same.

Regards,

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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

2012-06-09 Thread Benoît Minisini
Le 05/06/2012 21:06, Jussi Lahtinen a écrit :
> Yes.
> My project is pretty huge.
>
> Jussi
>

OK. In revision #4816, you can define the GB_PROFILE_MAX environment 
variable with the maximum profile file size, in megabytes.

The maximum value is 4096 Mb. I hope it will be enough!

Regards,

-- 
Benoît Minisini

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Jussi Lahtinen
> C thrives on #include without showing signs of design problems.
>

Yes, I know, I wasn't talking about C, I was talking about object oriented
language, Gambas.




> Tens of thousands of external lines of code can be pulled in with
> a dozen #include statements, leaving the code completely manageable,
> readable and a lot more powerful than any other competing method.
>

Yes, but you use #include with libraries, not with programs that aren't
designed for that.
Or you have design problem.



For example, in module_a.module you might have
>
>...
>
> and in a file called initialise_csv_variables.include it would contain:
>
>  PRIVATE WordMarker1 AS Integer
>  :
>  '200 further variable declarations and initialisations
>  :
>  PRIVATE sParameterNameArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
>  PRIVATE sParameterValueArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
>
> The #include files can contain any amount of well trodden
> proven gambas code which is maintained in only one file.
>

So, basically you would add module/class called initialise_csv_variables,
and you use that module/class in modules a and b.




> I will argue that adding C like #include functionality saves a ton of
> work in mega programs which are already working well, but now
> needs to be expanded even further.
>

I don't understand how.
You would still need to write that initialise_csv_variables.include file,
you could as well write it as module/class.

Jussi
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread jm
On Sat, 2012-06-09 at 02:45 +0300, Jussi Lahtinen wrote:
> Maybe I'm just too tired, but I don't understand the point.
> 
> If you have huge program that needs to be expended just a little bit,
> then why don't you just add new class/module/piece of code/etc which holds
> that new thing to the program?
> 
> Or if you need something from the program like "#include yourmodule" then
> just write "yourmodule.whateveryouneed".
> 
> This sounds more like design problem of the code, than limitation of Gambas.
> 
> Jussi
> 
> 

C thrives on #include without showing signs of design problems.
Tens of thousands of external lines of code can be pulled in with
a dozen #include statements, leaving the code completely manageable,
readable and a lot more powerful than any other competing method.

The nearest competing method is use of modules and classes but these
are nowhere near as powerful for the simple reason explained previously
which is that large versions of these objects cannot be initialised
without expending large amounts of effort at initialising them.

For example, in module_a.module you might have

  PRIVATE CONST MAXIMUM_CSV_PARAMETERS AS Integer = 100
  PRIVATE WordMarker1 AS Integer
  :
  '200 further variable declarations and initialisations
  :
  PRIVATE sParameterNameArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
  PRIVATE sParameterValueArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
  '
  'add more code specific to module_a

In module_b.module you might have

  PRIVATE CONST MAXIMUM_CSV_PARAMETERS AS Integer = 300
  PRIVATE WordMarker1 AS Integer
  :
  '200 further variable declarations and initialisations
  :
  PRIVATE sParameterNameArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
  PRIVATE sParameterValueArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
  '
  'add more code specific to module_b


It would be simpler to have C like # include to increase
the programming power. So in module_a.module the program would
read like a C #include:

  PRIVATE CONST MAXIMUM_CSV_PARAMETERS AS Integer = 100
  #include "initialise_csv_variables.include"
  '
  'add more code specific to module_a

and in module_b.module it would read: 

  PRIVATE CONST MAXIMUM_CSV_PARAMETERS AS Integer = 300
  #include "initialise_csv_variables.include"
  '
  'add more code specific to module_b


and in a file called initialise_csv_variables.include it would contain:

  PRIVATE WordMarker1 AS Integer
  :
  '200 further variable declarations and initialisations
  :
  PRIVATE sParameterNameArray AS NEW String[MAXIMUM_CSV_PARAMETERS]
  PRIVATE sParameterValueArray AS NEW String[MAXIMUM_CSV_PARAMETERS]

The #include files can contain any amount of well trodden
proven gambas code which is maintained in only one file.

I will argue that adding C like #include functionality saves a ton of
work in mega programs which are already working well, but now
needs to be expanded even further.


Any chance of sneaking in this productivity enhancing feature? :-)


> 
> 
> On 9 June 2012 01:16, jm  wrote:
> 
> > C like #include files for gambas?
> >
> > Sounds a bit harsh I know, but is it possible to add a feature
> > that functions like a C #include?
> >
> > The logic behind is to address programs that are growing
> > out of control in size. These are working megalithic programs that
> > have had years of code piled on top of other code.
> > The code has lost none of their lustre and needs to be
> > expanded even more and that bit is being held up
> > by this issue:
> >
> > If I break down programs into modules, then there is a huge
> > overhead in passing parameters.
> >
> > If I break it down into classes, there is still a huge overhead
> > in setting up classes and passing data around.
> >
> > These are programs that require hundred(s) of parameters to be
> > set up if they are to pass data around to do one simple thing
> > correctly.
> >
> > I have no problems doing it, but its boring and now becoming
> > prone to mistakes in the way the parameters are being set up,
> > and the order in which objects are being created.
> > It is difficult to keep track of thousands of things at the
> > same time.
> >
> > So I was thinking, it would be better to allow gambas programs
> > to grow in size to reduce the number of different ways the
> > objects are set up. But that is fatal, because you just can't find stuff
> > quickly enough when you got tens of thousands of lines.
> >
> > I also program in C, and #include is a common way to
> > pull in stuff from all over the place. It is a way to
> > pull in mega numbers of .h and .c program files from all over the place
> > and make a huge program without actually writing uneditable huge
> > programs.
> >
> > The individual .c and .h programs make life so easy to debug
> > and mix and match files as you need it by using a #include
> > at the time and place you need it.
> > Each of the .h and .c programs are separately maintained.
> > Because there is only one .h file or one .c file,
> > there is never any mistakes during duplica

Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread Jussi Lahtinen
Maybe you need to use Export?
http://gambasdoc.org/help/lang/export?v3

Jussi



On 9 June 2012 01:16, jm  wrote:

> C like #include files for gambas?
>
> Sounds a bit harsh I know, but is it possible to add a feature
> that functions like a C #include?
>
> The logic behind is to address programs that are growing
> out of control in size. These are working megalithic programs that
> have had years of code piled on top of other code.
> The code has lost none of their lustre and needs to be
> expanded even more and that bit is being held up
> by this issue:
>
> If I break down programs into modules, then there is a huge
> overhead in passing parameters.
>
> If I break it down into classes, there is still a huge overhead
> in setting up classes and passing data around.
>
> These are programs that require hundred(s) of parameters to be
> set up if they are to pass data around to do one simple thing
> correctly.
>
> I have no problems doing it, but its boring and now becoming
> prone to mistakes in the way the parameters are being set up,
> and the order in which objects are being created.
> It is difficult to keep track of thousands of things at the
> same time.
>
> So I was thinking, it would be better to allow gambas programs
> to grow in size to reduce the number of different ways the
> objects are set up. But that is fatal, because you just can't find stuff
> quickly enough when you got tens of thousands of lines.
>
> I also program in C, and #include is a common way to
> pull in stuff from all over the place. It is a way to
> pull in mega numbers of .h and .c program files from all over the place
> and make a huge program without actually writing uneditable huge
> programs.
>
> The individual .c and .h programs make life so easy to debug
> and mix and match files as you need it by using a #include
> at the time and place you need it.
> Each of the .h and .c programs are separately maintained.
> Because there is only one .h file or one .c file,
> there is never any mistakes during duplication.
>
> If gambas supported #include, it would be possible
> to use #include to pull in variable declarations,
> and snippets of well trodden code as needed without having
> to copy and paste that would otherwise end up with numerous copies
> of similar code. Instead there will be just a couple
> of files that gets pulled in as needed with a #include.
>
> Any chance of sneaking in this productivity enhancing feature? :-)
>
>
>
>
> __
> This message has been checked for viruses and spam by Corpex using
> the ArmourPlate Anti Virus and Anti Spam Scanning Service.
> To find out more and see our email archiving service see
> http://www.armourplate.com or call Corpex on UK 0845 050 1898.
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] rev. 4815 - "Extern" doesn't work ?

2012-06-09 Thread Ru Vuott
I feel that I can no longer invoke external functions contained in libraries.
In fact all my programs, that contain calls to external functions by Extern, 
now they return to me - on the line where there is the external function call - 
the error: "Illegal function" !  :-O

Can you control it ?

Regards

P.S.: My updated: rev 4815

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] C like #include for Gambas

2012-06-09 Thread fire666

well in gambas you can include differently afaik

try turning on and off: project --> properties --> components
if you don't have some turned on you can't do some stuff


jm-24 wrote:
> 
> C like #include files for gambas?
> 
> Sounds a bit harsh I know, but is it possible to add a feature
> that functions like a C #include?
> 
> The logic behind is to address programs that are growing
> out of control in size. These are working megalithic programs that
> have had years of code piled on top of other code.
> The code has lost none of their lustre and needs to be
> expanded even more and that bit is being held up
> by this issue:
> 
> If I break down programs into modules, then there is a huge
> overhead in passing parameters.
> 
> If I break it down into classes, there is still a huge overhead
> in setting up classes and passing data around.
> 
> These are programs that require hundred(s) of parameters to be
> set up if they are to pass data around to do one simple thing
> correctly.
> 
> I have no problems doing it, but its boring and now becoming
> prone to mistakes in the way the parameters are being set up,
> and the order in which objects are being created.
> It is difficult to keep track of thousands of things at the
> same time.
> 
> So I was thinking, it would be better to allow gambas programs
> to grow in size to reduce the number of different ways the
> objects are set up. But that is fatal, because you just can't find stuff
> quickly enough when you got tens of thousands of lines.
> 
> I also program in C, and #include is a common way to
> pull in stuff from all over the place. It is a way to
> pull in mega numbers of .h and .c program files from all over the place
> and make a huge program without actually writing uneditable huge
> programs.
> 
> The individual .c and .h programs make life so easy to debug
> and mix and match files as you need it by using a #include
> at the time and place you need it.
> Each of the .h and .c programs are separately maintained.
> Because there is only one .h file or one .c file,
> there is never any mistakes during duplication.
> 
> If gambas supported #include, it would be possible
> to use #include to pull in variable declarations,
> and snippets of well trodden code as needed without having
> to copy and paste that would otherwise end up with numerous copies
> of similar code. Instead there will be just a couple
> of files that gets pulled in as needed with a #include.
> 
> Any chance of sneaking in this productivity enhancing feature? :-)
> 
> 
> 
> __
> This message has been checked for viruses and spam by Corpex using
> the ArmourPlate Anti Virus and Anti Spam Scanning Service.
> To find out more and see our email archiving service see
> http://www.armourplate.com or call Corpex on UK 0845 050 1898.
> 
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: 
http://old.nabble.com/C-like--include-for-Gambas-tp33984378p33985552.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user