Re: [Gambas-user] Small printing question

2012-05-21 Thread Johny Provoost


Op 20-05-12 23:26, Fabien Bodard schreef:
> A simple gb.report example
>
>
>

Thanks Fabien,
I was looking for something like that with some colons and had not 
figured it out yet (not constant busy with it).  It save me some research.
No we can go on (that was the last 5%  :>))


Johny Provoost

--
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] Small printing question

2012-05-21 Thread Fabien Bodard
2012/5/21 Johny Provoost 

>
>
> Op 20-05-12 23:26, Fabien Bodard schreef:
> > A simple gb.report example
> >
> >
> >
>
> Thanks Fabien,
> I was looking for something like that with some colons and had not
> figured it out yet (not constant busy with it).  It save me some research.
> No we can go on (that was the last 5%  :>))
>
>
>
Can you send me, a pdf or a picture with the report you want to obtain ?  I
need all ideas possible to improve the gb.report component.



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



-- 
Fabien Bodard
--
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] How to run a webpage?

2012-05-21 Thread Алексей Беспалов
Hi!
I'm trying to study the work of Gambas weppage (ASP like syntax).

I run a test page and get a working html file.

$ Webpage1.webpage > Webpage1.html

Webpage1.html opens in browser successfully.

How should I configure Apache to work Webpage1.webpage?
May you have ready conf files or instruction?

-- 

Regards Alex.
--
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] DrawingArea not drawn under qt4

2012-05-21 Thread Benoît Minisini
Le 21/05/2012 08:39, Rolf-Werner Eilert a écrit :
> Last afternoon I downloaded and installed the latest trunk version of
> Gambas3 to see if my qt4 DrawingArea problem has been solved.
>
> It has not :-( I still don't see anything drawn on the DrawingArea when
> under KDE4.
>
> So, this is why I ask everyone again: Does anyone here have any problems
> with a DrawingArea under qt4?
>
> I use KDE4 on a 32 bit and on a 64 bit Suse 12.1, and both show the same
> error. There are different graphics card drivers, different graphics
> systems, so this cannot be the reason.
>
> Under LxDE for instance it runs flawlessly, so the GTK side is ok.
>
> Any ideas?
>
> Rolf
>

Do you have some code that reproduces the problem?

Which widget theme do you use?

-- 
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] How to run a webpage?

2012-05-21 Thread Benoît Minisini
Le 21/05/2012 13:21, Алексей Беспалов a écrit :
> Hi!
> I'm trying to study the work of Gambas weppage (ASP like syntax).
>
> I run a test page and get a working html file.
>
> $ Webpage1.webpage>  Webpage1.html
>
> Webpage1.html opens in browser successfully.
>
> How should I configure Apache to work Webpage1.webpage?
> May you have ready conf files or instruction?
>

You must create an executable from your project. This executable must be 
run as a CGI script on your web browser. Search the Apache documentation 
to learn how to install an executable as a CGI script.

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] How to run a webpage?

2012-05-21 Thread Fabien Bodard
2012/5/21 Benoît Minisini 

> Le 21/05/2012 13:21, Алексей Беспалов a écrit :
> > Hi!
> > I'm trying to study the work of Gambas weppage (ASP like syntax).
> >
> > I run a test page and get a working html file.
> >
> > $ Webpage1.webpage>  Webpage1.html
> >
> > Webpage1.html opens in browser successfully.
> >
> > How should I configure Apache to work Webpage1.webpage?
> > May you have ready conf files or instruction?
> >
>
> You must create an executable from your project. This executable must be
> run as a CGI script on your web browser. Search the Apache documentation
> to learn how to install an executable as a CGI script.
>

you can use lighttpd too it's a good, fast and easy to configure http
server

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



-- 
Fabien Bodard
--
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] Gambas2 prog Circular Reference

2012-05-21 Thread Jussi Lahtinen
Without source code, it's pretty much impossible to say.
That error message should specify the object involved..?

Benoit,
I'm not sure this is related, but at least there is bug how to handle
circular references.
See attached project.

Jussi






On Mon, May 21, 2012 at 9:32 AM, Rolf-Werner Eilert <
eilert-sprac...@t-online.de> wrote:

> This weekend I came about this one:
>
> On my new server (Suse 12.1 64 bit), all Gambas2 programs we are using
> here are running flawlessly, only one of them gives a "Circular
> Reference" message and stops. It even seems not to start at all, but I
> guess it does start and is shot dead before any window can appear.
>
> Lacking any further information, where would you start to look for the
> reason?
>
> Thanks for your ideas!
>
> Rolf
>
>
> --
> 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
>


CRbug-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] Gambas2 prog Circular Reference

2012-05-21 Thread Jussi Lahtinen
Sorry, this was on Gambas 3 rev 4745 @ Xubuntu 12.04 64bit.

Jussi



On Mon, May 21, 2012 at 5:45 PM, Jussi Lahtinen wrote:

> Without source code, it's pretty much impossible to say.
> That error message should specify the object involved..?
>
> Benoit,
> I'm not sure this is related, but at least there is bug how to handle
> circular references.
> See attached project.
>
> Jussi
>
>
>
>
>
>
>
> On Mon, May 21, 2012 at 9:32 AM, Rolf-Werner Eilert <
> eilert-sprac...@t-online.de> wrote:
>
>> This weekend I came about this one:
>>
>> On my new server (Suse 12.1 64 bit), all Gambas2 programs we are using
>> here are running flawlessly, only one of them gives a "Circular
>> Reference" message and stops. It even seems not to start at all, but I
>> guess it does start and is shot dead before any window can appear.
>>
>> Lacking any further information, where would you start to look for the
>> reason?
>>
>> Thanks for your ideas!
>>
>> Rolf
>>
>>
>> --
>> 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] Gambas2 prog Circular Reference

2012-05-21 Thread Rolf-Werner Eilert
Hi Jussi,

just being alone in the office, I shut down the server, replugged the HD 
and started the new one to try it and tell you what it was.

You guess what? Everything ran as expected, no circular reference 
anymore... No idea what had caused this...

Sorry for the noise.

Rolf

Am 21.05.2012 16:45, schrieb Jussi Lahtinen:
> Without source code, it's pretty much impossible to say.
> That error message should specify the object involved..?
>
> Benoit,
> I'm not sure this is related, but at least there is bug how to handle
> circular references.
> See attached project.
>
> Jussi
>
>
>
>
>
>
> On Mon, May 21, 2012 at 9:32 AM, Rolf-Werner Eilert<
> eilert-sprac...@t-online.de>  wrote:
>
>> This weekend I came about this one:
>>
>> On my new server (Suse 12.1 64 bit), all Gambas2 programs we are using
>> here are running flawlessly, only one of them gives a "Circular
>> Reference" message and stops. It even seems not to start at all, but I
>> guess it does start and is shot dead before any window can appear.
>>
>> Lacking any further information, where would you start to look for the
>> reason?
>>
>> Thanks for your ideas!
>>
>> Rolf
>>
>>
>> --
>> 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


--
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-05-21 Thread Christer Johansson

Sounds like a great addition, looking forward to test it!

/CJ

> -Original Message-
> From: Benoît Minisini [mailto:gam...@users.sourceforge.net]
> Sent: Saturday, May 19, 2012 1:58 PM
> To: mailing list for gambas users
> Subject: [Gambas-user] New feature in Gambas 3
>
>
> Hi,
>
> I have just added the ability to profile a project from the IDE.
>
> This is not finished yet. At the moment, the IDE will tell
> you how much
> time you spend in each function, and, for each function, how
> much time
> is spent in other functions called from it.
>
> Next, I will try to profile each line of code.
>
> I hope it will help to optimize your projects!
>
> 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] Two bugs/issues noted

2012-05-21 Thread Christer Johansson
Thanks for clarifying...

Was you or toni able to reproduce the wierd issue with
Shell "clear" Wait on your end?

/CJ

> -Original Message-
> From: Benoît Minisini [mailto:gam...@users.sourceforge.net]
> Sent: Saturday, May 19, 2012 2:03 PM
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] Two bugs/issues noted
>
>
> Le 14/05/2012 12:00, Christer Johansson a écrit :
> >
> > Noted some issues last night...
> >
> > First one is with Date(now). If assigned to a variable (or
> printed) it
> > adds placeholders for time as zeroes like...
> >
> >05/14/2012 00:00:00
> >
>
> As for that, this is a bug fix. A date is a Date value with
> the time set
> to zero. The default date to string conversion now do not
> strip the time
> anymore if it is zero.
>
> If you need to print the date only, you have to use the
> Format$() function.
>
> Note that there is no predefined format for just printing the
> date part
> with Format$(). This is a bug that I should fix.
>
> 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] Rev 4751 doesn't compile

2012-05-21 Thread Benoît Minisini
Le 21/05/2012 18:49, Jussi Lahtinen a écrit :
> /usr/local/bin/gbi3: symbol lookup error: /usr/local/lib/gambas3/gb.gtk.so:
> undefined symbol: _ZN12gApplication16onLeaveEventLoopE
>
> Logs attached.
>
>
> Jussi
>

Oops, fixed in revision #4752.

-- 
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] Two bugs/issues noted

2012-05-21 Thread Benoît Minisini
Le 14/05/2012 12:00, Christer Johansson a écrit :
>
>
> Second is regarding the Shell command. If I execute the following
> code on my NAS nothing happens, same code works OK in Xubuntu running
> on x86...
>
>...
>Shell "clear" Wait
>...
>
> Simple repro code for both issues in attachement.
>

I confirm that it works on my Ubuntu/x86_64. What is your NAS?

-- 
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] Two bugs/issues noted

2012-05-21 Thread Christer Johansson

NAS is running Debian Lenny @ ARM.

/CJ

> -Original Message-
> From: Benoît Minisini [mailto:gam...@users.sourceforge.net]
> Sent: Monday, May 21, 2012 7:05 PM
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] Two bugs/issues noted
>
>
> Le 14/05/2012 12:00, Christer Johansson a écrit :
> >
> >
> > Second is regarding the Shell command. If I execute the following
> > code on my NAS nothing happens, same code works OK in
> Xubuntu running
> > on x86...
> >
> >...
> >Shell "clear" Wait
> >...
> >
> > Simple repro code for both issues in attachement.
> >
>
> I confirm that it works on my Ubuntu/x86_64. What is your NAS?
>
> --
> 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


[Gambas-user] Shell with wait does not wait till work complettion

2012-05-21 Thread sundar j
In my application I need to copy folder content to other folder using shell cp 
command (since gambas does not support COPY recurse) with wait option. When 
copying is in progress TextLabel will indicate "Copy in Progress" .  Once 
copying is complete then TextLable will indicate something else. For some 
reason wait option in shell command does nothing and I am not able to set the 
text   "Copy in Progress" in TextLabel properly. Is it bug or am I missing 
some code?
--
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] Shell with wait does not wait till work complettion

2012-05-21 Thread tobi
On Mon, 21 May 2012, sundar j wrote:
> In my application I need to copy folder content to other folder using shell 
> cp command (since gambas does not support COPY recurse) with wait option. 
> When copying is in progress TextLabel will indicate "Copy in Progress" 
> .  Once copying is complete then TextLable will indicate something else. 
> For some reason wait option in shell command does nothing and I am not able 
> to set the text   "Copy in Progress" in TextLabel properly. Is it bug or 
> am I missing some code?
> --
> 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

What do you mean by "wait option [...] does nothing"? Does the shell give an 
error?
I assume that you have something like:

TextLabel.Text = "Copy in progress"
Shell "cp -r  " Wait

If I remember correctly, using this construct prevents the GUI from refreshing 
itself, so you won't
see anything until the command completes and a new event loop is entered?

I think one could help better with more information.

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 4751 doesn't compile

2012-05-21 Thread Jussi Lahtinen
Works now, thanks!

Jussi



On Mon, May 21, 2012 at 8:01 PM, Benoît Minisini <
gam...@users.sourceforge.net> wrote:

> Le 21/05/2012 18:49, Jussi Lahtinen a écrit :
> > /usr/local/bin/gbi3: symbol lookup error: /usr/local/lib/gambas3/
> gb.gtk.so:
> > undefined symbol: _ZN12gApplication16onLeaveEventLoopE
> >
> > Logs attached.
> >
> >
> > Jussi
> >
>
> Oops, fixed in revision #4752.
>
> --
> 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] New feature in Gambas 3

2012-05-21 Thread Jussi Lahtinen
Is it possible to have separated start and stop buttons for the profiler?

I have huge project and when it starts it goes through pretty long
initialization (wait loops, pre-computed values, etc),
and I'm really only interested to optimize certain parts of the run.

Right now the interesting part is flooded with uninteresting data and the
initialization is slowed down for nothing,
so analyzing the data is bit inconvenient.

Profiler is already very useful, so this is not big deal...

Jussi





On Sat, May 19, 2012 at 2:58 PM, Benoît Minisini <
gam...@users.sourceforge.net> wrote:

> Hi,
>
> I have just added the ability to profile a project from the IDE.
>
> This is not finished yet. At the moment, the IDE will tell you how much
> time you spend in each function, and, for each function, how much time
> is spent in other functions called from it.
>
> Next, I will try to profile each line of code.
>
> I hope it will help to optimize your projects!
>
> 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] New feature in Gambas 3

2012-05-21 Thread Benoît Minisini
Le 21/05/2012 20:39, Jussi Lahtinen a écrit :
> Is it possible to have separated start and stop buttons for the profiler?
>
> I have huge project and when it starts it goes through pretty long
> initialization (wait loops, pre-computed values, etc),
> and I'm really only interested to optimize certain parts of the run.
>
> Right now the interesting part is flooded with uninteresting data and the
> initialization is slowed down for nothing,
> so analyzing the data is bit inconvenient.
>
> Profiler is already very useful, so this is not big deal...
>
> Jussi
>

It is a big deal. :-)

If I make a System.Profiler boolean property to activate / deactivate 
the profiler directly from code, will it fit your needs?

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


[Gambas-user] Fw: Shell with wait does not wait till work complettion

2012-05-21 Thread sundar j

TextLabel.Text = "Copy in progress"

Shell "cp -r  " Wait
TextLabel.Text = "Completed."

I used above code in my application. Shell indicated that all files are being 
copied one-by-one. But TextLable did not display Copy in progress. I did lot of 
experiment with the above code. Finaly i got it working by adding time delay 
just before shell command. Now my code looks like this :-

TextLabel.Text = "Copy in progress"
wait 0.1

Shell "cp -r  " Wait

TextLabel.Text = "Completed."

I really have no clue  why code worked after inserting time delay. 

From: tobi 
Sent: Mon, 21 May 2012 23:40:35 
To: sundar_...@rediffmail.com, mailing list for gambas users 

Subject: Re: [Gambas-user] Shell with wait does not wait till work complettion
On Mon, 21 May 2012, sundar j wrote:

> In my application I need to copy folder content to other folder using 
shell cp command (since gambas does not support COPY recurse) with wait option. 
When copying is in progress TextLabel will indicate "Copy in Progress" 
.  Once copying is complete then TextLable will indicate something 
else. For some reason wait option in shell command does nothing and I am not 
able to set the text  "Copy in Progress" in TextLabel properly. Is it 
bug or am I missing some code?

> 
--

> 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



What do you mean by "wait option [...] does nothing"? Does the shell give an 
error?

I assume that you have something like:



TextLabel.Text = "Copy in progress"

Shell "cp -r  " Wait



If I remember correctly, using this construct prevents the GUI from refreshing 
itself, so you won't

see anything until the command completes and a new event loop is entered?



I think one could help better with more information.



Regards,

Tobi



Follow Rediff Deal ho jaye! to get exciting offers in your city 
everyday.
--
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] Fw: Shell with wait does not wait till work complettion

2012-05-21 Thread tobi
On Mon, 21 May 2012, sundar j wrote:
> 
> TextLabel.Text = "Copy in progress"
> 
> Shell "cp -r  " Wait
> TextLabel.Text = "Completed."
> 
> I used above code in my application. Shell indicated that all files are being 
> copied one-by-one. But TextLable did not display Copy in progress. I did lot 
> of experiment with the above code. Finaly i got it working by adding time 
> delay just before shell command. Now my code looks like this :-
> 
> TextLabel.Text = "Copy in progress"
> wait 0.1
> 
> Shell "cp -r  " Wait
> 
> TextLabel.Text = "Completed."
> 
> I really have no clue  why code worked after inserting time delay. 
> 

For public again:

Actually, it does not depend on the *delay*. If you use the WAIT instruction, 
the interpreter
re-enters its event loop. Only in this loop, changes to the GUI are made 
effective. So just call

Wait

without any parameter so that the interpreter spends only as long there as it 
needs to process all
the pending events and refresh the GUI.
You can read that on: http://www.gambasdoc.org/help/cat/eventloop?v3

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


[Gambas-user] Data Structures like C++

2012-05-21 Thread Demosthenes Koptsis
Basic languages have simple data structures like vars and arrays but 
other languages
like c++ with the help of pointers can have advanced data structures 
like containers etc...

see a full list here
http://en.wikipedia.org/wiki/List_of_data_structures

i wonder if such data structures can be implemented with gambas with 
pointers and if such an action have any mean for real life
applications?

Is it possible to have such data structures in gambas?
How about some of these to be part of the core libraries?


  Abstract data types 

  * Container 
  * Map/Associative array/Dictionary

  * Multimap 
  * List 
  * Set 
  * Multiset

  * Priority queue 
  * Queue 
  * Deque 
  * Stack 
  * String 
  * Tree 
  * Graph 
  * Hash 


--
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] Data Structures like C++

2012-05-21 Thread tobi
On Mon, 21 May 2012, Demosthenes Koptsis wrote:
> Basic languages have simple data structures like vars and arrays but 
> other languages
> like c++ with the help of pointers can have advanced data structures 
> like containers etc...
> 
> see a full list here
> http://en.wikipedia.org/wiki/List_of_data_structures
> 
> i wonder if such data structures can be implemented with gambas with 
> pointers and if such an action have any mean for real life
> applications?
> 
> Is it possible to have such data structures in gambas?
> How about some of these to be part of the core libraries?
> 
> 
>   Abstract data types 
> 
>   * Container 
>   * Map/Associative array/Dictionary
> 
>   * Multimap 
>   * List 
>   * Set 
>   * Multiset
> 
>   * Priority queue 
>   * Queue 
>   * Deque 
>   * Stack 
>   * String 
>   * Tree 
>   * Graph 
>   * Hash 
> 
> 
> --
> 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

When you mean "data structure like [in] C++" you mean those things we can do 
with gambas Objects?

I could make a bunch of the ones listed above from scratch using classes - I 
tend to detest C++ but
I think, the ones above are nothing else? (Maybe gambas lacks templates or 
something)

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] New feature in Gambas 3

2012-05-21 Thread Jussi Lahtinen
Yes, that would be great!

Jussi



On Mon, May 21, 2012 at 10:29 PM, Benoît Minisini <
gam...@users.sourceforge.net> wrote:

> Le 21/05/2012 20:39, Jussi Lahtinen a écrit :
> > Is it possible to have separated start and stop buttons for the profiler?
> >
> > I have huge project and when it starts it goes through pretty long
> > initialization (wait loops, pre-computed values, etc),
> > and I'm really only interested to optimize certain parts of the run.
> >
> > Right now the interesting part is flooded with uninteresting data and the
> > initialization is slowed down for nothing,
> > so analyzing the data is bit inconvenient.
> >
> > Profiler is already very useful, so this is not big deal...
> >
> > Jussi
> >
>
> It is a big deal. :-)
>
> If I make a System.Profiler boolean property to activate / deactivate
> the profiler directly from code, will it fit your needs?
>
> --
> 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] Data Structures like C++

2012-05-21 Thread Emil Lenngren
Hash tables and arrays are already implemented.

The most important missing ones are Multimaps, Sets, Multisets, Linked
lists, Deques.
It should be quite easy to write c++ wrappers and put them in a component.
For example, a Set can use a std::set internally.

Implementing them in Gambas should work, but would be quite slow. I suggest
writing them as a component gb.datastructures or something.

And yes, Gambas lacks templates, but Variants can be used instead. Not
optimal, but it works.

/Emil

2012/5/21 Demosthenes Koptsis 

> Basic languages have simple data structures like vars and arrays but
> other languages
> like c++ with the help of pointers can have advanced data structures
> like containers etc...
>
> see a full list here
> http://en.wikipedia.org/wiki/List_of_data_structures
>
> i wonder if such data structures can be implemented with gambas with
> pointers and if such an action have any mean for real life
> applications?
>
> Is it possible to have such data structures in gambas?
> How about some of these to be part of the core libraries?
>
>
>  Abstract data types  >
>
>  * Container 
>  * Map/Associative array/Dictionary
>
>  * Multimap 
>  * List 
>  * Set 
>  * Multiset
>
>  * Priority queue 
>  * Queue 
>  * Deque 
>  * Stack 
>  * String 
>  * Tree 
>  * Graph 
>  * Hash 
>
>
>
> --
> 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] Data Structures like C++

2012-05-21 Thread Demosthenes Koptsis
Στις 21/5/2012 22:56, ο/η tobi έγραψε:
> On Mon, 21 May 2012, Demosthenes Koptsis wrote:
>> Basic languages have simple data structures like vars and arrays but
>> other languages
>> like c++ with the help of pointers can have advanced data structures
>> like containers etc...
>>
>> see a full list here
>> http://en.wikipedia.org/wiki/List_of_data_structures
>>
>> i wonder if such data structures can be implemented with gambas with
>> pointers and if such an action have any mean for real life
>> applications?
>>
>> Is it possible to have such data structures in gambas?
>> How about some of these to be part of the core libraries?
>>
>>
>>Abstract data types
>>
>>* Container
>>* Map/Associative array/Dictionary
>>  
>>* Multimap
>>* List
>>* Set
>>* Multiset
>>  
>>* Priority queue
>>* Queue
>>* Deque
>>* Stack
>>* String
>>* Tree
>>* Graph
>>* Hash
>>
>>
>> --
>> 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
> When you mean "data structure like [in] C++" you mean those things we can do 
> with gambas Objects?
>
> I could make a bunch of the ones listed above from scratch using classes - I 
> tend to detest C++ but
> I think, the ones above are nothing else? (Maybe gambas lacks templates or 
> something)
>
> 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

i mean to have a Binary Tree or a List with linked pointers etc ...
i think most of them could be objects.



--
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] Data Structures like C++

2012-05-21 Thread Demosthenes Koptsis
Στις 21/5/2012 22:59, ο/η Emil Lenngren έγραψε:
> Hash tables and arrays are already implemented.
>
> The most important missing ones are Multimaps, Sets, Multisets, Linked
> lists, Deques.
> It should be quite easy to write c++ wrappers and put them in a component.
> For example, a Set can use a std::set  internally.
>
> Implementing them in Gambas should work, but would be quite slow. I suggest
> writing them as a component gb.datastructures or something.
>
> And yes, Gambas lacks templates, but Variants can be used instead. Not
> optimal, but it works.
>
> /Emil
>
> 2012/5/21 Demosthenes Koptsis
>
>> Basic languages have simple data structures like vars and arrays but
>> other languages
>> like c++ with the help of pointers can have advanced data structures
>> like containers etc...
>>
>> see a full list here
>> http://en.wikipedia.org/wiki/List_of_data_structures
>>
>> i wonder if such data structures can be implemented with gambas with
>> pointers and if such an action have any mean for real life
>> applications?
>>
>> Is it possible to have such data structures in gambas?
>> How about some of these to be part of the core libraries?
>>
>>
>>   Abstract data types>   * Container
>>   * Map/Associative array/Dictionary
>> 
>>   * Multimap
>>   * List
>>   * Set
>>   * Multiset
>> 
>>   * Priority queue
>>   * Queue
>>   * Deque
>>   * Stack
>>   * String
>>   * Tree
>>   * Graph
>>   * Hash
>>
>>
>>
>> --
>> 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
Yes that i mean !
A library like gb.datastractures if it could be happend !!!

--
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] Data Structures like C++

2012-05-21 Thread tobi
On Mon, 21 May 2012, Demosthenes Koptsis wrote:
> Στις 21/5/2012 22:56, ο/η tobi έγραψε:
> > On Mon, 21 May 2012, Demosthenes Koptsis wrote:
> >> Basic languages have simple data structures like vars and arrays but
> >> other languages
> >> like c++ with the help of pointers can have advanced data structures
> >> like containers etc...
> >>
> >> see a full list here
> >> http://en.wikipedia.org/wiki/List_of_data_structures
> >>
> >> i wonder if such data structures can be implemented with gambas with
> >> pointers and if such an action have any mean for real life
> >> applications?
> >>
> >> Is it possible to have such data structures in gambas?
> >> How about some of these to be part of the core libraries?
> >>
> >>
> >>Abstract data 
> >> types
> >>
> >>* Container
> >>* Map/Associative array/Dictionary
> >>  
> >>* Multimap
> >>* List
> >>* Set
> >>* Multiset
> >>  
> >>* Priority queue
> >>* Queue
> >>* Deque
> >>* Stack
> >>* String
> >>* Tree
> >>* Graph
> >>* Hash
> >>
> >>
> >> --
> >> 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
> > When you mean "data structure like [in] C++" you mean those things we can 
> > do with gambas Objects?
> >
> > I could make a bunch of the ones listed above from scratch using classes - 
> > I tend to detest C++ but
> > I think, the ones above are nothing else? (Maybe gambas lacks templates or 
> > something)
> >
> > 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
> 
> i mean to have a Binary Tree or a List with linked pointers etc ...
> i think most of them could be objects.
> 
> 
> 
> --
> 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

You don't need "pointers" in a C/C++ manner. In Gambas every "Object" is a 
reference:

TreeNode.class:
--8<---
Property Value As Variant
Property Read Parent As TreeNode
Property Read LeftChild As TreeNode
Property Read RightChild As TreeNode

Public Sub _new()
[...]
End

Public Sub CreateChildren()
[...]
End

[...]
--8<---

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

Re: [Gambas-user] Data Structures like C++

2012-05-21 Thread Demosthenes Koptsis
Στις 21/5/2012 22:59, ο/η Emil Lenngren έγραψε:
> Hash tables and arrays are already implemented.
>
> The most important missing ones are Multimaps, Sets, Multisets, Linked
> lists, Deques.
> It should be quite easy to write c++ wrappers and put them in a component.

Can they be implemented as gambas class with gambas pointers?
So they can be extended and be inhereted as base classes for other user 
data structures?



--
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] Data Structures like C++

2012-05-21 Thread Demosthenes Koptsis
Στις 21/5/2012 23:05, ο/η tobi έγραψε:
> On Mon, 21 May 2012, Demosthenes Koptsis wrote:
>> Στις 21/5/2012 22:56, ο/η tobi έγραψε:
>>> On Mon, 21 May 2012, Demosthenes Koptsis wrote:
 Basic languages have simple data structures like vars and arrays but
 other languages
 like c++ with the help of pointers can have advanced data structures
 like containers etc...

 see a full list here
 http://en.wikipedia.org/wiki/List_of_data_structures

 i wonder if such data structures can be implemented with gambas with
 pointers and if such an action have any mean for real life
 applications?

 Is it possible to have such data structures in gambas?
 How about some of these to be part of the core libraries?


 Abstract data 
 types

 * 
 Container
 * Map/Associative array/Dictionary
   
 * Multimap
 * List
 * Set
 * Multiset
   
 * Priority queue
 * Queue
 * Deque
 * Stack
 * String
 * Tree
 * Graph
 * Hash


 --
 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
>>> When you mean "data structure like [in] C++" you mean those things we can 
>>> do with gambas Objects?
>>>
>>> I could make a bunch of the ones listed above from scratch using classes - 
>>> I tend to detest C++ but
>>> I think, the ones above are nothing else? (Maybe gambas lacks templates or 
>>> something)
>>>
>>> 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
>> i mean to have a Binary Tree or a List with linked pointers etc ...
>> i think most of them could be objects.
>>
>>
>>
>> --
>> 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
> You don't need "pointers" in a C/C++ manner. In Gambas every "Object" is a 
> reference:
>
> TreeNode.class:
> --8<---
> Property Value As Variant
> Property Read Parent As TreeNode
> Property Read LeftChild As TreeNode
> Property Read RightChild As TreeNode
>
> Public Sub _new()
> [...]
> End
>
> Public Sub CreateChildren()
> [...]
> End
>
> [...]
> --8<---
>
ok it seems more easier then !


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

Re: [Gambas-user] Data Structures like C++

2012-05-21 Thread Benoît Minisini
Le 21/05/2012 21:51, Demosthenes Koptsis a écrit :
> Basic languages have simple data structures like vars and arrays but
> other languages
> like c++ with the help of pointers can have advanced data structures
> like containers etc...
>
> see a full list here
> http://en.wikipedia.org/wiki/List_of_data_structures
>
> i wonder if such data structures can be implemented with gambas with
> pointers and if such an action have any mean for real life
> applications?
>
> Is it possible to have such data structures in gambas?
> How about some of these to be part of the core libraries?

Some data structures are missing, but not so many as you may think at 
first sight.

If they are implemented, I don't think they will go inside the 
interpreter, to keep its size small (it is already too big for my 
tastes), but in an extern component.

* Map/Associative array/Dictionary
* Hash

Use a Collection in both case. If the key is not a string, you must find 
a way to identify your key with a unique string.

* Multimap

Use a Collection whose values are arrays.

* List

Use an array. Since CPU have now one, two, three... memory caches, 
arrays as almost always faster than linked lists.

* Set

One could use a Collection to emulate it: by transforming a value into a 
string key, we can assume that the value belongs to the set if the 
collection has something associated with the key.

But it would be better to add a Set native class with a native 
implementation (in C. Stop with C++!).

* Multiset

Same remarks (the value is associated to its number of occurence in the 
collection).

* Priority queue

Is it worth having a native implementation for that? I don't think so. A 
implementation in Gambas should be enough.

* Queue
* Deque
* Stack

Use an Array. The Push() and Pop() methods can help.

* String

We have strings of characters. Is something else really needed?

* Tree
* Graph

Native implementation of that would be interesting.

Any volunteer? :-)

-- 
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] Data Structures like C++

2012-05-21 Thread Demosthenes Koptsis
Στις 21/5/2012 23:25, ο/η Benoît Minisini έγραψε:
> Le 21/05/2012 21:51, Demosthenes Koptsis a écrit :
>> Basic languages have simple data structures like vars and arrays but
>> other languages
>> like c++ with the help of pointers can have advanced data structures
>> like containers etc...
>>
>> see a full list here
>> http://en.wikipedia.org/wiki/List_of_data_structures
>>
>> i wonder if such data structures can be implemented with gambas with
>> pointers and if such an action have any mean for real life
>> applications?
>>
>> Is it possible to have such data structures in gambas?
>> How about some of these to be part of the core libraries?
> Some data structures are missing, but not so many as you may think at
> first sight.
>
> If they are implemented, I don't think they will go inside the
> interpreter, to keep its size small (it is already too big for my
> tastes), but in an extern component.
>
> * Map/Associative array/Dictionary
> * Hash
>
> Use a Collection in both case. If the key is not a string, you must find
> a way to identify your key with a unique string.
>
> * Multimap
>
> Use a Collection whose values are arrays.
>
> * List
>
> Use an array. Since CPU have now one, two, three... memory caches,
> arrays as almost always faster than linked lists.
>
> * Set
>
> One could use a Collection to emulate it: by transforming a value into a
> string key, we can assume that the value belongs to the set if the
> collection has something associated with the key.
>
> But it would be better to add a Set native class with a native
> implementation (in C. Stop with C++!).
>
> * Multiset
>
> Same remarks (the value is associated to its number of occurence in the
> collection).
>
> * Priority queue
>
> Is it worth having a native implementation for that? I don't think so. A
> implementation in Gambas should be enough.
>
> * Queue
> * Deque
> * Stack
>
> Use an Array. The Push() and Pop() methods can help.
>
> * String
>
> We have strings of characters. Is something else really needed?
>
> * Tree
> * Graph
>
> Native implementation of that would be interesting.
>
> Any volunteer? :-)
>
i am still learning from a book for c++ (ok i stop! but i study it these 
days sorry:) )
and i dont know if i could write something as gambas class of course, not c.

and i think the dicussiont from now one have to be transferred at dev list.

But i just throw the idea here in user list!

--
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] Data Structures like C++

2012-05-21 Thread tobi
On Mon, 21 May 2012, Benoît Minisini wrote:
> Le 21/05/2012 21:51, Demosthenes Koptsis a écrit :
> > Basic languages have simple data structures like vars and arrays but
> > other languages
> > like c++ with the help of pointers can have advanced data structures
> > like containers etc...
> >
> > see a full list here
> > http://en.wikipedia.org/wiki/List_of_data_structures
> >
> > i wonder if such data structures can be implemented with gambas with
> > pointers and if such an action have any mean for real life
> > applications?
> >
> > Is it possible to have such data structures in gambas?
> > How about some of these to be part of the core libraries?
> 
> Some data structures are missing, but not so many as you may think at 
> first sight.
> 
> If they are implemented, I don't think they will go inside the 
> interpreter, to keep its size small (it is already too big for my 
> tastes), but in an extern component.
> 
> * Map/Associative array/Dictionary
> * Hash
> 
> Use a Collection in both case. If the key is not a string, you must find 
> a way to identify your key with a unique string.
> 
> * Multimap
> 
> Use a Collection whose values are arrays.
> 
> * List
> 
> Use an array. Since CPU have now one, two, three... memory caches, 
> arrays as almost always faster than linked lists.
> 
> * Set
> 
> One could use a Collection to emulate it: by transforming a value into a 
> string key, we can assume that the value belongs to the set if the 
> collection has something associated with the key.
> 
> But it would be better to add a Set native class with a native 
> implementation (in C. Stop with C++!).
> 
> * Multiset
> 
> Same remarks (the value is associated to its number of occurence in the 
> collection).
> 
> * Priority queue
> 
> Is it worth having a native implementation for that? I don't think so. A 
> implementation in Gambas should be enough.
> 
> * Queue
> * Deque
> * Stack
> 
> Use an Array. The Push() and Pop() methods can help.
> 
> * String
> 
> We have strings of characters. Is something else really needed?
> 
> * Tree
> * Graph
> 
> Native implementation of that would be interesting.
> 
> Any volunteer? :-)
> 
> -- 
> 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

Heh... I was once working on reversing the collatz conjecture from a given 
integer - using a
(halfways) binary tree.

Graphs would in fact be interesting to implement but what is to be cleared up 
before anyone could
think about volunteering:
* Are trees restricted to their number of children?
* The same for graphs: restrictions on the number of edges?

The latter, I never used in programming (read of them a bit in mathematics). 
What could they be used
for generally? Representing town maps? :)

--
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] Data Structures like C++

2012-05-21 Thread Emil Lenngren
Sometimes linked list are used to manipulate data in the middle of the list
(insertions, removals), then arrays are too slow. O(1) vs O(n). However, a
linked list is very easy to implement in Gambas, using object references.

Sometimes (ordered) sets are used by the fact that they are ordered. Then
gambas collections won't work, since they are unordered. Same thing with
maps/multimaps.

A priority queue can easily be written in Gambas using an array as backend.
Or, simply use an ordered tree instead (the first/last element is always
the one with highest priority...)

I agree that Tree would be the most interesting data structure to be
implemented in C ;)
Red-black trees are very efficient and useful but is quite complicated to
write, so a C implementation would be nice, even if it could be written in
Gambas.

/Emil

2012/5/21 Benoît Minisini 

> Le 21/05/2012 21:51, Demosthenes Koptsis a écrit :
> > Basic languages have simple data structures like vars and arrays but
> > other languages
> > like c++ with the help of pointers can have advanced data structures
> > like containers etc...
> >
> > see a full list here
> > http://en.wikipedia.org/wiki/List_of_data_structures
> >
> > i wonder if such data structures can be implemented with gambas with
> > pointers and if such an action have any mean for real life
> > applications?
> >
> > Is it possible to have such data structures in gambas?
> > How about some of these to be part of the core libraries?
>
> Some data structures are missing, but not so many as you may think at
> first sight.
>
> If they are implemented, I don't think they will go inside the
> interpreter, to keep its size small (it is already too big for my
> tastes), but in an extern component.
>
> * Map/Associative array/Dictionary
> * Hash
>
> Use a Collection in both case. If the key is not a string, you must find
> a way to identify your key with a unique string.
>
> * Multimap
>
> Use a Collection whose values are arrays.
>
> * List
>
> Use an array. Since CPU have now one, two, three... memory caches,
> arrays as almost always faster than linked lists.
>
> * Set
>
> One could use a Collection to emulate it: by transforming a value into a
> string key, we can assume that the value belongs to the set if the
> collection has something associated with the key.
>
> But it would be better to add a Set native class with a native
> implementation (in C. Stop with C++!).
>
> * Multiset
>
> Same remarks (the value is associated to its number of occurence in the
> collection).
>
> * Priority queue
>
> Is it worth having a native implementation for that? I don't think so. A
> implementation in Gambas should be enough.
>
> * Queue
> * Deque
> * Stack
>
> Use an Array. The Push() and Pop() methods can help.
>
> * String
>
> We have strings of characters. Is something else really needed?
>
> * Tree
> * Graph
>
> Native implementation of that would be interesting.
>
> Any volunteer? :-)
>
> --
> 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] Data Structures like C++

2012-05-21 Thread Emil Lenngren
Usual implementations of trees does not have restrictions on number of
children. Each node are allocated separately. They use to contain pointers
to the left and right children, and maybe to the parent as well.

I don't see any reason why Graphs should be implemented as a special
Collection. There are as many possible graph representations as there are
graph algorithms, and most of them can be implemented easily. For example,
the most common is "adjacency list":

Class Graph
nodes As Node[]
End

Class Node
   adjacentNodes As Node[]
   additionalData
End

2012/5/21 tobi 

> On Mon, 21 May 2012, Benoît Minisini wrote:
> > Le 21/05/2012 21:51, Demosthenes Koptsis a écrit :
> > > Basic languages have simple data structures like vars and arrays but
> > > other languages
> > > like c++ with the help of pointers can have advanced data structures
> > > like containers etc...
> > >
> > > see a full list here
> > > http://en.wikipedia.org/wiki/List_of_data_structures
> > >
> > > i wonder if such data structures can be implemented with gambas with
> > > pointers and if such an action have any mean for real life
> > > applications?
> > >
> > > Is it possible to have such data structures in gambas?
> > > How about some of these to be part of the core libraries?
> >
> > Some data structures are missing, but not so many as you may think at
> > first sight.
> >
> > If they are implemented, I don't think they will go inside the
> > interpreter, to keep its size small (it is already too big for my
> > tastes), but in an extern component.
> >
> > * Map/Associative array/Dictionary
> > * Hash
> >
> > Use a Collection in both case. If the key is not a string, you must find
> > a way to identify your key with a unique string.
> >
> > * Multimap
> >
> > Use a Collection whose values are arrays.
> >
> > * List
> >
> > Use an array. Since CPU have now one, two, three... memory caches,
> > arrays as almost always faster than linked lists.
> >
> > * Set
> >
> > One could use a Collection to emulate it: by transforming a value into a
> > string key, we can assume that the value belongs to the set if the
> > collection has something associated with the key.
> >
> > But it would be better to add a Set native class with a native
> > implementation (in C. Stop with C++!).
> >
> > * Multiset
> >
> > Same remarks (the value is associated to its number of occurence in the
> > collection).
> >
> > * Priority queue
> >
> > Is it worth having a native implementation for that? I don't think so. A
> > implementation in Gambas should be enough.
> >
> > * Queue
> > * Deque
> > * Stack
> >
> > Use an Array. The Push() and Pop() methods can help.
> >
> > * String
> >
> > We have strings of characters. Is something else really needed?
> >
> > * Tree
> > * Graph
> >
> > Native implementation of that would be interesting.
> >
> > Any volunteer? :-)
> >
> > --
> > 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
>
> Heh... I was once working on reversing the collatz conjecture from a given
> integer - using a
> (halfways) binary tree.
>
> Graphs would in fact be interesting to implement but what is to be cleared
> up before anyone could
> think about volunteering:
> * Are trees restricted to their number of children?
> * The same for graphs: restrictions on the number of edges?
>
> The latter, I never used in programming (read of them a bit in
> mathematics). What could they be used
> for generally? Representing town maps? :)
>
>
> --
> 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] gb3: OpenGL Rotate and Translate logic

2012-05-21 Thread Kevin Fishburne
Disclaimer: I've been working on this for days and neither Google nor 
trial and error is adequate, apparently.

I'm trying to render an overhead, 2D scene with the "camera" at the 
center of the screen and the world objects rotated around it. Here are 
my variables:

Camera.WorldX As Single  ' World coordinates of camera.
Camera.WorldYAs Single  ' World coordinates of camera.
Camera.Orientation As Single ' Angle of camera (2D overhead view, 
rotates screen like Contra III for SNES).
Camera.Zoom As Single' Scale of matrix for zooming in and out.
sWidth As Short  ' Width in pixels of screen.
sHeight As Short ' Height in pixels of screen.

I need to rotate the matrix so that rendered objects will appear in the 
correct positions with regard to the camera's orientation. I need to 
translate the matrix so that the camera coordinates are always at the 
center of the rendering window. I need to scale the matrix so that the 
camera can zoom in and out (always centered at the middle of the 
rendering window).

I suspect that to center the camera on the rendering window after 
rotating the matrix, I need to "unrotate" the x and y offsets required 
to center it, which I can do if necessary using some functions I created 
to rotate an arbitrary point about an arbitrary origin.

I think I can successfully rotate the matrix around the camera with code 
like this:

   Gl.Translatef(Camera.WorldX, Camera.WorldY, 0)
   Gl.Rotatef(- Camera.Orientation, 0, 0, 1)
   Gl.Translatef(- Camera.WorldX, - Camera.WorldY, 0)

But then I need to translate the scene so that the camera is in the 
center of the rendering window. I also can't figure out how to 
arbitrarily scale the matrix to zoom in and out on the camera in this 
sequence. I have this:

Gl.Scalef(128 * Zoom.Current, 128 * Zoom.Current, 1)

but its effects vary depending on where I place it. The reason it 
multiplies by 128 is because each "tile" is 128 pixels, and each world 
coordinate is one tile. I couldn't be more confused if I'd just been 
shot in the head, so any help is greatly appreciated.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sa...@eightvirtues.com
phone: (770) 853-6271


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