Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Caveat

Something is horribly wrong, or you're running on a 286 :-)

I just tested here, and the program runs on a 51 MB test file in about 5 
seconds.


Some reasonably well commented code for you...

Public Sub Main()

  Dim inFile, outFile As File
  Dim buff As New Byte[1024]
  Dim idx, remBytes, readSize As Integer

  ' CHANGE THIS to your input file
  inFile = Open "/home/caveat/Downloads/mytestfile" For Read

  ' CHANGE THIS to your output file
  outFile = Open "/home/caveat/Downloads/mytestfile.out2" For Create

  ' Remaining bytes starts as the total length of the file
  remBytes = Lof(inFile)

  ' Until we reach the end of the input file...guess you could instead 
check on remBytes...

  While Not Eof(inFile)
If remBytes > buff.length Then
  ' Limit reading to the size of our buffer (the Byte[])
  readSize = buff.length
Else
  ' Only read the bytes we have left into our buffer (the Byte[])
  readSize = remBytes
Endif
' Read from the input file into our buffer, starting at offset 0 in 
the buffer

buff.Read(inFile, 0, readSize)
' Update the number of bytes remaining...
remBytes = remBytes - readSize
' Run round each byte in our buffer
For idx = 0 To buff.length - 1
  ' Dunno if you need any conditions, I check for > 30 as I can put 
newlines in the file to make it more readable for testing

  If buff[idx] > 30 Then
' This is the 'trick' you need to apply... subtract 11 from 
every byte in the file
' Not sure how you deal with edge cases... if you have a byte 
of 5, is your result then 250?

buff[idx] = buff[idx] - 11
  Endif
Next
' Write the whole buffer out to the output file
buff.Write(outFile, 0, readSize)
  Wend

  Close #inFile
  Close #outFile

End


Kind regards,
Caveat

On 15-07-17 21:24, Benoît Minisini via Gambas-user wrote:

Le 15/07/2017 à 20:49, Tony Morehen a écrit :

Did you try Benoit's suggestion:

Public Sub Main()

   Dim sIn as String
   Dim sOut as String

   sIn = File.Load("/home/fernando/temp/deah001.dhn")
   sOut = Add11(sIn)
   File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut)

End

Public Sub Add11(InputString as String) as String
   Dim bArray As Byte[]
   Dim String11 As String
   Dim i As Integer

   bArray = Byte[].FromString(InputString)
   For i = 0 To bArray.Max
 bArray[i] += 11
   Next
  Return bArray.ToString
End




Just a remark:

You don't have to use Byte[].FromString.

You can use the Bute[].Read() method instead, to load the file 
directly into the array. You save an intermediate string that way.


Regards,





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Working with .so library

2017-05-31 Thread Caveat

Hallo Dmitry

Did you already look at:

http://gambaswiki.org/wiki/howto/extern ?

Kind regards,
Caveat

On 31-05-17 06:48, Admin wrote:
So, I am writing a programm for my business that would basically be a 
cash register. Don't know for other countries but here in Russia the 
tax law works like this: you have to form a check for a customer in a 
spicific way spicified by the law, so some hardware manufacturers are 
making certified cash registers/check printers that simply form the 
check needed and automatically send tax info to authorities, very 
simple and easy to integrate with ERP systems. The only problem is 
that most of accounting software that is compatible with those 
registers is written for Windows. Now that Windows becomes more and 
more monstrous, many businesses turn to Linux, at least on those 
computers that are only a cashier's workstation that does not need to 
do much in terms of performance power. But the problem is, there's 
only one or two cashier's programms for linux exist for now, that are 
compatible with that certified hardware, and it's not open source or 
free.



First of all I want to make my own for myself, and second - I want to 
share it. Gambas is a great language in this case because of many 
aspects. In small buisnesses usually there are not a lot of qualified 
programmers to make some apps in C or C++, but instead there usually 
is just a single sysadmin, who is servicing the IT stuff wich usually 
is just one or two PCs and a router/switch. So, Gambas is much more 
accessible to those people as I see it. Programs written on it are 
easy to understand and modify to the needs of a small business.



And what is great - the manufacturers of that certified hardware are 
willing to help: ofcourse they mostly do business with Windows stuff, 
they only work directly with big businesses and they don't produce 
accounting software themselves, but they are kind enough to provide at 
least a binary libraries (they call those - drivers, but i'm not shure 
if it's technically correct) for their hardware even for Linux as a 
x86 and x64 .so files. What those binary libraries do is simple 
conversion of easy commands to hex codes that are then passed to a 
hardware via USB or RS232 or Ethernet. It is MUCH easier to work with 
those commands then implement the whole communication protocol from 
scratch. Ofcourse I am not the only one who is interested in those 
devices to work under linux, and as I can tell from different forums 
in the internet - programmers successfully use this libraries and 
thank the developers. There's not a lot of documentation out there, 
but yeah, on paper it seems to be simple enough... if you write your 
code in C or C++.



Things get much different when you try to use the library in Gambas. 
What I was able to understand from the documentation is that you need 
to "initialize the interface" with the library, which will create a 
"virtual class" and than you can pass your data to it. So, in C (using 
QT) that would look something like this:



 typedef IFptr * (*_CreateFptrInterface)(int ver);

bool init() {
QLibrary *lib = new QLibrary("fptr");
lib->load();
if(lib->isLoaded()) {
_CreateFptrInterface CreateFptrInterface = 
(_CreateFptrInterface)lib->resolve("CreateFptrInterface");

if(CreateFptrInterface) {
IFptr * iface = CreateFptrInterface(12);
iface->put_DeviceEnabled(true);
int result = 0;
iface->get_ResultCode();
qDebug() << result;
wchar_t bfr[1000];
int length = iface->get_ResultDescription(bfr,1000);
qDebug() << QString::fromWCharArray(bfr,length);
}
}
}


So, as I understand we create a pointer called IFptr by calling 
CreateFptrInterface() and then we pass any other pointer through this 
one. Pardon my terminology, I am new to this stuff.


I wrote some simple code that basically initializes this driver just 
so I can see some output in the driver logs which are kindly created 
in ~/.atol. It also sends some data to driver which must change just 
one setting:


-

Library "~/ATOL/linux-x64/libfptr"

Extern CreateFptrInterface(ver As Integer) As Pointer
Extern put_DeviceSingleSettingAsInt(p As Pointer, s1 As String, s2 As 
Integer) As Integer

Extern ApplySingleSettings(p As Pointer) As Pointer

[...]

Public Sub Button1_Click()
Dim IFptr As Pointer

IFptr = CreateFptrInterface(12)
put_DeviceSingleSettingAsInt(IFptr, "Model", 63)

ApplySingleSettings(IFptr)

End

-

When I click Button1, the driver surely initializes, I see in logs 
that IFptr object is created. If I provide the wrong version in 
CreateFptrInterface it fails, saying in logs that there's missmatch in 
interface version, so no doubt the argument is passed correctly. I 
also can 

Re: [Gambas-user] The interview on FLOSS

2015-09-19 Thread Caveat
Really not sure what you mean by 'doesn't come from English'... of 
course it comes from Greek, but it's a word appearing in most English 
dictionaries... so?  Should we exclude anorexia as an English word 
because it also comes from Greek, or manxome because it was made up by 
Lewis Carroll... ? :-)

On 19/09/15 15:21, Ru Vuott wrote:
>>   "autodidact" *is* an English word,
> ..that doesn't come from english
>
> --
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] why this code not working

2015-07-14 Thread Caveat
Where to begin, before we even consider scope, just try some really 
simple code first to get used to the syntax...

Public Sub Form_DblClick()

   Dim myInt As Integer
   myInt = 5
   'Inc myInt
   'Inc myInt
   'Inc myInt
   'myInt = +1
   'myInt = +10
   'myInt += 1
   'myInt += 10
   Print myInt is now:   myInt

End

I've commented out all the lines that might change myInt after we set it 
to 5... so try uncommenting (delete the single-quote) each line in turn 
and see what happens to myInt when you double-click on the form...

Kind regards,
Caveat


On 14/07/15 18:31, tsukuba GIMP user wrote:
 Public Sub PictureBox1_MouseDown()

Dim dicer As Integer
Dim dbclick As Integer
dicer = Int(Rnd(1, 5))
dbclick = +1 ---Problem code
If dbclick = 8 Then --- i click 8 time but it's don't run this code 
 just like my program forget this code
  Form3.Text = (x)
  Form3.TextBox1.text = (xx!!!)
  Form3.Show
Else
  Goto just_keep_moveing
Endif
just_keep_moveing:
If dicer = 1 Then
  Form3.Text = ()
  Form3.TextBox1.Text = (xxx~)
  Form3.Show
Else If dicer = 2 Then
  Form3.Text = ()
  Form3.TextBox1.text = (x!!)
  Form3.Show
Else If dicer = 3 Then
  Form3.Text = ()
  Form3.TextBox1.text = (xxx?)
  Form3.Show
Else If dicer = 4 Then
  Form3.Text = ()
  Form3.TextBox1.text = (!)
  Form3.Show
Endif
 End
 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] ?????? ?????? how to cite mplayer

2015-07-11 Thread Caveat
MediaView1.URL = music1

otherwise you're not setting the URL to the content of the variable 
music1 but to the literal string music1!


On 11/07/15 13:55, tsukuba GIMP user wrote:
 Public Sub Button1_Click()

Dim music1 As String
music1 = application.Path  /music1.mp3
MediaView1.URL = music1
MediaView1.play

 End

 i try this but when MediaView1.play will be cannot set status



 --  --
 ??: Marco Ancillotti;gam...@servinfo.it;
 : 2015??7??11??(??) 6:56
 ??: gambas-usergambas-user@lists.sourceforge.net;

 : Re: [Gambas-user] ??  how to cite mplayer




 So the path is not right , U have to use full path or use:
 application.path  /music1.mp3


 Il 11/07/2015 12:31, tsukuba GIMP user ha scritto:
 I just want when i click button1 mediaview1 will be play in Program 
 directory mp3 file


 Il 11/07/2015 11:48, tsukuba GIMP user ha scritto:
 I would like to quote an external file??music1.mp3??

 #==|code|==
 #
 #Public Sub Button1_Click()
 #
 #  Dim music1 As String
 #  music1 = /music1.mp3
 #  Mediaview1.URL = music1
 #
 #End

 #

 IS wrong?
 I don't use the media module , but for what I see U need to use the play
 function of mediaview to play the mp3 after U set the url.

 Also , are U sure that the file is in / ? it seem strange that U put a
 mp3 on the root of the system.



 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A couple of questions about building web / cgi applications

2015-02-13 Thread Caveat
If you're going to use a database to communicate between 2 separate 
programs, be sure to set the transaction isolation to READ-COMITTED 
(good for MySQL, ymmv), otherwise you won't see updates made by another 
process which can lead to some frustrating and confusing mismatches 
between what you think should be read from the database and what 
actually gets read!

You may also want to look at in-memory databases, if you don't need the 
sensor data to be persistent.  H2: 
http://www.h2database.com/html/main.html and JavaDB: 
http://docs.oracle.com/javadb/10.8.3.0/getstart/index.html
might be worth a look.  You could always use a regular database for the 
less volatile data, like user settings etc. and I imagine the 
inter-process communication would be easier to set up using a normal 
disk-based database.

The architecture is sound, I use a raspberry pi in a similar way to 
control my central heating.  There's a python script running all the 
time checking for interrupts so you can hit a button on the pi (PiFace 
board added) to, for example, force the heating on.  The python script 
reads from the MySQL db to see what temperature it should be aiming for, 
and reads a usb thermometer to see what the temperature actually is.  
There's a web interface written in php with big friendly buttons to 
force the heating on or off, and a nice display of the current 
temperature and the target temperature, and an indication of the state 
of the heating (on or off).  Inter-process communication is all done via 
the heating database in MySQL (with tx-isolation as above!).

Sorry, kind of realised at the end this is a little off-topic for most 
of the Gambas list, what if I promise to rewrite my web-interface in 
Gambas CGI? :-)

Kind regards,
Caveat


On 13/02/15 09:42, Rolf-Werner Eilert wrote:


 Am 12.02.2015 19:09, schrieb Bruce Cunningham:
 I'm looking for some advice and maybe some code examples for a 
 project I'm starting.  I'm building an embedded device with an ARM 
 based System-On-Module (similar to an Rpi, but in an sodimm form 
 factor).

 Thanks to some great help from members of this mailing list, I have 
 successfully compiled Gambas for the SOM.  The device will have a 
 main GUI application that handles the user interface and all of the 
 control logic.  However, it will also have a web interface for remote 
 access to some of the control settings.

 Here are my questions:

 1) Does anyone have any code examples for CGI applications in 
 Gambas?  I know there is an option to use the Gambas interpreter to 
 build ASP-like pages, but I would rather the web code be in compiled 
 into a CGI module instead (for security reasons).  I've built CGI 
 applications in VB6, so I have a fairly good understanding how CGI 
 work in general.  I've read the Gambas docs on CGI, but I still don't 
 quite understand it.

 2) What is the easiest way to exchange data (variables and arrays) 
 between the CGI module, and the main application?  Using a file on 
 disk is not a great option, since the device will be using flash for 
 the file system, and these values will be changing several times a 
 second.  That will kill the flash very quickly.

 Thanks,

 Bruce Cunningham
 bcunning...@sportif.commailto:bcunning...@sportif.com

 Hi Bruce,

 although I see your point, I don't see where there is a difference 
 between a gb.web app and an all-in-one app (apart from the ASP-like 
 pages to be stored separately). BUT: I once made some projects this 
 way, back in the times of Gambas2, so here is what I have (comments 
 are in German, and scarce, so if you have any questions...)

 One of the projects (umfragen) is still publicly running on our 
 website at 
 http://www.eilert-sprachen.de/cgi-bin/Umfragen.gambas?Selbsttest.data

 Take a look at those SUBs which start with schreibe (write), that's 
 the core of it.

 Hope it helps!

 Regards
 Rolf



 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/


 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net

Re: [Gambas-user] For Each ?WHAT? in Result

2015-01-10 Thread Caveat
I presume you started here http://gambaswiki.org/wiki/comp/gb.db/result
And then clicked on the big obvious link to FOR EACH, arriving here: 
http://gambaswiki.org/wiki/lang/foreach
And then didn't look at the second example... :-P

Kind regards,
Caveat

On 10/01/15 09:52, Lewis Balentine wrote:
 Result (gb.db)
 This class represents the result of a SQL request.
 This class is not creatable.
 This class acts like a read / write array.
 This class is *enumerable* with the FOR EACH keyword.

 Guess this should be obvious but not to me  pray tell what
 type/class does one use to enumerate it ??
 I tried ResultField[]
 I tried Collection
 I tried to try record
 As a last resort I tried String[]
 Suffice it to say: I have not a clue :-\

 
 Dim MyResult as Result
 Dim MyRecord as ?

 Result = Connection.Find (Something)

 For Each MyRecord in MyResult
   Print MyRecord[Field1Name]
 Print MyRecord[Field2Name]
 Print MyRecord[Field3Name]
 Next
 
 regards,

 Lewis
 --
 Dive into the World of Parallel Programming! The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] For Each ?WHAT? in Result

2015-01-10 Thread Caveat
But the documentation arrived at by following the enumerable link 
doesn't give a fully working code example, and also doesn't document 
whether the order of the enumeration is predictable, which we'd better 
hope it is if you ever decide to use an order by clause :-D

I'll see if have time to sign up and edit the page later, unless someone 
else can already take care of this?

Thanks and kind regards
Caveat

On 10/01/15 11:59, Tobias Boege wrote:
 On Sat, 10 Jan 2015, Lewis Balentine wrote:
 On 01/10/2015 03:04 AM, Caveat wrote:
 On 10/01/15 09:52, Lewis Balentine wrote:
 Result (gb.db)
 This class represents the result of a SQL request.
 This class is not creatable.
 This class acts like a read / write array.
 This class is *enumerable* with the FOR EACH keyword.

 Guess this should be obvious but not to me  pray tell what
 type/class does one use to enumerate it ??
 I tried ResultField[]
 I tried Collection
 I tried to try record
 As a last resort I tried String[]
 Suffice it to say: I have not a clue :-\

 
 Dim MyResult as Result
 Dim MyRecord as ?

 Result = Connection.Find (Something)

 For Each MyRecord in MyResult
 Print MyRecord[Field1Name]
 Print MyRecord[Field2Name]
 Print MyRecord[Field3Name]
 Next
 
 regards,

 Lewis
 I presume you started here http://gambaswiki.org/wiki/comp/gb.db/result
 And then clicked on the big obvious link to FOR EACH, arriving here:
 http://gambaswiki.org/wiki/lang/foreach
 And then didn't look at the second example... :-P

 Kind regards,
 Caveat

 Thank thee ... :-)
 I did follow that path and I did miss the nuance of the second example.

 Better yet, don't click on the FOR EACH link but on the enumerable link.
 This brings you to the Result-specific documentation for enumeration. You
 want to remember this because not every class is mentioned in the FOR EACH
 language documentation.

 As you see, Result has a different way of being enumerated. Instead of
 returning the objects in the result, a new iteration moves an internal
 cursor through the rows of the result data. This means, each execution of
 the loop body

For Each hResult
  Print hResult!onefield
Next

 will yield a different print (unless some rows contain the same value, of
 course).

 Regards,
 Tobi



--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Pre-release of Gambas 3.6 (Theme Colors)

2014-11-16 Thread Caveat
It's the colours, very light text on a light background.  With 
screenshot and the colours inverted, I was able to read the message, and 
was then able to see it was actually nothing to worry about This 
project is read-only.

Kind regards,
Caveat

On 16/11/14 09:21, Fabien Bodard wrote:
 2014-11-16 8:34 GMT+01:00 Caveat gam...@caveat.demon.co.uk:
 On opening a read-only project from the examples, I also (still) see an
 almost impossible to read error message.

 I could only see that the warning message said This project is
 read-only by taking a screenshot and inverting the colours!

 This is with a recent build out of svn, yesterday or so...

 Is this to be fixed in Gambas or do we all have to take some action?

 Kind regards,
 Caveat
 Can you explain me more slowly the problem ? :-)

 Is it a problem of delay or of colors ?... is it that you can't read
 the bubble ?


 On 12/10/14 22:43, Kevin Fishburne wrote:
 At least using the Quick theme, there are two problems.

 Demonstrated by the first attachment (Bad Colors 1.png), the pop-up
 message caused by a syntax error is difficult to read. The light blue
 background color isn't a background color defined in the theme
 (perhaps it borrows one of the foreground color definitions).

 Demonstrated by the second attachment (Bad Colors 2.png), the
 background color of the pop-up message caused by a double-click when
 the program is paused also isn't a background color defined in the theme.

 I think the simplest solution would be to borrow two existing theme
 color definitions, keeping their background and foreground pairings.
 That way, if the pop-ups look like shit, at least it will be obvious
 by examining the theme color definitions and can be manually corrected
 by the user.



 --
 Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
 Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
 Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
 Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
 http://p.sf.net/sfu/Zoho


 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --
 Comprehensive Server Monitoring with Site24x7.
 Monitor 10 servers for $9/Month.
 Get alerted through email, SMS, voice calls or mobile push notifications.
 Take corrective actions from your mobile device.
 http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Pre-release of Gambas 3.6 (Theme Colors)

2014-11-15 Thread Caveat
On opening a read-only project from the examples, I also (still) see an 
almost impossible to read error message.

I could only see that the warning message said This project is 
read-only by taking a screenshot and inverting the colours!

This is with a recent build out of svn, yesterday or so...

Is this to be fixed in Gambas or do we all have to take some action?

Kind regards,
Caveat


On 12/10/14 22:43, Kevin Fishburne wrote:
 At least using the Quick theme, there are two problems.

 Demonstrated by the first attachment (Bad Colors 1.png), the pop-up 
 message caused by a syntax error is difficult to read. The light blue 
 background color isn't a background color defined in the theme 
 (perhaps it borrows one of the foreground color definitions).

 Demonstrated by the second attachment (Bad Colors 2.png), the 
 background color of the pop-up message caused by a double-click when 
 the program is paused also isn't a background color defined in the theme.

 I think the simplest solution would be to borrow two existing theme 
 color definitions, keeping their background and foreground pairings. 
 That way, if the pop-ups look like shit, at least it will be obvious 
 by examining the theme color definitions and can be manually corrected 
 by the user.



 --
 Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
 Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
 Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
 Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
 http://p.sf.net/sfu/Zoho


 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Add new command to: Copy directories recursively

2014-08-26 Thread Caveat
Hello List

Although there is always cp -r, it makes for a very unportable program 
if you depend on calling external programs.  Better to build it in to 
the language if it's generally and genuinely useful, or to make a 
callable function in some public repository of Gambas code, so people 
don't need to reinvent the wheel every time they need a recursive copy.

Kind regards,
Caveat

On 25/08/14 23:04, Tobias Boege wrote:
 On Mon, 25 Aug 2014, Julio Sanchez wrote:
 Hi, could you add a new order within gambas3 to copy directories
 recursively.

 Something like this:

 PUBLIC http://gambaswiki.org/wiki/lang/public SUB
 http://gambaswiki.org/wiki/lang/sub copia_dir(path_origen AS
 http://gambaswiki.org/wiki/lang/as String
 http://gambaswiki.org/wiki/lang/type/string, path_destino AS
 http://gambaswiki.org/wiki/lang/as String
 http://gambaswiki.org/wiki/lang/type/string, OPTIONAL
 http://gambaswiki.org/wiki/lang/optional tipo as
 http://gambaswiki.org/wiki/lang/as String
 http://gambaswiki.org/wiki/lang/type/string)

   DIM http://gambaswiki.org/wiki/lang/dim arDir AS
 http://gambaswiki.org/wiki/lang/as string
 http://gambaswiki.org/wiki/lang/type/string[]
   DIM http://gambaswiki.org/wiki/lang/dim arFile AS
 http://gambaswiki.org/wiki/lang/as string
 http://gambaswiki.org/wiki/lang/type/string[]
   DIM http://gambaswiki.org/wiki/lang/dim nombredir, nombrefile AS
 http://gambaswiki.org/wiki/lang/as String
 http://gambaswiki.org/wiki/lang/type/string

   IF http://gambaswiki.org/wiki/lang/if  NOT
 http://gambaswiki.org/wiki/lang/not tipo then
 http://gambaswiki.org/wiki/lang/then tipo=*
   IF http://gambaswiki.org/wiki/lang/if NOT
 http://gambaswiki.org/wiki/lang/not Exist
 http://gambaswiki.org/wiki/lang/exist(path_destino) THEN
 http://gambaswiki.org/wiki/lang/then
  MKDIR http://gambaswiki.org/wiki/lang/mkdir path_destino
   ENDIF http://gambaswiki.org/wiki/lang/endif
   arfile = Dir http://gambaswiki.org/wiki/lang/dir(path_origen, tipo, gb.
 file http://gambaswiki.org/wiki/lang/type/file)  'extraemos los ficheros
   FOR http://gambaswiki.org/wiki/lang/for EACH
 http://gambaswiki.org/wiki/lang/each nombrefile IN
 http://gambaswiki.org/wiki/lang/in arfile  'los copiamos
 COPY http://gambaswiki.org/wiki/lang/copy path_origen /
   nombrefile TO http://gambaswiki.org/wiki/lang/to path_destino /
   nombrefile
   NEXT http://gambaswiki.org/wiki/lang/next
   ardir = Dir http://gambaswiki.org/wiki/lang/dir(path_origen, *, gb.
 Directory)
   FOR http://gambaswiki.org/wiki/lang/for EACH
 http://gambaswiki.org/wiki/lang/each nombredir IN
 http://gambaswiki.org/wiki/lang/in arDir 'extraemos los subdirectorios
  copia_dir(path_origen / nombredir, path_destino / nombredir) 
 'usamos
 la recursividad
  NEXT http://gambaswiki.org/wiki/lang/next
 END http://gambaswiki.org/wiki/lang/end

 For the other people who can't read the above HTML-like mail, try to pipe
 it through sed ':a;$!N;s/\n\?[^]*//;ta;P;D'. There are only a few
 places to fix up manually then:

 --8
 PUBLIC  SUB copia_dir(path_origen AS String, path_destino AS String, OPTIONAL 
 tipo as String)

   DIM  arDir AS string[]
   DIM  arFile AS string[]
   DIM  nombredir, nombrefile AS String

   IF   NOT tipo then tipo=*
   IF  NOT Exist(path_destino) THEN
  MKDIR  path_destino
   ENDIF
   arfile = Dir (path_origen, tipo, gb.file )  'extraemos los ficheros
   FOR  EACH nombrefile IN arfile  'los copiamos
 COPY  path_origen / nombrefile TO  path_destino / nombrefile
   NEXT
   ardir = Dir (path_origen, *, gb.Directory)
   FOR  EACH nombredir IN arDir 'extraemos los subdirectorios
  copia_dir(path_origen / nombredir, path_destino / nombredir) 
 'usamos la recursividad
  NEXT
 END
 --8

 I'm not a fan of adding a new instruction for something that can be done in
 just a few lines once and for all. Here is my version[0], even a little
 shorter (plus it can copy single files, too):

 --8
 Public Sub CopyDir(sSrc As String, sDst As String)
Dim sRel As String

If IsDir(sSrc) Then
  Mkdir sDst
  For Each sRel In Dir(sSrc)
CopyDir(sSrc / sRel, sDst / sRel)
  Next
Else
  Copy sSrc To sDst
Endif
 End
 --8

 And then there is also cp -r at your disposal.

 Regards,
 Tobi



--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] requests to gambas cgi scripts issues

2014-08-07 Thread Caveat
how can i get the responses in asynchronously mode?
due the response its trapped in _Finished() process
that are out of the mothod cycle

Depends on where you wrote the code.  If the code is in a separate class 
then you might want to look at declaring and raising events, and having 
your form create the instance of your class with something like AS 
myServiceCaller, then when you get into _Finished(), RAISE an event 
(e.g. FinishHappened) which can get picked up by your form in a public 
sub myServiceCaller.FinishHappened()

If the code is all in your form, then you can just change something 
directly on the form as soon as you get a response.

Or you could consider making a callback function...

Kind regards,
Caveat

On 06/08/14 22:53, PICCORO McKAY Lenz wrote:
 From: Caveat gam...@caveat.demon.co.uk
 Here's a mail I wrote back in 2011 on calling web services from out of
 Gambas, perhaps it helps?
 OF course, that code u post me really helps!! many many thanks

 due in u'r mail i see that: http.Post(application/x-www-form-urlencoded,
 data)

 1)for send post data as a from must be use the
 application/x-www-form-urlencoded
 that's are also in the wiki documentation but difficulty to read for some
 spanish users

 2) important, seems that if send post data with name:values fields,
 then the SOAP api's will interpreted as a webservice request...
 this are marvelous!

 BUT now another QUESTION

 u used the async method, that waith until data packets end...
 so in my program (that are not web or console) i have a form
 that made calls to a class, and that class have the methods
 that made the request and get the responses..

 how can i get the responses in asynchronously mode?
 due the response its trapped in _Finished() process
 that are out of the mothod cycle
 --
 Infragistics Professional
 Build stunning WinForms apps today!
 Reboot your WinForms applications with our WinForms controls.
 Build a bridge from your legacy apps to the future.
 http://pubads.g.doubleclick.net/gampad/clk?id=153845071iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] requests to gambas cgi scripts issues

2014-08-07 Thread Caveat
Sorry underscore, not dot... my java bad! :-P

On 07/08/14 08:19, Caveat wrote:
 how can i get the responses in asynchronously mode?
 due the response its trapped in _Finished() process
 that are out of the mothod cycle

 Depends on where you wrote the code.  If the code is in a separate class
 then you might want to look at declaring and raising events, and having
 your form create the instance of your class with something like AS
 myServiceCaller, then when you get into _Finished(), RAISE an event
 (e.g. FinishHappened) which can get picked up by your form in a public
 sub myServiceCaller.FinishHappened()

 If the code is all in your form, then you can just change something
 directly on the form as soon as you get a response.

 Or you could consider making a callback function...

 Kind regards,
 Caveat

 On 06/08/14 22:53, PICCORO McKAY Lenz wrote:
 From: Caveat gam...@caveat.demon.co.uk
 Here's a mail I wrote back in 2011 on calling web services from out of
 Gambas, perhaps it helps?
 OF course, that code u post me really helps!! many many thanks

 due in u'r mail i see that: http.Post(application/x-www-form-urlencoded,
 data)

 1)for send post data as a from must be use the
 application/x-www-form-urlencoded
 that's are also in the wiki documentation but difficulty to read for some
 spanish users

 2) important, seems that if send post data with name:values fields,
 then the SOAP api's will interpreted as a webservice request...
 this are marvelous!

 BUT now another QUESTION

 u used the async method, that waith until data packets end...
 so in my program (that are not web or console) i have a form
 that made calls to a class, and that class have the methods
 that made the request and get the responses..

 how can i get the responses in asynchronously mode?
 due the response its trapped in _Finished() process
 that are out of the mothod cycle
 --
 Infragistics Professional
 Build stunning WinForms apps today!
 Reboot your WinForms applications with our WinForms controls.
 Build a bridge from your legacy apps to the future.
 http://pubads.g.doubleclick.net/gampad/clk?id=153845071iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Infragistics Professional
 Build stunning WinForms apps today!
 Reboot your WinForms applications with our WinForms controls.
 Build a bridge from your legacy apps to the future.
 http://pubads.g.doubleclick.net/gampad/clk?id=153845071iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 .



--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] requests to gambas cgi scripts issues

2014-08-05 Thread Caveat
 version=1.0 encoding=utf-8?
double xmlns=http://www.webserviceX.NET/;212/double
Got header: HTTP/1.1 200 OK
Got header: Cache-Control: private, max-age=0
Got header: Content-Length: 96
Got header: Content-Type: text/xml; charset=utf-8
Got header: Server: Microsoft-IIS/7.0
Got header: X-AspNet-Version: 4.0.30319
Got header: X-Powered-By: ASP.NET
Got header: Date: Tue, 21 Jun 2011 14:44:45 GMT
*** End Http GET ***
Http POST data:
Temperature=100FromUnit=degreeCelsiusToUnit=degreeFahrenheit
*** Result for Http POST ***
?xml version=1.0 encoding=utf-8?
double xmlns=http://www.webserviceX.NET/;212/double
Got header: HTTP/1.1 200 OK
Got header: Cache-Control: private, max-age=0
Got header: Content-Length: 96
Got header: Content-Type: text/xml; charset=utf-8
Got header: Server: Microsoft-IIS/7.0
Got header: X-AspNet-Version: 4.0.30319
Got header: X-Powered-By: ASP.NET
Got header: Date: Tue, 21 Jun 2011 14:45:06 GMT
*** End Http POST ***
Soap 1.1 data: ?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
   soap:Body
 ConvertTemp xmlns=http://www.webserviceX.NET/;
   Temperature100/Temperature
   FromUnitdegreeCelsius/FromUnit
   ToUnitdegreeFahrenheit/ToUnit
 /ConvertTemp
   /soap:Body
/soap:Envelope
Sending SOAP 1.1 header: Content-Type: text/xml; charset=utf-8
Sending SOAP 1.1 header: Content-Length: 445
Sending SOAP 1.1 header: SOAPAction:
http://www.webserviceX.NET/ConvertTemp;
*** Result for SOAP 1.1 ***
?xml version=1.0 encoding=utf-8?soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodyConvertTempResponse 
xmlns=http://www.webserviceX.NET/;ConvertTempResult212/ConvertTempResult/ConvertTempResponse/soap:Body/soap:Envelope
Got header: HTTP/1.1 200 OK
Got header: Cache-Control: private, max-age=0
Got header: Content-Length: 367
Got header: Content-Type: text/xml; charset=utf-8
Got header: Server: Microsoft-IIS/7.0
Got header: X-AspNet-Version: 4.0.30319
Got header: X-Powered-By: ASP.NET
Got header: Date: Tue, 21 Jun 2011 14:45:19 GMT
*** End SOAP 1.1 ***
Soap 1.2 data: ?xml version=1.0 encoding=utf-8?
soap12:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:soap12=http://www.w3.org/2003/05/soap-envelope;
   soap12:Body
 ConvertTemp xmlns=http://www.webserviceX.NET/;
   Temperature100/Temperature
   FromUnitdegreeCelsius/FromUnit
   ToUnitdegreeFahrenheit/ToUnit
 /ConvertTemp
   /soap12:Body
/soap12:Envelope
Sending SOAP 1.2 header: Content-Type: application/soap+xml;
charset=utf-8
Sending SOAP 1.2 header: Content-Length: 453
*** Result for SOAP 1.2 ***
?xml version=1.0 encoding=utf-8?soap:Envelope
xmlns:soap=http://www.w3.org/2003/05/soap-envelope;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodyConvertTempResponse 
xmlns=http://www.webserviceX.NET/;ConvertTempResult212/ConvertTempResult/ConvertTempResponse/soap:Body/soap:Envelope
Got header: HTTP/1.1 200 OK
Got header: Cache-Control: private, max-age=0
Got header: Content-Length: 365
Got header: Content-Type: application/soap+xml; charset=utf-8
Got header: Server: Microsoft-IIS/7.0
Got header: X-AspNet-Version: 4.0.30319
Got header: X-Powered-By: ASP.NET
Got header: Date: Tue, 21 Jun 2011 14:45:37 GMT
*** End SOAP 1.2 ***


Hope this helps you to get your Web Service client up and running using
whichever protocol suits you best.

Regards,
Caveat



On 05/08/14 21:50, PICCORO McKAY Lenz wrote:
 i try to comunicate a desktop gambas app with a cgi web gabmas app, but
 seems i do not know how to make the request from the desktop app.
 i made that code:

 =
 Dim sCad As String
 POA = New HttpClient As POA

  sCad = html
  sCad = sCad  form action=\http://localhost/test1.webpage\;
 method=post enctype=\application/x-www-form-urlencoded\ 
  sCad = sCad  input type=\text\ name=\p1usuario\ value=\name1\
 /
  sCad = sCad  input type=\text\ name=\p1clave\ value=\123456\
 /
  sCad = sCad  input type=\submit\ value=\Submit\ /
  sCad = sCad  /form
  sCad = sCad  /html
  POA.URL = http://;  hostcentral 
 /serialservicio/SSpeticiones1.webpage
  POA.Post(text/html, sCad)
 =

 but do not work,

 with a simpel HTML form works perfectly, if i doing in wrong way , please
 telme how could i send data on request from a desktop gambas apllication to
 a web gambas aplication (some thing like webservice, jeje)

 the cgi script runs perfectly:

 =
 #!/usr/bin/env gbw3
 %
 USE gb.vb

 Dim printout As String
 Dim llamada As String
 Dim p1usuario As String
 Dim p1clave As String

  p1usuario = Request.post[p1usuario]
  If (String.Comp(p1usuario, ) = 0) Then
  printout = -1

Re: [Gambas-user] Gambas 3.5.4 and the Stable PPA

2014-07-15 Thread Caveat
I have Ubuntu here, was hoping someone else would volunteer first so I 
didn't have to... :-D

I haven't packaged before but know my way around bash scripts, svn, git 
and the like.

Let me know what I can do to help (bear in mind I may need a little help 
to get me going in the right direction but I'm a quick learner and know 
Ubuntu already for many years)

Kind regards,
Caveat

On 12/07/14 22:41, Sebastian Kulesz wrote:
 On Sat, Jul 12, 2014 at 4:53 PM, Willy Raets wi...@earthshipbelgium.be
 wrote:

 On za, 2014-07-12 at 02:38 -0300, Sebastian Kulesz wrote:
 Hey! Long time no see.

 I got word a few hours ago that Kendek won't be maintaining the Stable
 PPA
 any more. Instead, he created a new PPA under the gambas-team Launchpad
 name and uploaded the current stable (3.5.3) packages so they can be
 updated by us.
 I've seen his PPA has been archived and mailed him. He told me the same.

 The thing is, I don't have ubuntu installed in my computer as i don't
 need
 it to manage the Daily Builds PPA. The problem arises when trying to push
 Gambas 3.5.4 to the Stable PPA using the same method i'm using for the
 Daily Builds. To do this, i have to bisect 3 repositories to find the
 revision which corresponds to the release of the 5.* branch. Right now,
 this repositories correspond to the next release of Gambas (3.6). So,
 even
 if i were to do the bisection and find the working revision, the builds
 would still differ from the one Kendek made.
 Could you not simply take from svn 3.5 branch, instead of picking
 revisions, or am I understanding this wrong?

 We are talking about different repositories. I will use a different method
 to package Gambas because i don't have ubuntu installed. Some of the
 advantages are the ones i explained in the first email. I can't use the
 same method as kendek because i don't have ubuntu installed.
 Currently, there is a common branch which holds common files from the
 /debian folder used to generate the source files, and the series specific
 repositories for each ubuntu version we support in the PPA. You can look
 here [0] for those.

 The thing is, these repositories are in sync with trunk, they hold the new
 components information, installation rules and dependencies. I don't track
 minor version releases because it is pointless to do so for the Daily
 Builds PPA. So, to build for the Stable PPA, i have to go back in history
 an look for the first change made to the packaging structure for Gambas
 3.5.99, aka 3.6.


 Because of this, I decided not to package this release in the new PPA for
 now. Different package methods can introduce bugs that should not exist
 in
 a stable distribution.
 Don't get me wrong, with enough time, i know it can be done. But i'm
 currently studying for finals and time is really scarce.
 I'm glad you are willing to take up this job, but your finals go first,
 so we will be patient.:)

 I will be done next thursday. As soon as i get home i will start working on
 a fix for the stable PPA.


 If anybody is up for the job, please let me know. If it's not too time
 consuming i will do my best to help get it done.
 I wish I knew how to package, have been reading about it and was advised
 to start with simple packages. Packaging Gambas doesn't seem a good
 point of start for learning how to package debs in general.


 Next week, once i'm done, i will fix the repositories to also build the
 Stable releases, but until the next major release I won't label it as
 stable. I don't want to put extra work where it is not needed.

 Bad news aside, this move brings the possibility for automatic Beta
 builds.
 This ones will be based off the current stable branch, and be updated
 every
 time there is a merge from trunk to backport a bugfix.
 This shortens the window of getting a fix for a stopping bug from months
 to
 24 hours! :)

 Sounds promising, looking forward to it and thanks for your efforts to
 get Gambas latest stable available on Ubuntu and its siblings...

 --
 Kind regards,

 Willy (aka gbWilly)

 http://gambasshowcase.org/
 http://howtogambas.org
 http://gambos.org






 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 [0] https://code.launchpad.net/~gambas-team
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 .



--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http

Re: [Gambas-user] R: morse code sound ?

2014-02-07 Thread Caveat
A very crude implementation... I first used audacity to generate a basic 
tone that lasts a few seconds and saved it as tone.wav.

The form contains a text box called TextBox1 and a button called Button1.

The results sound kind of morsey, but you will probably want to play 
around with the pauses and lengths of the dots and dashes.

Private morseTable As Collection

Public Sub Form_Open()

   Music.Load(/home/jules/Sounds/tone.wav)
   setupMorse()

End

Public Sub setupMorse()

   morseTable = New Collection
   morseTable.Add(.-, a)
   morseTable.Add(-..., b)
   morseTable.Add(-.-., c)
   morseTable.Add(-.., d)
   morseTable.Add(., e)
   morseTable.Add(..-., f)
   morseTable.Add(--., g)
   morseTable.Add(, h)
   morseTable.Add(.., i)
   morseTable.Add(.---, j)
   morseTable.Add(-.-, k)
   morseTable.Add(.-.., l)
   morseTable.Add(--, m)
   morseTable.Add(-., n)
   morseTable.Add(---, o)
   morseTable.Add(.--., p)
   morseTable.Add(--.-, q)
   morseTable.Add(.-., r)
   morseTable.Add(..., s)
   morseTable.Add(-, t)
   morseTable.Add(..-, u)
   morseTable.Add(...-, v)
   morseTable.Add(.--, w)
   morseTable.Add(-..-, x)
   morseTable.Add(-.--, y)
   morseTable.Add(--.., z)
   morseTable.Add(-, 0)
   morseTable.Add(., 1)
   morseTable.Add(..---, 2)
   morseTable.Add(...--, 3)
   morseTable.Add(-, 4)
   morseTable.Add(., 5)
   morseTable.Add(-, 6)
   morseTable.Add(--..., 7)
   morseTable.Add(---.., 8)
   morseTable.Add(., 9)
   morseTable.Add(.-.-.-, .)
   morseTable.Add(--..--, ,)
   morseTable.Add(..--.., ?)
   morseTable.Add(.., ')
   morseTable.Add(-.-.--, !)
   morseTable.Add(-..-., /)
   morseTable.Add(-.--., ()
   morseTable.Add(-.--.-, ))
   morseTable.Add(.-..., )
   morseTable.Add(---..., :)
   morseTable.Add(-.-.-., ;)
   morseTable.Add(-...-, =)
   morseTable.Add(.-.-., +)
   morseTable.Add(--, -)
   morseTable.Add(..--.-, _)
   morseTable.Add(.-..-., \)
   morseTable.Add(...-..-, $)
   morseTable.Add(.--.-., @)
End

Public Sub Button1_Click()

   Dim idx As Integer
   Dim aChar As String
   For idx = 1 To Len(TextBox1.text)
 aChar = Mid$(TextBox1.text, idx, 1)
 If aChar =   Then
   Print Break between words
   ' Pause between words (perhaps do something to eliminate multiple 
spaces?)
   Wait 0.7
   Continue
 Endif
 playChar(aChar)
   Next

End Sub

Public Sub playChar(aChar As String)

   Dim charAsMorse As String
   Dim idx As Integer
   charAsMorse = morseTable[aChar]
   Print Playing:   charAsMorse
   For idx = 1 To Len(charAsMorse)
 If Mid$(charAsMorse, idx, 1) = . Then
   playDot()
 Else
   playDash()
 Endif
 ' Pause between individual dots/dashes of a single character
 Wait 0.2
   Next
   ' Pause between characters of a word
   Wait 0.5

End

Public Sub playDot()

   playTone(0.1)

End

Public Sub playDash()

   playTone(0.4)

End



Public Sub playTone(duration As Float)

   Music.Play()
   Wait duration
   Music.Stop()

End

Kind regards,
Caveat

On 07/02/14 18:49, Ru Vuott wrote:
 Wow! That's exactly what I was looking for. Great job, vuott.
 Thank you very much, Jesus.
   
 In the other hand, I suggest Dirk to take a close look at this project  [1],
 though written in Python, well worth to give it a try, or perhaps
 trying to convert to gambas the relevant code.

 [1]
 https://code.google.com/p/kochmorse/source/browse/trunk/KochMorse/alsamorse/morse.py
   
   uhmmm... very interesting, Jesus. Is someone able to convert that python 
 code in Gambas ?

 Bye
 vuott

 --
 Managing the Performance of Cloud-Based Applications
 Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
 Read the Whitepaper.
 http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Tooltip help using HTML.

2014-01-25 Thread Caveat
Hi Sam

It looks like you didn't close your second td of each row properly... I 
guess try it first with valid html...

Dim sHTML AS String

  sHTML = html
  sHTML = table cellpadding=1
  sHTML = trtd align=rightNote on/tdtd align=leftG#/Ab/td/tr
  sHTML = trtd align=rightRow/tdtd align=left44/td
/tr
  sHTML = trtd align=rightVelocity/tdtd align=left96/td
/tr
  sHTML = /table
  sHTML = /html

  gvEvents.Tooltip = sHTML

I would also be in the habit of wrapping the alignment and padding 
params in double-quotes, but perhaps that's getting too picky...and as 
you say, it doesn't seem to make much difference...

   Dim sHTML As String

   sHTML = html
   sHTML = table cellpadding=\1\
   sHTML = trtd align=\right\Note on/tdtd 
align=\left\G#/Ab/td/tr
   sHTML = trtd align=\right\Row/tdtd 
align=\left\44/td/tr
   sHTML = trtd align=\right\Velocity/tdtd 
align=\left\96/td/tr
   sHTML = /table
   sHTML = /html
...

Another thing to watch for is that your data might cause some odd 
effects if you have non-html-safe characters.

Kind regards,
Caveat

On 25/01/14 04:49, Sam wrote:
 Hi all,

 I'm having a problem with the tooltips.  It works fine with regular
 text but when I use HTML for a multi-line tooltip the results are not
 predictable.  Most of the time an extra blank line shows up at the
 bottom. Seems like it might be wrapping if the last line is shorter (yes
 shorter).

 A code example looks like :

 Dim sHTML AS String

   sHTML = html
   sHTML = table cellpadding=1
   sHTML = trtd align=rightNote on/tdtd align=leftG#/Ab/tr
   sHTML = trtd align=rightRow/tdtd align=left44/tr
   sHTML = trtd align=rightVelocity/tdtd align=left96/tr
   sHTML = /table
   sHTML = /html

   gvEvents.Tooltip = sHTML


 It does not seem to matter if the html tag is included or not or
 if the attribute values are enclosed
 in single or double quotes.  The table cells can have different colors
 or font sizes and works fine.  Just a
 strange extra line at the bottom (not always).  Any idea?  I've tried
 numerous simple HTML snippets
 that work fine and wonder if it is just the fact of the table inside.

 I've been developing a MIDI app using the ALSA API which works well
 but I'm surprised there is
 not a wrapper already out there for Gambas, anyone already written one?

 The opaque structures and macros for hiding the actual implementation
 are a good design for C but not so nice for Gambas. I gave up on the
 timing callback thinking the callback cannot occur properly since they
 are on different threads. I have a separate player and a GUI that
 communicate via pipes, works good.

Thanks for Gambas!  I come home from a day of Java abstract
 frameworks, inversion of control, more
 and more bloat and just write stuff that is fun and actually works.

 Sam
 --
 CenturyLink Cloud: The Leader in Enterprise Cloud Services.
 Learn Why More Businesses Are Choosing CenturyLink Cloud For
 Critical Workloads, Development Environments  Everything In Between.
 Get a Quote or Start a Free Trial Today.
 http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Convert string to integer

2014-01-25 Thread Caveat
What is in qrg at the time you try to do the CInteger call?

Kind regards,
Caveat

On 26/01/14 08:35, Dirk wrote:
 Hi,

 I'm having a problem with Convert string to integer


 where is my mistake? I get error message:
 Type incompatibility expected integer, instead get string


 Public Sub MySock_Read()
   
 '
   
 ''
   
 '''
' When some data arrives from the remote
' part of the socket, DataAvailable event
' is raised
'
Dim rx, rx2, rxtmp As String
Dim pattern, result, s, element As String
Dim i, ii, iii, frequenz, istZeile As Integer
   ' DIM reg AS Regexp
   
Dim el, text, dxde, txcall, dxcall, dxtxt, utc, loca, tmpstr, NewDXZ,
 DXCall_anfang, toall As String
Dim band As String
   ' Dim qrg_i As Integer
Dim qrg_i As Variant
Dim qrg As String
Dim dxprafix As String
Dim dxcall_tmp As String
Dim trenner As String
Dim mh As String
Dim dxland As String
Dim flagge As String
Dim sa, zeile, z As String[]
Dim wp As Integer
Dim wpa As String[]
Dim wpi As Integer
Dim dxcall_lng As Integer

stunde = 0
minu = 0
sekunde = 0

If MySock.Status = Net.Connected Then
Read #MySock, rx, Lof(MySock)
rx2 = rx
  
If Mid$(rx, 1, 6) = To ALL Then
Textedit1.richText = Textedit1.richText  font color=red
toall = ok
   
End If
If Mid$(rx, 1, 3) = WWV Then
TextEdit1.richText = TextEdit1.richText  font color=blue
toall = ok
End If
If Mid$(rx, 1, 3) = WCY Then
TextEdit1.richText = TextEdit1.richText  font color=blue
toall = ok
End If

 If Mid$(rx, 1, 5) = DX de Then
'_
'_ DX Meldung läuft ein  _
'_

  dxde = Mid$(rx, 1, 5)
   rx = Trim(Replace$(rx, DX de , ))
   i = InStr(rx,  )
  txcall = Mid$(rx, 1, i)
   rx = Trim(Replace$(rx, txcall   , ))
  qrg = Mid$(rx, 1, InStr(rx,  ))
   rx = Trim(Replace$(rx, qrg   , ))
  dxcall = Mid$(rx, 1, InStr(rx,  ))
   rx = Trim(Replace$(rx, dxcall   , ))
 ' . . . . . . . . . .
   qrg = Trim(qrg)
 qrg_i = CInteger(qrg) '  == Here is Error
   
   
   If qrg_i  44 And qrg_i  43 Then
 mh430 = machmaupdatestr(mh430, dxcall, qrg)
 wpa = Split(mh430,  )
 nr430 = wpa.length - 1
   '  wp = machma_buttonw(mh430)
  
 machma_balken()
   End If
   If qrg_i  146000 A...




 --
 Dirk





 --
 CenturyLink Cloud: The Leader in Enterprise Cloud Services.
 Learn Why More Businesses Are Choosing CenturyLink Cloud For
 Critical Workloads, Development Environments  Everything In Between.
 Get a Quote or Start a Free Trial Today.
 http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] What does ... in a menu name signify?

2014-01-14 Thread Caveat
It's a 'standard decoration' signifying there's more behind the chosen 
item...or that the item needs user confirmation or additional input on a 
dialogue...

http://msdn.microsoft.com/en-us/library/aa511502.aspx#ellipses

Kind regards,
Caveat

On 15/01/14 01:20, Bruce wrote:
 For example, in the IDE menu there are lot's of
 them, like File|New Project...

 The reason I ask is that the form definition for those types is
 different - e.g.
{  Menu5 Menu
   Text = (Menu5)  ...
}

 I first thought that it was simply to remove the ... from the
 translation strings but I keep thinking why go to all that trouble.

 tia
 Bruce

 p.s. In our new project someone slipped a conformance clause into the
 requirements without me noticing.  Things like all toolbuttons shall
 have a tooltip etc.  I thought that it was going to take days to go
 through all the forms and check nearly every control for conformance.
 Then I had a good idea (HAH!) to write a utility to parse the form
 definition file and show all the conformance items, tooltips, shortcuts
 etc. I thought that may take a few hours to build - HAH!  Three days
 later I am still only part way there.
 Essentially it's turning the IDE Properties tab around 90 degrees, i.e.
 a list of the properties of interest for all the controls, menus etc in
 the form. A couple of shots attached.
 Originally I thought it would be possible to add editors to fix the
 form definition files directly, avoiding the IDE. HAH! The complexity of
 those files is astonishing!  Is there a defined grammar for it?


 --
 CenturyLink Cloud: The Leader in Enterprise Cloud Services.
 Learn Why More Businesses Are Choosing CenturyLink Cloud For
 Critical Workloads, Development Environments  Everything In Between.
 Get a Quote or Start a Free Trial Today.
 http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk


 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] File Chooser OK event?

2013-12-19 Thread Caveat
And here's the code from the form containing the File Chooser...

Having sent you all this, I realise it perhaps doesn't really answer 
your question (sorry!) but perhaps there's enough in here about raising 
and handling events that it becomes clear how to use the OK and Cancel 
events from the File Chooser itself, should you still wish to do so... :-D

' Done Event is raised only if Done button pressed and a file has been 
chosen and
' returns the chosen file name and the (earlier) provided fileNumber
' See below for details of fileNumber
Event Done(fileName As String, fileNumber As Integer)
' Allows us to keep track of which file we're dealing with if there are 
multiple places
' where you can choose a file on the main Form
' It's returned to the main Form on the Done event
Private fileNumber As Integer

Public Sub pbCancel_Click()

   Me.Close

End

Public Sub pbDone_Click()

   If FileChooser2.SelectedPath =  Then
 Message.Error(No file chosen!  Cancel to return without selecting 
a file)
 Return
   Endif
   Raise Done(FileChooser2.SelectedPath, fileNumber)
   Me.Close

End

Public Sub setFileNumber(newFileNumber As Integer)

   fileNumber = newfileNumber

End

Public Sub setRoot(newRoot As String)

   FileChooser2.Root = newRoot

End

Public Sub setFilter(newFilter As String)

   FileChooser2.Filter = newFilter

End

Kind regards,
Caveat

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] File Chooser OK event?

2013-12-19 Thread Caveat
I have a pbDone and a pbCancel button on my form.  I'm guessing that if 
you are using the File Chooser's built-in OK/Cancel buttons (where have 
you found that and how are you enabling that ??) that you will have to 
handle them in a similar way... so making a new File Chooser As ... if 
from code, or just sticking it on the form if using the designer...

Kind regards,
Caveat

On 19/12/13 12:32, Rolf-Werner Eilert wrote:
 pbDone_Click()

 Where does that come from?



 Am 19.12.2013 12:15, schrieb Caveat:
 And here's the code from the form containing the File Chooser...

 Having sent you all this, I realise it perhaps doesn't really answer
 your question (sorry!) but perhaps there's enough in here about raising
 and handling events that it becomes clear how to use the OK and Cancel
 events from the File Chooser itself, should you still wish to do so... :-D

 ' Done Event is raised only if Done button pressed and a file has been
 chosen and
 ' returns the chosen file name and the (earlier) provided fileNumber
 ' See below for details of fileNumber
 Event Done(fileName As String, fileNumber As Integer)
 ' Allows us to keep track of which file we're dealing with if there are
 multiple places
 ' where you can choose a file on the main Form
 ' It's returned to the main Form on the Done event
 Private fileNumber As Integer

 Public Sub pbCancel_Click()

  Me.Close

 End

 Public Sub pbDone_Click()

  If FileChooser2.SelectedPath =  Then
Message.Error(No file chosen!  Cancel to return without selecting
 a file)
Return
  Endif
  Raise Done(FileChooser2.SelectedPath, fileNumber)
  Me.Close

 End

 Public Sub setFileNumber(newFileNumber As Integer)

  fileNumber = newfileNumber

 End

 Public Sub setRoot(newRoot As String)

  FileChooser2.Root = newRoot

 End

 Public Sub setFilter(newFilter As String)

  FileChooser2.Filter = newFilter

 End

 Kind regards,
 Caveat

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics 
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] File Chooser OK event?

2013-12-19 Thread Caveat
Looks like you have to use (at least) Activate  (OK) and Cancel (Errrm 
Cancel!)... pffft seems simpler the way I had it! ;-)

Public Sub FileChooser2_Cancel()

   Print Cancel fired

End

Public Sub FileChooser2_Activate()

   Print Activate fired!

End

Kind regards,
Caveat

On 19/12/13 13:11, Rolf-Werner Eilert wrote:
 Ok, I see.

 You activate this by Show Button = True in the form dialog. The help
 says Return or set if the standard ../../dialog buttons ('OK' and
 'Cancel') are visible or not.

 And this doesn't help me a lot... ;)

 Rolf


 Am 19.12.2013 12:48, schrieb Caveat:
 I have a pbDone and a pbCancel button on my form.  I'm guessing that if
 you are using the File Chooser's built-in OK/Cancel buttons (where have
 you found that and how are you enabling that ??) that you will have to
 handle them in a similar way... so making a new File Chooser As ... if
 from code, or just sticking it on the form if using the designer...

 Kind regards,
 Caveat

 On 19/12/13 12:32, Rolf-Werner Eilert wrote:
 pbDone_Click()

 Where does that come from?



 Am 19.12.2013 12:15, schrieb Caveat:
 And here's the code from the form containing the File Chooser...

 Having sent you all this, I realise it perhaps doesn't really answer
 your question (sorry!) but perhaps there's enough in here about raising
 and handling events that it becomes clear how to use the OK and Cancel
 events from the File Chooser itself, should you still wish to do so... :-D

 ' Done Event is raised only if Done button pressed and a file has been
 chosen and
 ' returns the chosen file name and the (earlier) provided fileNumber
 ' See below for details of fileNumber
 Event Done(fileName As String, fileNumber As Integer)
 ' Allows us to keep track of which file we're dealing with if there are
 multiple places
 ' where you can choose a file on the main Form
 ' It's returned to the main Form on the Done event
 Private fileNumber As Integer

 Public Sub pbCancel_Click()

Me.Close

 End

 Public Sub pbDone_Click()

If FileChooser2.SelectedPath =  Then
  Message.Error(No file chosen!  Cancel to return without selecting
 a file)
  Return
Endif
Raise Done(FileChooser2.SelectedPath, fileNumber)
Me.Close

 End

 Public Sub setFileNumber(newFileNumber As Integer)

fileNumber = newfileNumber

 End

 Public Sub setRoot(newRoot As String)

FileChooser2.Root = newRoot

 End

 Public Sub setFilter(newFilter As String)

FileChooser2.Filter = newFilter

 End

 Kind regards,
 Caveat

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics 
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics 
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics 
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user

Re: [Gambas-user] File Chooser OK event?

2013-12-19 Thread Caveat
I did explain it, see my previous message.

Is it really not clear still?

Kind regards,
Caveat

On 19/12/13 16:32, Rolf-Werner Eilert wrote:
 You are right, I now did it the old way with separate buttons.

 But I'm still interested in seeing how this would work, so if someone
 could explain...

 Regards

 Rolf


 Am 19.12.2013 14:04, schrieb Caveat:
 Looks like you have to use (at least) Activate  (OK) and Cancel (Errrm
 Cancel!)... pffft seems simpler the way I had it! ;-)

 Public Sub FileChooser2_Cancel()

  Print Cancel fired

 End

 Public Sub FileChooser2_Activate()

  Print Activate fired!

 End

 Kind regards,
 Caveat

 On 19/12/13 13:11, Rolf-Werner Eilert wrote:
 Ok, I see.

 You activate this by Show Button = True in the form dialog. The help
 says Return or set if the standard ../../dialog buttons ('OK' and
 'Cancel') are visible or not.

 And this doesn't help me a lot... ;)

 Rolf


 Am 19.12.2013 12:48, schrieb Caveat:
 I have a pbDone and a pbCancel button on my form.  I'm guessing that if
 you are using the File Chooser's built-in OK/Cancel buttons (where have
 you found that and how are you enabling that ??) that you will have to
 handle them in a similar way... so making a new File Chooser As ... if
 from code, or just sticking it on the form if using the designer...

 Kind regards,
 Caveat

 On 19/12/13 12:32, Rolf-Werner Eilert wrote:
 pbDone_Click()

 Where does that come from?



 Am 19.12.2013 12:15, schrieb Caveat:
 And here's the code from the form containing the File Chooser...

 Having sent you all this, I realise it perhaps doesn't really answer
 your question (sorry!) but perhaps there's enough in here about raising
 and handling events that it becomes clear how to use the OK and Cancel
 events from the File Chooser itself, should you still wish to do so... 
 :-D

 ' Done Event is raised only if Done button pressed and a file has been
 chosen and
 ' returns the chosen file name and the (earlier) provided fileNumber
 ' See below for details of fileNumber
 Event Done(fileName As String, fileNumber As Integer)
 ' Allows us to keep track of which file we're dealing with if there are
 multiple places
 ' where you can choose a file on the main Form
 ' It's returned to the main Form on the Done event
 Private fileNumber As Integer

 Public Sub pbCancel_Click()

  Me.Close

 End

 Public Sub pbDone_Click()

  If FileChooser2.SelectedPath =  Then
Message.Error(No file chosen!  Cancel to return without 
 selecting
 a file)
Return
  Endif
  Raise Done(FileChooser2.SelectedPath, fileNumber)
  Me.Close

 End

 Public Sub setFileNumber(newFileNumber As Integer)

  fileNumber = newfileNumber

 End

 Public Sub setRoot(newRoot As String)

  FileChooser2.Root = newRoot

 End

 Public Sub setFilter(newFilter As String)

  FileChooser2.Filter = newFilter

 End

 Kind regards,
 Caveat

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into 
 your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of 
 AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics 
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics 
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations

Re: [Gambas-user] how to convert VB Project file to Gambas

2013-12-17 Thread Caveat
Sounds like you have some more reading to do.

Start here: http://www.lmgtfy.com/?q=gdi32+linux

Come back to us when you have already done a little research and have 
SPECIFIC questions...

Your approach to this conversion project puts me in mind of someone 
translating Russian to Italian word for word without any knowledge of 
either language! ;-)  I'm curious, did you write the original VB code 
yourself?  What is your ultimate goal?  Have you considered using Wine 
or a VirtualBox?

Kind regards,
Caveat

On 17/12/13 07:03, //SCLPL/ Sudeep Damodar wrote:
 HI All,
 Thank for your valuable comments .i have one doubt i have to declare one
 library function.im used in my vb program like this
 Public Declare Function StretchBlt Lib gdi32(ByVal hDC As Long, _
 ByVal X As Long, _
 ByVal Y As Long, _
 ByVal nWidth As Long, _
 ByVal nHeight As Long, _
 ByVal hSrcDC As Long, _
 ByVal xSrc As Long, _
 ByVal ySrc As Long, _
 ByVal nSrcWidth As Long, _
 ByVal nSrcHeight As Long, _
 ByVal dwRop As Long) As Long
   So i have ti declare this function in to  Gambas so please help me

 Thank n Regards

 Sudeep


 On Mon, Dec 16, 2013 at 5:46 PM, Jussi Lahtinen 
 jussi.lahti...@gmail.comwrote:

 Prefer objects.

 In class file called Coordinates:

 XVal As Float
 YVal As Float
 laseron As String
 mode As String


 And elsewhere:

 Private MyCoordinates As New Coordinates

 Or, if you need array of coordinates:

 Private MyCoordinates As New Coordinates[]


 Jussi




 On Mon, Dec 16, 2013 at 8:57 AM, //SCLPL/ Sudeep Damodar 
 sudee...@scantechlaser.com wrote:

 Hi all

 How to use Type in gambas.my VB Code is given below

 Private Type coordinates
  XVal As Double
  YVal As Double
  laseron As String
  mode As String
 End Type

 When im compile i got error AS is missing ,if i put AS its gets some
 other
 error,so i have to know what is Type syntax in Gambas

 Thanks n Regards
 Sudeep


 On Sun, Dec 15, 2013 at 12:07 PM, Bruce bbr...@paddys-hill.net wrote:

 On Sun, 2013-12-15 at 11:37 +0530, //SCLPL/ Sudeep Damodar wrote:
 Hi All,

 How to make .deb file in gmabas

 Best Regards

 Sudeep
 @IDE
 ^Project|Make|Installation Package
 @Wizard
 #Follow the instructions until step 3
 Select Debian
 #Follow the instructions

 or if that is too hard, press F1
 Then read every page.
 Like we all have done.

 or if that is too hard, read this
 http://www.catb.org/~esr/faqs/smart-questions.html

 Fair go, Sudeep, make at least a bit of effort.






 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into
 your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of
 AppDynamics
 Pro!

 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into
 your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!

 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: [Gambas-user] how to convert VB Project file to Gambas

2013-12-17 Thread Caveat
That's good news (for Sudeep) Jussi!

I never bothered to google StretchBlt (the Blt part made it sound more 
complicated than it really is).

tsk tsk ;-)

Kind regards,
Caveat


On 17/12/13 14:15, Jussi Lahtinen wrote:
 I think you can have same functionality with Draw.Picture().
 http://gambasdoc.org/help/comp/gb.qt4/draw/picture?v3


 Jussi


 On Tue, Dec 17, 2013 at 8:03 AM, //SCLPL/ Sudeep Damodar 
 sudee...@scantechlaser.com wrote:

 HI All,
 Thank for your valuable comments .i have one doubt i have to declare one
 library function.im used in my vb program like this
 Public Declare Function StretchBlt Lib gdi32(ByVal hDC As Long, _
 ByVal X As Long, _
 ByVal Y As Long, _
 ByVal nWidth As Long, _
 ByVal nHeight As Long, _
 ByVal hSrcDC As Long, _
 ByVal xSrc As Long, _
 ByVal ySrc As Long, _
 ByVal nSrcWidth As Long, _
 ByVal nSrcHeight As Long, _
 ByVal dwRop As Long) As Long
   So i have ti declare this function in to  Gambas so please help me

 Thank n Regards

 Sudeep


 On Mon, Dec 16, 2013 at 5:46 PM, Jussi Lahtinen jussi.lahti...@gmail.com
 wrote:
 Prefer objects.

 In class file called Coordinates:

 XVal As Float
 YVal As Float
 laseron As String
 mode As String


 And elsewhere:

 Private MyCoordinates As New Coordinates

 Or, if you need array of coordinates:

 Private MyCoordinates As New Coordinates[]


 Jussi




 On Mon, Dec 16, 2013 at 8:57 AM, //SCLPL/ Sudeep Damodar 
 sudee...@scantechlaser.com wrote:

 Hi all

 How to use Type in gambas.my VB Code is given below

 Private Type coordinates
  XVal As Double
  YVal As Double
  laseron As String
  mode As String
 End Type

 When im compile i got error AS is missing ,if i put AS its gets some
 other
 error,so i have to know what is Type syntax in Gambas

 Thanks n Regards
 Sudeep


 On Sun, Dec 15, 2013 at 12:07 PM, Bruce bbr...@paddys-hill.net
 wrote:
 On Sun, 2013-12-15 at 11:37 +0530, //SCLPL/ Sudeep Damodar wrote:
 Hi All,

 How to make .deb file in gmabas

 Best Regards

 Sudeep
 @IDE
 ^Project|Make|Installation Package
 @Wizard
 #Follow the instructions until step 3
 Select Debian
 #Follow the instructions

 or if that is too hard, press F1
 Then read every page.
 Like we all have done.

 or if that is too hard, read this
 http://www.catb.org/~esr/faqs/smart-questions.html

 Fair go, Sudeep, make at least a bit of effort.






 --
 Rapidly troubleshoot problems before they affect your business. Most
 IT
 organizations don't have a clear picture of how application
 performance
 affects their revenue. With AppDynamics, you get 100% visibility into
 your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of
 AppDynamics
 Pro!

 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into
 your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of
 AppDynamics
 Pro!

 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into
 your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!

 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before

Re: [Gambas-user] how to convert VB Project file to Gambas

2013-12-16 Thread Caveat
http://msdn.microsoft.com/en-us/library/030kb3e9%28v=vs.90%29.aspx

That should get you pointed in the right direction...

Kind regards,
Caveat

On 16/12/13 07:57, //SCLPL/ Sudeep Damodar wrote:
 Hi all

 How to use Type in gambas.my VB Code is given below

 Private Type coordinates
  XVal As Double
  YVal As Double
  laseron As String
  mode As String
 End Type

 When im compile i got error AS is missing ,if i put AS its gets some other
 error,so i have to know what is Type syntax in Gambas

 Thanks n Regards
 Sudeep


 On Sun, Dec 15, 2013 at 12:07 PM, Bruce bbr...@paddys-hill.net wrote:

 On Sun, 2013-12-15 at 11:37 +0530, //SCLPL/ Sudeep Damodar wrote:
 Hi All,

 How to make .deb file in gmabas

 Best Regards

 Sudeep
 @IDE
 ^Project|Make|Installation Package
 @Wizard
 #Follow the instructions until step 3
 Select Debian
 #Follow the instructions

 or if that is too hard, press F1
 Then read every page.
 Like we all have done.

 or if that is too hard, read this
 http://www.catb.org/~esr/faqs/smart-questions.html

 Fair go, Sudeep, make at least a bit of effort.





 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Conflicting and bewildering help for pipes

2013-10-29 Thread Caveat
If gnuplot is giving an error, wouldn't that appear on stderr, which you 
don't appear to be watching?

Just a thought...

Kind regards,
Caveat

On 29/10/13 15:04, Tobias Boege wrote:
 On Fri, 25 Oct 2013, Beno?t Minisini wrote:
 Le 24/10/2013 15:08, Tobias Boege a ?crit :
 My workaround always was like this:

 ' Create the read pipe special file
 hGPstdout = Pipe /tmp/gnuplotFIFO2 For Write
 Close #hGPstdout
 ' Create write end
 hGPpipe = Pipe /tmp/gnuplotFIFO1 For Write
 ' Start writer
 hGPproc = Shell gnuplot /tmp/gnuplotFIFO1 /tmp/gnuplotFIFO2
 ' Really create read end
 hGPstdout = Pipe /tmp/gnuplotFIFO2 For Read Watch

 Note that since the shell which starts hGPproc already opened
 /tmp/gnuplotFIFO2, you won't have any deadlock problems when opening
 hGPstdout For Read afterwards.

 Anyway, if I

 Print #hGPpipe, plot x^2

 only garbage (not non-sense but the string is always scrambled) seems to
 arrive at gnuplot. Also, I seem to get output from gnuplot irregularly. So
 I'm out of options for now. I remember that raising Read events for streams
 has been subject to issues from time to time...

 Regards,
 Tobi

 Please give details. I tried what you said (but plot x*x because
 plot x^2 seems to not be the good syntax), and I always got the plot
 as expected.

 Oookay! I wrote plot x*x and it went flawlessly. However, since plot x^2
 was bad input, gnuplot sent an error message to me before. This just didn't
 come through to me correctly - which means: the output was only partly there
 or scrambled. Maybe buffering (although pipes are not buffered)? Maybe
 something else? I will try again when I've time.

 Regards,
 Tobi

 --
 Android is increasing in popularity, but the open development platform that
 developers love is also attractive to malware creators. Download this white
 paper to learn more about secure code signing practices that can help keep
 Android apps secure.
 http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.logging component when was it introduced?

2013-10-22 Thread Caveat
That's news to me... good news I mean!

Does that mean I can throw away my ugly Logger module? :-D

Kind regards,
Caveat


On 22/10/13 09:43, Bruce wrote:
 I just added the help content for the gb.logging component (the
 component was written by Sebastian Kulesz - I hope he doesn't mind.)

 But I think it was included after 3.0

 Does anyone know which version was the first to include it, so I can set
 the note on the Components page properly.

 rgrds
 Bruce


 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.xml unSerialize

2013-10-19 Thread Caveat
Just use FromText...

   Dim myNoddies As XMLNode[]
   Dim aNode As XMLNode
   myNoddies = XMLElement.FromText(SQLSelect * From table1 where abc 
lt; 123/SQL)
   Print myNoddies.Count
   aNode = myNoddies[0]
   Print aNode.TextContent

Returns:
1
Select * From table1 where abc  123


Kind regards,
Caveat

On 19/10/13 11:09, Bruce wrote:
 What is the opposite of XMLElement.Serialize(text as String)?

 ( I want my SQL text back as ... WHERE rdatecurrent_date... instead
 of ... WHERE rdatelt;current_date...)

 tia
 Bruce


 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas and MS SQL

2013-10-18 Thread Caveat
Hi Ivan

[Hi Randall, you got there before me, but I think this is still useful 
even if it is repeating stuff that may have appeared on the mailing list 
before]

Yes, it's quite possible.  There's a very good guide here: 
http://ubuntuforums.org/showthread.php?t=1098688

It worked fine for me on Ubuntu... I just had to do:

  sudo apt-get install unixodbc unixodbc-dev freetds-dev sqsh tdsodbc

  sudo vi /etc/freetds/freetds.conf

and added an entry like:
[MSSQL_TRY]
 host = www.myserver.com
 port = 1433
 tds version = 7.0

Then test the basic FreeTDS setup (obviously replace some_user and 
some_pwd and some_dbname (and some_...) with an appropriate username, 
password, dbname blah blah):

  sqsh -S MSSQL_TRY -U some_user -P some_pwd
1 use some_dbname
2 go
1 select top 1 some_column, some_other_column from some_table
2 go
1 quit

Next, as the guide says, configure odbc... you need to edit 
/etc/odbcinst.ini and /etc/odbc.ini to look like this:

  cat /etc/odbcinst.ini
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
#Driver   = /usr/lib/odbc/libtdsodbc.so
Driver  = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
#Setup   = /usr/lib/odbc/libtdsS.so
Setup  = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
CPTimeout  =
CPReuse  =
FileUsage = 1

and this:

  cat /etc/odbc.ini
[MSSQL_TRY]
Driver= FreeTDS
Description= ODBC connection via FreeTDS
Trace = No
Servername  = MSSQL_TRY
Database   = some_dbname

Note that, in my case (perhaps because of newer version or 64bit version 
of Ubuntu, my .so files were in a different place in the odbcinst.ini file),

Now test in isql that everything is good (as per the guide):

isql -v MSSQL_TRY some_user some_password
+---+
| Connected!|
|   |
| sql-statement |
| help [tablename]  |
| quit  |
|   |
+---+
SQL select * from some_table
...
SQL quit

Then, finally, in Gambas code something like:

   With myDB
 .Type = odbc
 .Host = MSSQL_TRY
 .Login = some_user
 .Password = some_password
 .Name = some_dbname
   End With

Let me know if anyhting is not clear

Kind regards,
Caveat



On 18/10/13 10:47, Ivan Kern wrote:
 Hello.

   

 Does somebody use Gambas for communication with MS SQL database?

 Is it possible with ODBC?

   

 Best regards,

   

 Ivan

   

 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [slightly OT] No Problem with Gambas or MySql!

2013-10-07 Thread Caveat
Thanks Randall, we got some great discussions going here.  I think the 
closing paragraph sums it up quite well...



So err on the side of caution and normalize your data until you have
the experience needed to know when to break the rules. If you always
normalize your data you will be correct 99.91 percent of the time. That
last 0.09 percent of the time you may never get to



Of course, as I later said, my pennies example was a prime candidate for 
normalisation!  And, I think, the case Willy is dealing with would have 
been normalised (in an ideal world) from:

| ID  | Gewicht |
   345   100
   345   100
   345   50
   347   200
   347   200
   347   200
   347   200

to:

| ID  | Gewicht |  Count  |
   345  100 2
   345  50  1
   347  200 4

with a Primary Key composed of ID and gewicht (weight).
But, Willy is working with a legacy system, and we don't know for sure 
why someone decided to make (for example) 4 identical 347-200 rows, 
instead of one 347-200 row with a count of 4.  Perhaps it's a very busy 
system and the designer thought having many people able to create and 
delete arbitrary numbers of ID-weight rows would make it easier to 
manage the counts/weights in a system with many concurrent users, rather 
than having people queue up to modify the count on a normalised 347-200 
row?  Who knows!

Kind regards,
Caveat


On 06/10/13 20:24, Randall Morgan wrote:
 If you need some books on relational databases. I can give you private
 access to my library or digital/scanned books. They will explain things
 much better that we have here and teach you SQL. Also, know that relational
 data bases are only one type of data base. There are other types of
 databases not yet directly supported by Gambas. But 99% of databases are
 indeed relational and even those that are not typically carry along of the
 ideas from relational databases.




 On Sun, Oct 6, 2013 at 11:17 AM, Randall Morgan rmorga...@gmail.com wrote:

 A simple explanation as to why you do not repeat data in a rational
 database. (Very simplistic):

 Rational or Relational data bases normalize data so that any usage of a
 single bit of data is stored only once. This allows the data to be edited
 in only one location and also requires the least amount of storage. By
 centralizing the bit of data into one location you gain power. For example,
 say you have a customer database where the customer(s) must enter their
 city each time they place an order. The customer(s). Some customers may
 misspell the city name, or use an abbreviation. Allowing such entries into
 the data would make using the address information difficult. But it would
 also make it difficult to search the database for all customers from a
 particular city.

 If you allow the same information in multiple places, you will cause
 situations where the data must be edited in multiple places or every
 search/query must be written to handle an almost endless list of
 possibilities for each value of interest.

 Say you allow multiple records for the same order. When you update the
 order status, one will show the order with the updated status and one
 without. Which one is correct? Do you assume the one with the lastest
 status is correct? What if someone in the shipping department made an
 error? Now you have confusing records You also have wasted space which
 cost real money for real storage, and real cpu time to locate the correct
 or all records, and real geo time for the user to review and decide which
 of the multiple records is correct. The user may also have to do additional
 work to combine information from multiple records to compile a complete
 picture of the data.

 By enforcing data normalization (the art of not repeating data values),
 you limit the amount of work both the cpu and the end user must do. You
 build a system where there is only one entry to edit, or update. You
 provide a single source and a single point of contention/resolution to
 conflicts.

 Data normalization is to data what OOP is to programming. It is not
 perfect, and can be taken to extremes. But it is a valuable tool and should
 be used in both coding and data storage/retrieval. It is not the only tool
 and there are the rare edge cases where one may need to break the rules.
 But I can pretty much guaranty you that if you don't understand why you
 need it, you don't yet understand when you should and should break the
 rules. So err on the side of caution and normalize you data until you have
 the experience needed to know when to break the rules. If you always
 normalize your data you will be correct 99.91 percent of the time. That
 last 0.09 percent of the time you will may never get to




 On Sun, Oct 6, 2013 at 2:55 AM, Charlie Reinl karl.re...@fen-net.dewrote:

 Am Sonntag, den 06.10.2013, 10:55 +1030 schrieb Bruce:
 On Sun, 2013-10-06 at 00:58 +0200, Willy Raets wrote:
 On Sun, 2013-10-06 at 00:05 +0200, Caveat wrote:
 If you

Re: [Gambas-user] [slightly OT] No Problem with Gambas or MySql!

2013-10-06 Thread Caveat
Thanks for the great horse story Bruce.  Willy asked me once whether I 
preferred MySQL or postgreSQL and I couldn't really come up with a very 
smart answer! Perhaps that helps :-)

The only thing I find odd is why you don't just use the microchip ID as 
the primary key... then a name change would just be a change of 
attribute.  You can still create a unique index on the name (so lookups 
aren't slower, duplicate names are avoided at the db level...).  Or does 
your system have to register horses before they're chipped?

And, of course, we all know my penny story is ultimately nonsense!  Deep 
down, we all realise that if the pennies are so indistinguishable, then 
all we need is one 'pennies' object and a count.  Putting aside the 
storage concerns, even in logical terms you'd quickly realise that you 
don't need 13 separate identical objects to represent 13 pennies!  Same 
for what Willy is doing, but I guess he's dealing with something that's 
been done that way historically for one reason or another.

Kind regards,
Caveat

On 06/10/13 02:25, Bruce wrote:
 On Sun, 2013-10-06 at 00:58 +0200, Willy Raets wrote:
 On Sun, 2013-10-06 at 00:05 +0200, Caveat wrote:
 If you wanted to delete one row with values 347 200, then which row would 
 it be?
 It *doesn't matter*!  The rows are the same, so pick a row, ANY row!
 That is exactly what I have been doing for the last 10 years.
 In VB code I just looked for the criteria in the table and deleted the
 first record that met the criteria, next update table and ready.

 In Gambas I tried the same, now with the table being in MySql, and it
 didn't work.

 It never, ever failed me in those 10 years, even without a primary key.
 Although most other tables do have primary keys and relations set up,
 there never was a need for this table to have a primary key.
 And I still do not see the need for a primary key.

 Without the primary key, you're asking MySQL to guess, and it wont.
 Yes it will, if you use LIMIT (see my previous two mails).  Otherwise, 
 it'll happily delete all the rows that meet the criteria, whether they're 
 duplicates or not.

 And even in MySql there is NO need for the table to have a primary key
 as the 'SELECT ... limit 1' will do what I expect, delete only 1 record
 that meets the criteria.

 duplicate rows are and always were a mistake in SQL, C.J.Date
 Duplicate rows are a reality in real life data gathering.
 I have been working with databases since dbase somewhere in the '80's
 and I have had to deal with real life situations concerning data
 storage, not with theory for ideal models. Not saying I haven't read my
 share on relational database design and take it into account when
 designing a database.

 The guy has obviously never read William Kent's Data and Reality. It's
 a book I'd still recommend to anyone working with data and particularly
 databases, even though it was written 35 years ago!

 RANT
 Why *must* every record be uniquely identifiable?  Explain why... don't
 just throw random snippets of relational database theory at me!  If I
 ask you to model the contents of your pockets on a database, are you
 going to attach some artificial key to each individual penny?  Why?
 They each buy the same number of penny chews (showing my age!), and if
 you take 3 pennies away, you've still got 3 pennies less than you had
 before, no matter how carefully you select those 3 pennies!
 /RANT

 HINT
 A tuple is, by definition, unique.  If I have 8 rows on my database
 representing 8 real-world penny objects and I can delete 3 of them...
 are the remaining 5 rows tuples?  How closely does the database model
 reality in this case?
 /HINT
 I like your penny story ;)


 [ASIDE!]

 Interesting discussion, but someone recently asked me why I prefer
 postgresql over mysql and this thread reminded me that I never answered.

 One of those reasons is that this whole situation cannot occur in
 postgresql.  It has been designed such that it cannot. Considering a
 non-normalised table, i.e. one that has no natural (unique) primary key,
 all rows are still capable of being operated on using the standard sql
 commands. However, in that case, *all* rows that succeed the WHERE
 filter clause will be acted on. Fullstop.

 Putting that another way, postgresql doesn't really care whether the
 table has a primary key set or not. Nor does it care whether a delete or
 an update query uses a unique row identifier.  That sounds pretty slack,
 doesn't it?  Well, not at all really.  It relies on the WHERE clause to
 identify the set of rows to be operated on and that is all.  If such a
 clause identifies multiple rows then they will all be affected. So, to
 continue the coin collection analogy and a theoretical sql command:
 SELL COIN WHERE YEAR=1930 AND ALLOY=Cupronickel;
 would sell all the coins that match.  The idea that you could write a
 command like:
 SELL THE FIRST COIN YOU FIND WHERE YEAR=1930 AND ALLOY=Cupronickel;
 really, to me brings a sense of randomness

Re: [Gambas-user] Problem with Gambas and MySql

2013-10-05 Thread Caveat
MySQL itself doesn't mind about having no primary key:

mysql desc test_table;
+---+-+--+-+-+---+
| Field| Type| Null  | Key | Default | Extra |
+---+-+--+-+-+---+
| Actual ID | varchar(20) | YES  | | NULL|   |
+---+-+--+-+-+---+

mysql select * from test_table where `Actual ID` = 'My actual ID';
+--+
| Actual ID|
+--+
| My actual ID |
| My actual ID |
| My actual ID |
| My actual ID |
| My actual ID |
| My actual ID |
+--+
6 rows in set (0.00 sec)

mysql delete from test_table where `Actual ID` = 'My actual ID' limit 2;
Query OK, 2 rows affected (0.13 sec)

mysql select * from test_table where `Actual ID` = 'My actual ID';
+--+
| Actual ID|
+--+
| My actual ID |
| My actual ID |
| My actual ID |
| My actual ID |
+--+
4 rows in set (0.00 sec)

If the records are *identical*, it *can't* matter which ones you 
actually delete!

Even in Gambas, I don't run into any problems specifically to do with 
having no Primary Key:

   Try myDB.Open
   If Error Then
 Message(Cannot Open database:  Error.Text)
 Return False
   End If
   myDB.Exec(delete from test_table)
   For n = 1 To 6
 myDB.Exec(insert into test_table values ('My actual ID'))
   Next
   res = myDB.Exec(select * from test_table)
   counter = 0
   res.MoveFirst
   While res.Available
 counter += 1
 Print Str(counter)  :   res[Actual ID]
 res.MoveNext
   Wend
   myDB.Exec(delete from test_table where `Actual ID` = 'My actual ID' 
limit 2)
   res = myDB.Exec(select * from test_table)
   counter = 0
   res.MoveFirst
   While res.Available
 counter += 1
 Print Str(counter)  :   res[Actual ID]
 res.MoveNext
   Wend

The above code works perfectly, giving the expected results:

1: My actual ID
2: My actual ID
3: My actual ID
4: My actual ID
5: My actual ID
6: My actual ID
1: My actual ID
2: My actual ID
3: My actual ID
4: My actual ID

Willy, can you explain again EXACTLY what your problem is?  What error 
do you get, where, and when... ?

Kind regards,
Caveat



On 05/10/13 14:08, Willy Raets wrote:
 On Sat, 2013-10-05 at 10:08 +0200, Fernando Martins wrote:
 On 10/05/2013 01:25 AM, Willy Raets wrote:
 On Fri, 2013-10-04 at 22:53 +0200, Willy Raets wrote:

 Nando, Fernando and Caveat,

 Thanks for your responses.

 Content in 'ICzakgewicht' can be like this:
 | ID | Gewicht |
 345 100
 345 100
 345 50
 347 200
 347 200
 347 200
 347 200
 @ Fernando and Caveat

 Above you can see that more than one record can be exactly the same.
 At any time only one of them needs to be removed.
 With Gambas this can be done, looking for the first record meeting the
 criteria, delete it, next update and leave the table.

 With SQL DELETE all records that meet the criteria will be deleted
 instead of only one.

 That is why this is not an option.


 duplicate rows are and always were a mistake in SQL, C.J.Date

 http://books.google.nl/books?id=y_eVBB5qdwMCpg=PA159lpg=PA159dq=c+j+date+duplicate+recordssource=blots=DjN-LDuU2Bsig=5-vlJ8itEkC7h6aFMt2PxHkT-ughl=ensa=Xei=1cdPUtjSCcHH0QWvooGQCwredir_esc=y#v=onepageq=c%20j%20date%20duplicate%20recordsf=false

 In my experience, most often there is a design problem with the database
 allowing for duplicates. With duplicates, you step out of the set theory
 behind relational dbs and enter into trouble. I admit I have done it
 myself, but best be avoided.

 Then adding a primary key should solve that problem.



--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [slightly OT] No Problem with Gambas or MySql!

2013-10-05 Thread Caveat
 If you wanted to delete one row with values 347 200, then which row would it 
 be?

It *doesn't matter*!  The rows are the same, so pick a row, ANY row!

 Without the primary key, you're asking MySQL to guess, and it wont.

Yes it will, if you use LIMIT (see my previous two mails).  Otherwise, it'll 
happily delete all the rows that meet the criteria, whether they're duplicates 
or not.

 duplicate rows are and always were a mistake in SQL, C.J.Date

The guy has obviously never read William Kent's Data and Reality. It's 
a book I'd still recommend to anyone working with data and particularly 
databases, even though it was written 35 years ago!

RANT
Why *must* every record be uniquely identifiable?  Explain why... don't 
just throw random snippets of relational database theory at me!  If I 
ask you to model the contents of your pockets on a database, are you 
going to attach some artificial key to each individual penny?  Why?  
They each buy the same number of penny chews (showing my age!), and if 
you take 3 pennies away, you've still got 3 pennies less than you had 
before, no matter how carefully you select those 3 pennies!
/RANT

HINT
A tuple is, by definition, unique.  If I have 8 rows on my database 
representing 8 real-world penny objects and I can delete 3 of them... 
are the remaining 5 rows tuples?  How closely does the database model 
reality in this case?
/HINT

Kind regards
Caveat

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problem with Gambas and MySql

2013-10-04 Thread Caveat
Hi Willy

Me again!

Either use LIMIT row_count on your delete statement as per 
http://dev.mysql.com/doc/refman/5.0/en/delete.html

Or use an auto-incrementing primary key that your VB clients don't need 
to worry about as per 
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

Kind regards,
Caveat

On 04/10/13 22:53, Willy Raets wrote:
 Hi All,

 In a bigger project where creating, editing and deleting records works
 as a charm, only one table is giving me trouble and just won't delete a
 record with reason 'No primary key'.

 Now the table in question 'ICzakgewichten' was migrated from an Access
 database to MySql and in Access it was no problem to delete a record
 from a Windows VB client.

 I'm in the process, next to the existing Windows VB-clients, writing
 Linux Gambas-clients. Hence the move of data from Access to MySql. The
 VB-clients get connected to the tables in MySql and will co-exist with
 the Gambas written clients for a while, until migration complete on all
 client PCs.

 The table has a one to many releation (being at the many side) with a
 'mother' table 'IC' that holds (amongst others) following relevant
 fields:
 | ID |  | NumItems | 
 ID is a primary key

 The table ICzakgewichten looks like this:
 | ID | Gewicht |

 Note: gewicht (Dutch) means weight.

 Content in 'ICzakgewicht' can be like this:
 | ID | Gewicht |
 345 100
 345 100
 345 50
 347 200
 347 200
 347 200
 347 200

 In IC the records would look like:
 | ID |  | NumItems | 
 345 . 3
 347 . 4
 NumItems holds the number of corresponding records in ICzakgewicht.

 Now along the road the NumItems decrements until it reaches 0.
 Corresponding records in ICzakgewicht need to be deleted as well.

 And this is where stuff won't work, as I am not allowed to delete the
 records because of no primary key in tabe 'ICzakgewicht'.

 I could add a primary key, but that would mean adapting the VB-clients
 to the new table format and I don't really want to go there as they are
 on their way out.

 I have created a small example project and exported 'ICzakgewichten'
 from MySql.

 To make example work you need:
 1. A working MySql server
 2. A empty database named 'test'
 3. A user account and password to the database

 In database test import the added 'ICzakgewichten.sql'
 It was exported from MySql Server version: 5.5.31

 In the Gambas added example, change user and password (and all else that
 might be needed) to meet your needs.

 You will find the code in following procedure:

 Public Procedure Connect()
 
 MyConn.Close()
 MyConn.Type = MySQL
 MyConn.Host = 127.0.0.1
 MyConn.Login = willy'- change to your situation
 MyConn.Port = 3306
 MyConn.Name = test
 MyConn.Password = 9876  '- change to your situation
 MyConn.Open()
 If Error Then
Message(Can't open database:   Error.Text)
Return
 Endif
 
 End

 Next run the application, select an ID in the combobox and add a
 corresponding weight (in example no check if weight exist in table, in
 real project there is, so pick one that exists!).
 Next click button 'Delete' to get the error.

 My question, how to prevent this error from happening, preferably
 without having to add a primary key to the table?




 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk


 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] accessing mdb files

2013-08-31 Thread Caveat
The software directly accesses the mdb file, using the jackcess library 
(http://jackcess.sourceforge.net/), so no Access nor Windoze required.

I haven't worked out all the licensing yet (it builds on a few other 
java libraries too) so I'm not yet ready to release the code publicly.

What I'm looking for is to try the software out on a few other 
databases, see what makes it break

Right now there's no guarantees it doesn't just happen to work on 
Northwind and our database from work by pure chance

Kind regards,
Caveat

On 30/08/13 22:45, Fabien Bodard wrote:
 is your converter free ? (GPL ?)


 2013/8/30 Fernando Martins ferna...@cmartins.nl

 On 08/29/2013 07:51 PM, Caveat wrote:
 It's perhaps a little off-topic as this is a Gambas mailing list, but I
 have written a .mdb to mysql|postgresql|hsqldb|mssqlserver converter in
 java.  I tried using mdbtools but never got very satisfactory results,
 so I wrote my own conversion software.


 Are you accessing directly the mdb file structures or using intermediary
 software, e.g. ODBC?

 Regards,
 Fernando


 --
 Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
 Discover the easy way to master current and previous Microsoft technologies
 and advance your career. Get an incredible 1,500+ hours of step-by-step
 tutorial videos with LearnDevNow. Subscribe today and save!
 http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user





--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-29 Thread Caveat
You just need to use backticks...

   Try myDB.Open
   If Error Then
 Message(Cannot Open database:  Error.Text)
 Return False
   End If
   myDB.Exec(delete from test_table)
   myDB.Exec(insert into test_table (`Actual ID`) values('My actual ID'))
   res = myDB.Exec(select `Actual ID` from test_table)

   For Each resF In res.Fields
 Print resF.Name
   Next
   res.MoveFirst
   While res.Available
 Print res[Actual ID]
 res.MoveNext
   Wend
   Return True
End

prints:

Actual ID
My actual ID

Alternatively, to be sure you get the backtick and not the single quote:

   myDB.Exec(delete from test_table)
   myDB.Exec(insert into test_table (  Chr(96)  Actual ID  
Chr(96)  ) values('My actual ID'))
   res = myDB.Exec(select   Chr(96)  Actual ID  Chr(96)   from 
test_table)

Kind regards,
Caveat

On 29/08/13 09:52, nando wrote:
 I see spaces in the field 'Initial IC' and 'Actual IC'.
 If you're using a space in the field name - DONT!!!
 Use _ underscore instead.
 Don't use a spaces in any names.
 You complicate life with them and make you want to pull your hair out.

 This should work

 myString = SELECT IC.ID, Product.Description 
 myString.= FROM IC, Product 
 myString.= WHERE IC.ProductID = Product.ProductID 
 myString.= ORDER BY IC.ID DESC
 rData = ConMyData.Exec(myString)


 This is not correct:
 rData = ConMyData.Exec(SELECT 1 FROM IC, 'Actueel IC')

 Should be:
 rData = ConMyData.Exec(SELECT `Actual IC` FROM IC)

 Again, PLEASE don't use spaces embedded in the field.



 -- Original Message ---
 From: Willy Raets wi...@earthshipbelgium.be
 To: mailing list for gambas users gambas-user@lists.sourceforge.net
 Sent: Wed, 28 Aug 2013 22:18:52 +0200
 Subject: [Gambas-user] SQL query for DB.Exec() question

 Hello all,

 I've been searching the Gambas mailing list archives and documentation
 for a answer to a problem I have. Tried all kinds of suggestions but
 haven't solved the problem yet.

 This is the situation simplified:

 A MySql database named MyData with a two tables named IC and Products.
 Both tables have a field ProductID with a relation inbetween.

 Table IC has fields
 ID   - Primary Key, Indexed
 ProductID- Indexed
 Initial IC
 Actual IC
 ValueInitial
 ValueActual

 Table Product has fields:
 ProductID- Primary Key, Indexed
 Description

 In a query I need to retrieve all fields in IC except ProductID and
 Description in Products
 I manage to get the query done except for the fields Initial IC and
 Actual IC (because of the blanc in the field name).

 As I understand in MySql I need to query:
 SELECT 'Actual IC' FROM IC to get Actual IC

 I have tried it like this in Gambas (rData being a Result and ConMyData
 being the connection)

 rData = ConMyData.Exec(SELECT 1 FROM IC, 'Actueel IC')

 But the syntax is not accepted by MySql

 To make the matter more complicated when querying more than one table
 you need to add the table to the query syntax like this
 SELECT IC.ID, Product.Description  FROM IC LEFT JOIN Product ON
 IC.ProductID=Product.ProductID ORDER BY IC.ID DESC

 Or in Gambas:

 rData = ConMyData.Exec(SELECT IC.ID, Product.Description  FROM IC LEFT
 JOIN Product ON IC.ProductID=Product.ProductID ORDER BY IC.ID DESC)

 This works perfect, but when I want to add field IC.Actual IC to that
 query in a db.Exec() what is the proper format?
 I tried with:
 IC.'Actual IC'
 'IC'.'Actual IC'
 'IC.Actual IC'
 They all give back syntax errors from MySql

 Any suggestions welcome

 -- 
 Kind regards,

 Willy (aka gbWilly)

 http://gambasshowcase.org/
 http://howtogambas.org
 http://gambos.org

 --
 Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
 Discover the easy way to master current and previous Microsoft technologies
 and advance your career. Get an incredible 1,500+ hours of step-by-step
 tutorial videos with LearnDevNow. Subscribe today and save!
 http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --- End of Original Message ---


 --
 Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
 Discover the easy way to master current and previous Microsoft technologies
 and advance your career. Get an incredible 1,500+ hours of step-by-step
 tutorial videos with LearnDevNow. Subscribe today and save!
 http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 .



--
Learn the latest--Visual Studio 2012

Re: [Gambas-user] Microsoft Access database

2013-08-13 Thread Caveat
Hi Ivan

Ready to take another look at converting your multi-user database (ahem! 
SINGLE USER FILE!) to a proper dbms? :-D

I did also look at mdbtools and the like before rolling my own 
conversion tool but nothing worked particularly well... I ended up with 
some fugly combination of awk, sed, grep, etc. and it still didn't do 
the conversion right!

If your data isn't particularly sensitive nor particularly huge, send it 
on and I'll see what my conversion program makes of it. Right now, I've 
converted the database we use at work for stock control, invoicing etc. 
to both MSSQLServer and MySQL and of course, the ubiquitous Northwind 
sample db.  I'm still planning on adding support for binary data 
fields... if you don't have any, then you're in luck!

Kind regards,
Caveat

On 13/08/13 16:03, Rob Kudla wrote:
 On 2013-08-13 09:31, Bruce wrote:
 a) MSAccess did/does not run as a server process, especially to remote
 machines.  In order to get it to that we had to use ODBC and establish
 a connection process on the server and similarly an ODBC client on
 the remote client machine. In the case of a single connection to the
 server this was reasonably trivial, but if multiple clients were
 involved this bordered on a nightmare.
 This can't be stressed enough. Furthermore, if Access is actually running
 on the remote machine as Ivan said, that counts as a client. If you access
 the database via ODBC at the same time as through Access itself, whether
 your ODBC client is VB, Gambas or anything else, you risk corruption. Like
 sqlite, Access is designed for single-user data storage, even if Microsoft
 has added features over the years to make it seem otherwise.

 I did a project exactly like this about 8 years ago, and we ended up
 moving the data into a MySQL server, converting the tables to ODBC links
 using some Access macro we found in a MySQL forum, and accessing the MySQL
 data natively from Gambas and a web inquiry system. Even so, Access
 misbehaved constantly and made it a nightmare.

 Multi-user networked database applications need a multi-user networked 
 database
 server. Period.

 Rob

 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Microsoft Access database

2013-08-12 Thread Caveat
Not that I know of, but I have written a system to convert MSAccess 
databases to MySQL/postgresql/MSSQLServer.  It's written in java and 
uses the jackcess library (http://jackcess.sourceforge.net/).

I also wrote a server which makes calls to the jackcess library based on 
simple text commands, so in theory you could make a basic client in 
Gambas...

Let's first see if anyone has already found a way to talk to access dbs 
directly in Gambas...

Kind regards,
Caveat

On 12/08/13 13:39, Ivan Kern wrote:
   

 Hi,

   

   

 Is it possible to connect  Microsoft access database with Gambas?

 If yea, please, an example.

   

 Best regards,

 Ivan

 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] scraping html

2013-07-13 Thread Caveat
You need to use the right tool for the job.  I find the python tool 
BeautifulSoup one of the best for parsing and extracting data from web 
pages.

http://www.crummy.com/software/BeautifulSoup/

Kind regards,
Caveat

On 12/07/13 09:01, Shane wrote:
 Hi everyone

 i am trying to get some info from a web page in the format of

 div class=result
 div class=colText I Want/div
 div class=col
 And Some More i Want
 /div
 div class=col
 And The last bit
 /div
 /div

 what would be the best way to go about this i have tried a few way but i
 feel there must be an
 easy way to do this

 thanks shane

 --
 See everything from the browser to the database with AppDynamics
 Get end-to-end visibility with application monitoring from AppDynamics
 Isolate bottlenecks and diagnose root cause in seconds.
 Start your free trial of AppDynamics Pro today!
 http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] read/data commands

2013-06-28 Thread Caveat
Think the rest of the list are pretending to be younger than they are!

Of course I remember read/data statements, it was quite a popular way of 
getting a little (and sometimes not so little!) snippet of machine code 
into a basic program.

I still have my Spectrum 48k, my ZX81, and my ZX80 :-D

Kind regards,
Caveat

On 27/06/13 23:54, Keith Clark wrote:
 No, the data was just an example.  What if it were to be 255 unrelated
 values?

 Did nobody else use BASIC from the 80s?

 Read/Data statments.

 On 13-06-27 05:48 PM, Jussi Lahtinen wrote:
 I don't quite understand usage of data...

 Will this do what you want?

 Dim data As Integer[] = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
 Dim v As New Integer[]

 v = data.Copy()


 Or this:

 Dim ii As Integer, jj As Integer
 Dim data As New Integer[5, 5]

 For ii = 0 To 4
 For jj = 0 To 4
   data[ii, jj] = jj + 1
 Next
 Next


 Jussi








 On Thu, Jun 27, 2013 at 10:55 PM, Keith Clark 
 keithcl...@k-wbookworm.comwrote:

 On 13-06-27 05:34 AM, Tobias Boege wrote:
 On Wed, 26 Jun 2013, Keith Clark wrote:
 Does Gambas support read/data commands like the following for loading a
 simple array with fixed values?

 for t=0 to 4
 for x = 0 to 4
 read v(t,x)
 next x
 next t

 data 1,2,3,4,5,1,2,3,4,5,1,2,3,4,5..

 Maybe I'm just not finding it?

 I don't know what you want to do, actually, and your snippet does not
 resemble Gambas at all... Maybe you want to access elements of a 2D array
 where t is the row and x is the column? So if v is an Integer[][], then
 you
 need to do:

 For t = 0 To 4
  For x = 0 To 4
Print v[t][x]
  Next
 Next

 Regards,
 Tobi


 Yeah, I posted that question rather quickly.  I want to fill an array
 with a very simple, fixed dataset that will never change.  The code I
 gave above is from an old dialect, but really just the curved brackets
 should have been square.

 for t=0 to 4
 for x = 0 to 4
 read v[t,x]
 next x
 next t

 data 1,2,3,4,5,1,2,3,4,5,1,2,3,4,5..

 Would read into the array v the data in the 'data' statement

 v[0,0]=1
 v[0,1]=2
 and so on.

 For reference:
 http://www.antonis.de/qbebooks/gwbasman/read.html


 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Connect hang with latest revision

2013-06-06 Thread Caveat
Hmmm... well I've taken a quick glance at the source and the 
documentation (Shock news! Developer looks at documentation!!!) and it 
looks like it's less simple than we thought.

When making a connection, it seems as if Gambas insists on using 
Blocking mode True internally, there is no storage or remembering of the 
original Blocking mode, so as far as I can see any setting of Blocking 
mode prior to making a connect is not going to be useful anyway.  In 
fact, from reading the documentation of Gambas 
(http://gambasdoc.org/help/comp/gb.net/socket?v3), it looks like it's 
expected that all Socket comms will be be in non-Blocking (asynchronous) 
mode:

This class performs its work asynchronously, so the program will not be 
stopped while connecting, sending or receiving data. 

Also it looks like the code relating to Blocking/non-Blocking is 
provided by the Stream class which Socket inherits.  I think if we're 
going to make it possible for the user to specify whether they want 
Blocking or not, and by implication, set a Timeout value... it will need 
a little more work than just a tweak to call set_timeout whenever 
set_blocking is called...

Kind regards,
Caveat

On 03/06/13 21:14, Benoît Minisini wrote:
 Le 02/06/2013 17:05, Ron a écrit :
 Bug #1 and Bug #2 are fixed, thanks for that!

 The time it takes for Event_Error to trigger is still more than 2 minutes.
 I see that in ClientSocket there is a 10sec timer running which cuts
 the socket if still not connected.

 Is this the way it should be implemented, what about the TimeOut
 property it seems it doesn't work?
 Would be nice if users know after 10 secs that the socket is unable to
 connect, +2 minutes is too long...

 Regards,
 Ron.

 Hi Ron,

 I have implemented what Caveat told in revision #5696: the timeout is
 reset each time the blocking mode changes internally.

 Can you try it and tell me if it changes anything for you?



--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Connect hang with latest revision

2013-06-03 Thread Caveat
Strangely enough, I had a similar problem with sockets in python.  
Turned out that the problem was caused by setting the timeout value on a 
socket, *then* setting the blocking mode.  It seems as if the underlying 
socket 'loses' the timeout value (I actually discovered it when creating 
a help function that showed the state of the socket) when you set the 
blocking mode.

I was seeing the same symptoms as you, I had the timeout set (or so I 
thought!) to 10 seconds and the socket would take more than 2 minutes to 
time out...

I presume under Gambas you have the same possibility to set 'blocking' 
sockets (synchronous) and 'non-blocking' (asynchronous) sockets and to 
set a user-defined timeout value.

Please do try first setting the socket to blocking (synchronous) mode, 
THEN setting the timeout value!

Kind regards,
Caveat

On 02/06/13 17:05, Ron wrote:
 Bug #1 and Bug #2 are fixed, thanks for that!

 The time it takes for Event_Error to trigger is still more than 2 minutes.
 I see that in ClientSocket there is a 10sec timer running which cuts
 the socket if still not connected.

 Is this the way it should be implemented, what about the TimeOut
 property it seems it doesn't work?
 Would be nice if users know after 10 secs that the socket is unable to
 connect, +2 minutes is too long...

 Regards,
 Ron.

 2013/6/1 Benoît Minisini gam...@users.sourceforge.net:
 Le 01/06/2013 10:33, Ron a écrit :
 Benoit,

 It seems to be a Gambas3 thing all along... not latest revisions...
 but I didn't see this until I specified a wrong IP address to connect
 too in my project.
 Also on the Raspberry Pi I saw this earlier, thinking... man that's a
 slow device, now I know Gambas socket blocks everything when a host
 cannot be reached..

 I detected three bugs... and filled this bug report.
 https://code.google.com/p/gambas/issues/detail?id=435

 Regards,
 Ron_2nd.

 OK. It seems to be an old bad change. I fixed it in revision #5689.

 Regards,

 --
 Benoît Minisini

 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite
 It's a free troubleshooting tool designed for production
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://p.sf.net/sfu/appdyn_d2d_ap2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite
 It's a free troubleshooting tool designed for production
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://p.sf.net/sfu/appdyn_d2d_ap2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Possible bug

2013-05-14 Thread Caveat
Yeah, I see what you're trying to do. You can use \\ to make a single \ 
as the \ is normally the first part of a special character constant 
(e.g. \t makes a Tab character).  I think you can just wrap file/dir 
names with spaces in them in quotes for use in bash scripts.

Oh, and my Gambas doesn't crash with the code exactly as you had it.  As 
Benoit experienced, it just doesn't compile, same for me (compile error 
isBad character constant).

Kind regards,
Caveat

On 15/05/13 01:17, Charlie wrote:
 Hi  Benoit,

 It may, or may not, be good syntax but press F5 and Gambas crashes. You can 
 not compile it because Gambas crashes.

 The purpose of the code was to change dir string into a form tha BASH would 
 accept from Shell command if there are spaces in the dir string.

 I am not an expert in any of this. I am just tring to help by pointing this 
 issue out. If it is a syntax error Gambas should detect this and not crash.

 Regards,

 Charlie.





 Sent from Charlie's Samsung tabletBenoît Minisini [via Gambas] 
 ml-node+s8142n41946...@n7.nabble.com wrote:Le 14/05/2013 18:09, Charlie a 
 écrit :

 Hi all,

 You need one *Button* and one *DirChooser* on your form
 I have reduced code to the following to emulate this bug I am getting: -
 '*
 Public Sub _new()
 End

 Public Sub Form_Open()
 End


 Public Sub Button1_Click()

 Dim SDir As String
 Sdir = DirChooser1.SelectedPath
 SDir = Replace(SDir,  , \ )
 This line is not syntactically correct (\ ). Please provide a project
 or at least code that compiles!

 Regards,



--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3.4.0 installation - help needed

2013-03-03 Thread Caveat
  However, it still does not work.
Please give more details!  Does it still tell you gambas is not 
installed?  Does it now crash?  What error do you see, exactly? Can you 
copy paste?

On 03/03/13 09:52, bill-lancaster wrote:
 Yes, I forgot that step.
 However, it still does not work.
 I went through this process on a machine that has never had Gambas installed
 and everything was fine.
 So I'm thinking that somehow I haven't fully removed my previous gambas
 version but I don't know what to do now!



 --
 View this message in context: 
 http://gambas.8142.n7.nabble.com/Gambas3-4-0-installation-help-needed-tp41277p41287.html
 Sent from the gambas-user mailing list archive at Nabble.com.

 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_feb
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Printing - same code - two machines - two outputs

2012-11-14 Thread Caveat
They have different barcodes on (different source numbers).  Are you 
sure you're using **the same** code?  Are you sure you don't have one pc 
set to A4 and the other to Letter or so?

Can you share the project?  Can't really see how anyone can help you 
further with so little information.

Kind regards,
Caveat

On 14/11/12 16:39, Gregor Burck wrote:
 Hi,

 I write a little application to print some barcodes. With the same code I get 
 two diffrent outputs.

 PC1: linuxmint - gambas 3.3.3
 PC2: ubuntu - gambas 3.3.3

 On the second PC the output flow over the paper, see the PDFs.

 Both PDFs were created with cups-pdf on the recent machine.

 I'm happy over every hint,

 Bye

 Gregor


 --
 Monitor your physical, virtual and cloud infrastructure from a single
 web console. Get in-depth insight into apps, servers, databases, vmware,
 SAP, cloud infrastructure, etc. Download 30-day Free Trial.
 Pricing starts from $795 for 25 servers or applications!
 http://p.sf.net/sfu/zoho_dev2dev_nov


 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] trigonometric function

2012-10-25 Thread Caveat
You want inverse tangent then?  Tried atn?

Kind regards,
Caveat

On 25/10/12 17:44, p...@laur-net.de wrote:
   

 Hi,

 I just got a mathematic problem:

 I need the angle alpha and
 x and y are given.

 tan(alpha) = x / y

 so alpha = tan^-1(x/y)

 As I
 put tan^-1(x/y) in my own calculator, it works.

 But how do I express
 this in Gambas?

 (1 / (tan(x / y)) does'nt return me the same awnser..)


 Thanks for help

 Piet
   
 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_sfd2d_oct
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Segmentation error (core dump created) at runtime

2012-10-11 Thread Caveat
Looks like I'll be sticking with rev5051 (is that recent enough for you 
Kevin?) for a little while then...  :-D

Kind regards,
Caveat

On 11/10/12 07:34, Kevin Fishburne wrote:
 On 10/11/2012 01:31 AM, Emanuele Sottocorno wrote:
 Thanks Benoit,
 attached the new generated gdb output and another valgrind. (hope it is
 useful)

 Emanuele
 Dammit, I did miss the memo. Please excuse me while I fall on my sword.



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Caveat
As I read it, it means it would be difficult to make a multi-language 
version of that message.  It's too broken up and makes a specific 
English grammatical choice (whether to add 's' for plural).

Someone who wanted to translate this program to work in another 
country's language would struggle with messages like this.

Kind regards,
Caveat

On 10/10/12 11:46, Rolf-Werner Eilert wrote:
 Hi all,

 Who has made the examples for IIF? Maybe you can explain what you meant
 by not translatable:

 ' Never do the following in real code, because it is not translatable!
 X = 7
 PRINT You have   X   message  If(X  1, s, )   waiting.


 Thanks

 Rolf

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Caveat
Still wouldn't work for Yoda-speak

29 messages have you :-)


On 10/10/12 16:26, Fabien Bodard wrote:
 True
 :-)
 Le 10 oct. 2012 16:21, Jussi Lahtinen jussi.lahti...@gmail.com a écrit :

 Print (you have )  X  iif(x1, (message), (messages ))

 This is still not good. Better would be:

 Print Subst((you have 1 2), x, IIf(x  1, (messages), (message)))

 Now translation is not depended on order of words.

 Jussi

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Caveat
LOL... you got me on the Yoda-speak one, but a true English gentleman 
would know that there *is* one message and there *are* several messages :-D

On 10/10/12 20:11, Jussi Lahtinen wrote:
 You could even translate it to gentleman English.

 you have 1 2 -- Good sir, there is 2 for you, actually 1 2.

 Result would be example:

 Good sir, there is messages for you, actually 99 messages.


 Jussi




 On Wed, Oct 10, 2012 at 9:08 PM, Jussi Lahtinen 
 jussi.lahti...@gmail.comwrote:

 Still wouldn't work for Yoda-speak
 29 messages have you :-)

 Wrong, this would work.

 Code was:

 Print Subst((you have 1 2), x, IIf(x  1, (messages), (message)))

 And so, you would translate you have 1 2 to 1 2 have you.


 Jussi


 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] I can't believe this... I can!

2012-10-09 Thread Caveat
You've defined IS_ARRAY_NAME twice!

Once you have it declared 'at the class level':

'Special treatment for array names
Public IS_ARRAY_NAME As Boolean
Public CALL_DEPTH As Integer = -1

but you have also defined the variable Is_array_name in your Sub 
scan_file():

Dim Is_array_name As Boolean = False

 Try ifile = Open fname For Input
 If Error Then Stop Event

So I imagine that in your Sub you set the local variable to TRUE but 
when you get into write_token() it no longer has a local variable to 
refer to and is then looking at the 'class level' variable which you've 
never set.

Seems there might something a little fishy in the way the debugger 
doesn't distinguish between the local and the global variable properly 
(try watching both of them!)... Benoit perhaps a little something to 
look at, or perhaps we could give a compiler warning if you're 
hiding/stomping on variables by defining them twice?

Program works beautifully if you remove the second (local) declaration 
of IS_ARRAY_NAME.

Kind regards,
Caveat

On 09/10/12 09:28, Fabien Bodard wrote:
 Static public?
 Le 9 oct. 2012 03:14, RICHARD WALKER richard.j.wal...@ntlworld.com a
 écrit :

 Sorry to spam the list - forgot to restore the diagnostic Stop for
 Public findme as String[]. Corrected in this one.

 Simple instructions;
 1. Use the file chooser to locate/select this program's FMain.class
 2. Choose a conversion option - the default mangled is OK
 3. Create a Watch for the IS_ARRAY_NAME boolean
 4. Click Process and then trace the code for the Public findme as
 String[] line.

 The value is True at the call to write_token() and FALSE inside
 write_token().

 Time for bed. Goodnight all.

 R


 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] I can't believe this... I can!

2012-10-09 Thread Caveat
On 09/10/12 14:21, Fabien Bodard wrote:
 Normally you have this information in the compiler warnings
Where do you see them?  I saw no warning when I compiled the code...

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] I can't believe this... I can!

2012-10-09 Thread Caveat
I have Console, Breakpoints, and Tasks.

No Warnings tab.

Gambas 3.2.90, rev 5051 from svn.

On 09/10/12 18:51, Jussi Lahtinen wrote:
 It is in IDE under code editor where are tabs for console, breakpoints,
 warnings and task. In that order.

 Jussi




 On Tue, Oct 9, 2012 at 5:01 PM, Caveat gam...@caveat.demon.co.uk wrote:

 On 09/10/12 14:21, Fabien Bodard wrote:
 Normally you have this information in the compiler warnings
 Where do you see them?  I saw no warning when I compiled the code...


 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] I can't believe this... I can!

2012-10-09 Thread Caveat
LOL... you must be using a different Gambas!

I go to Project, Properties, click on the Options tab and under 
Compilation have just
Module symbols are public by default and
Form controls are public

Not a major issue, but I just wonder if it might have saved Richard some 
time if he'd seen a warning flash up...and I'm curious why I don't seem 
to get the Warnings functionality at all.  I paid for the Premium 
Version of Gambas, which should come with unlimited warnings :-D :-D

On 09/10/12 19:57, Jussi Lahtinen wrote:
 Open your project properties -- options tab -- under compilation;
 activate warnings -- yes.
 Then click compile all.

 Jussi



 On Tue, Oct 9, 2012 at 8:05 PM, Caveat gam...@caveat.demon.co.uk wrote:

 I have Console, Breakpoints, and Tasks.

 No Warnings tab.

 Gambas 3.2.90, rev 5051 from svn.

 On 09/10/12 18:51, Jussi Lahtinen wrote:
 It is in IDE under code editor where are tabs for console, breakpoints,
 warnings and task. In that order.

 Jussi




 On Tue, Oct 9, 2012 at 5:01 PM, Caveat gam...@caveat.demon.co.uk
 wrote:
 On 09/10/12 14:21, Fabien Bodard wrote:
 Normally you have this information in the compiler warnings
 Where do you see them?  I saw no warning when I compiled the code...



 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Getting data from table

2012-08-10 Thread Caveat
In java you'd use ResultSetMetaData, but in Gambas I adopted a slightly 
different approach using the describe function...of course it's not as 
portable...but it will give a list of columns for a given table in MySQL 
(which I think was your original question)...

Private Function getColumns(tableName As String) As Collection

   Dim coll As New Collection
   Dim tmpRes As Result
   Dim sql As String
   Dim column As DbColumn

   coll = New Collection
   sql = describe   tableName
   tmpRes = DataAccess.executeFetch(sql)
   For Each tmpRes
 column = New DbColumn
 column.setName(tmpRes[Field])
 column.setType(tmpRes[Type])
 column.setNullable(tmpRes[Null])
 column.setKey(tmpRes[Key])
 column.setDefault(tmpRes[Default])
 column.setExtra(tmpRes[Extra])
 coll.Add(column, column.getName())
   Next
   Return coll

Catch
   message(Got error:   Error.Text   @   Error.Where)

End


Much of this code is a few years old, so there may be new features in 
Gambas that let you access the RSMD (or even old features that I just 
missed at the time!).

Kind regards,
Caveat

P.S.  In case you can't manage without it, here's my original DBColumn 
class too (yes, it tries to make the Gambas experience more java-like... 
so sue me :-) ):
' Gambas class file
Private fieldValues As Collection
Private fields As String[]
Public Const NAME_INDEX As Integer = 0
Public Const TARGET_NAME_INDEX As Integer = 1
Public Const TYPE_INDEX As Integer = 2
Public Const NULLABLE_INDEX As Integer = 3
Public Const KEY_INDEX As Integer = 4
Public Const DEFAULT_VAL_INDEX As Integer = 5
Public Const EXTRA_INDEX As Integer = 6

Public Function getFieldByIndex(fieldIndex As Integer) As String

   If fieldIndex  0 Or fieldIndex  getFieldCount() - 1 Then
 Return 
   Else
 Return getFieldValues()[getFields()[fieldIndex]]
   End If

End

Public Function getFields() As String[]

   If fields = Null Then
 fields = New String[]
 fields.Add(Name, NAME_INDEX)
 fields.Add(Target Name, TARGET_NAME_INDEX)
 fields.Add(Type, TYPE_INDEX)
 fields.Add(Nullable, NULLABLE_INDEX)
 fields.Add(Key, KEY_INDEX)
 fields.Add(Default Value, DEFAULT_VAL_INDEX)
 fields.Add(Extra, EXTRA_INDEX)
   End If
   Return fields

End

Private Function getFieldByName(fieldName As String) As String

   Return getFieldValues()[fieldName]

End

Private Sub setFieldByName(fieldName As String, fieldValue As String)

   getFieldValues()[fieldName] = fieldValue

End

Private Function getFieldValues() As Collection

   If fieldValues = Null Then
 fieldValues = New Collection
   End If
   Return fieldValues

End

Public Sub setName(newName As String)

   setFieldByName(Name, newName)

End

Public Function getName() As String

   Return getFieldByName(Name)

End

Public Sub setTargetName(newName As String)

   setFieldByName(Target Name, newName)

End

Public Function getTargetName() As String

   Return getFieldByName(Target Name)

End

Public Sub setType(newType As String)

   setFieldByName(Type, newType)

End

Public Function getType() As String

   Return getFieldByName(Type)

End

Public Sub setNullable(newNullable As String)

   setFieldByName(Nullable, newNullable)

End

Public Function getNullable() As String

   Return getFieldByName(Nullable)

End

Public Sub setKey(newKey As String)

   setFieldByName(Key, newKey)

End

Public Function getKey() As String

   Return getFieldByName(Key)

End

Public Sub setDefault(newDefault As String)

   setFieldByName(Default Value, newDefault)

End

Public Function getDefault() As String

   Return getFieldByName(Default Value)

End

Public Sub setExtra(newExtra As String)

   setFieldByName(Extra, newExtra)

End

Public Function getExtra() As String

   Return getFieldByName(Extra)

End

Public Function isPrimaryKey() As Boolean

   If getKey() = PRI Then
 Logger.logMessage(Returning TRUE from isPrimaryKey())
 Return True
   Else
 Logger.logMessage(Returning FALSE from isPrimaryKey())
 Return False
   End If

End

Public Function getFieldCount() As Integer

   Return getFields().Count

End


On 10/08/12 08:27, Shane wrote:
 On 10/08/12 15:13, rocko wrote:
 I've read the help files and seen a lot of examples on how
 to add data to a table but I can' find any examples on how
 to get data from a table.

 I need to get total number of fields from a table. I've looked at:
 'Property Read Count As Integer' in the Help file.
 Can i simply put this at the top of my class and then do a
 Print Count ??

 I need the Count so i can iterate thru the fields and extract data,
 something like:
 For Each Count
  get specific field
  do something with field
 Next
 I suppose I could use the primary key ID as the For Each loop
 But not sure about that.


 Try this

 myResult = dbcon.find(myTable, id = 1,ID)
   for each myResult
   TextBox1.text = myResult!myField1
   TextBox2.text = myResult!myField2
   next

Re: [Gambas-user] Re turn Value from Form

2012-07-25 Thread Caveat
The property you need to check is Modal, the function to show a Modal 
form is ShowModal.

So:

  If Not fPersonell.Modal Then
print No
  endif


Kind regards,
Caveat

On 25/07/12 12:02, Bill-Lancaster wrote:
 Thanks,

   If Not fPersonell.ShowModal Then
 print No
   endif

 gets error: Type mismatch, wanted Boolean got function.

 Don't understand your comment For normal form you need to use static var 


--
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] mysql last_insert_id

2012-07-17 Thread Caveat
Have you got auto_increment on the id field?

http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

Seems last_insert_id() looks at the previously-run SQL statement that 
performed an INSERT.  If you're running this query in a separate 
program, or have done other SQL operations since the INSERT on the 
editprojects table, you may well get 0 back.

Why not try select max(id) from editprojects?

Guess it depends what you really want... the id of the last-inserted 
record, or the maximum id used until now so you can assign the 'next' 
id... of course if you use auto_increment, you may not need the last id 
as it'll all happen automatically...

Kind regards,
Caveat

On 17/07/12 13:14, Bill-Lancaster wrote:
 I have a table (editprojects) with id as primary key, serial, integer.
 There is only one record at the moment (id = 1)
   hResult = hConn.Exec(SELECT last_insert_id() as id FROM editprojects)
 print hResult!id
 produces 0 not 1

 Obviously my sql query is at fault but where?

 I wonder if anyone can help.



--
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] My Raspberry Pi has arrived!

2012-05-31 Thread Caveat
ssh -X to the pi is working fine.  I just installed openssh-server on 
the pi (I'm currently playing with the Debian Squeeze image) and have 
successfully run Empathy on the pi but with its window here on my main 
machine...

Regards,
Caveat

On 30/05/12 10:48, Caveat wrote:
 Anyone need specific tests carried out, just let me know!

 OK, OK, I really just wanted to let everyone know it's here!

 Kind regards,
 Caveat

 --
 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] My Raspberry Pi has arrived!

2012-05-30 Thread Caveat
Anyone need specific tests carried out, just let me know!

OK, OK, I really just wanted to let everyone know it's here!

Kind regards,
Caveat

--
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] Is there anywhere hosting for gambas web?

2012-05-24 Thread Caveat
If you need to install a Gambas runtime (I'm guessing yes?), then you'll 
need a hosting service that lets you do that. Most hosting services that 
give you a complete (virtual) machine with root access should be fine. 
You'll need to make sure they don't give you a Windoze host of course LOL

Regards,
Caveat

On 24/05/12 07:41, Алексей Беспалов wrote:
 Is there anywhere hosting for gambas web?
 Do you know?
 I do not want to learn more php, pyhon, ...



--
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] Dependencies: Documentation needs update

2012-05-03 Thread Caveat
I have it working on Ubuntu 12.04 with the following:

echo Installing dependencies for precise...
sudo apt-get install build-essential libtool autoconf libffi-dev
libbz2-dev libmysqlclient-dev unixodbc-dev firebird-dev libpcre3-dev
libv4l-dev libpq-dev libsqlite0-dev libsqlite3-dev libcurl4-gnutls-dev
libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev
libsdl-ttf2.0-dev libxml2-dev libxslt1-dev libglew1.5-dev libqt4-dev
libgtk-3-dev libgtk2.0-dev libgtkglext1-dev librsvg2-dev
libgnome-keyring-dev libpoppler-glib-dev libimlib2-dev libgsl0-dev
libgstreamer0.10-dev libxtst-dev

Regards,
Caveat

On Thu, 2012-05-03 at 21:30 +0200, Matti wrote:
 I compiled the latest svn version and got
   checking for GStreamer media component with pkg-config... no
   configure: WARNING: GStreamer media is disabled
 
 Then installed everything I could find about GStreamer - but the result is 
 the same.
 
 The documentation should be updated. What are the dependencies for the 
 GStreamer 
 media component?
 
 Regards
 Matti
 
 --
 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] Issue 242 in gambas: Gamba forms fail on Debian ARM

2012-04-26 Thread Caveat
I have a Raspberry Pi on order... but no idea yet how long before it
will be fulfilled.

Once it arrives, of course one of my first tasks will be to try out
Gambas on it :-D

Are you one of the lucky few who actually has one Benoit?  Anyone else
on the list with one already?

Regards,
Caveat



On Wed, 2012-04-25 at 23:02 -0700, charlesg wrote:
 
 charlesg wrote:
  
  I have emailed Raspberry Pi to see if they have any development kits. 
  
 
 I have received a very polite reply from Eben Upton telling me to join the
 queue!
 
 Thinking about it, I suspect the ex-Director of Computer Science, St John's
 College, Cambridge would probably develop a nervous tic at the mention of
 anything that smells of BASIC.:-(



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

2012-04-25 Thread Caveat
  played_byHayden Panettiere/played_by
  abilityRapid cellular regeneration/ability
/heroe
heroe id=h2, name=Hiro Nakamura
  nameHiro Nakamura/name
  played_byMasi Oka/played_by
  abilitySpace-time manipulation: teleportation amp; time
travel/ability
/heroe
villain id=v1, name=Gabriel Sylar
  nameGabriel Sylar/name
  played_bySomeone evil/played_by
  abilityUnderstand how things work and multiple other abilities
acquired/ability
/villain
  /characters
  characters series=Banana Splits
heroe id=b1, name=Graham
  nameGraham/name
  played_byGraham Bell/played_by
  abilityBeing a complete donut brain/ability
/heroe
heroe id=b2, name=Bill
  nameBill/name
  played_byBill Odie/played_by
  abilityBeing very silly/ability
/heroe
heroe id=b3, name=Tim
  nameTim/name
  played_byTim Brook Taylor/played_by
  abilityBeing very very silly/ability
/heroe
  /characters
/all_characters


*** Read the original wireless-network input XML (See
http://pastebin.com/4DGwdzYD) ***
parserToModel.parseInputFile(User.home /
/dev/xml/wireless-network.xml)
*** Look at the original XML we have in our internal data
model ***
parserToModel.getModel().toXMLString()
wireless-network first-time=Mon Mar 28 14:47:18 2011, last-time=Mon
Mar 28 14:52:10 2011, number=1, type=infrastructure
  SSID first-time=Mon Mar 28 14:47:18 2011, last-time=Mon Mar 28
14:52:10 2011
typeProbe Response/type
max-rate54.00/max-rate
packets29/packets
encryptionNone/encryption
essid cloaked=falseAMX/essid
  /SSID
  BSSID00:02:E3:45:C1:F8/BSSID
  manufLite-OnCom/manuf
  channel9/channel
  freqmhz2442 1/freqmhz
  freqmhz2447 5/freqmhz
/wireless-network

***
Get the Attribute  type  from the path wireless-network
infrastructure


Thanks for taking the time to look into the problems.

Kind regards,
Caveat


On Wed, 2012-04-25 at 02:06 +0200, Adrien Prokopowicz wrote:
 Le lundi 23 avril 2012 12:05:13 Caveat a écrit :
  Benoit and Fabien, you're both right of course.
  
  Sorry, I was a little frustrated by how broken gb.xml now appears to be.
  
  The project I've sent does allow you guys to get some serious testing in
  and I'm here should you have any questions about the project and the
  code.
  
  There are plenty of simple xml examples out on the web, the beauty of my
  project is that it *should* be generic enough to read pretty much any of
  those xml examples either from file or from string and doesn't have to
  be told about specific tags...
  
  Regards,
  Caveat
  
 
 With the revision #4669, your projects (the 3 forms i tested) work perfectly 
 on my side, with the Heroes.xml file. 
 I just had to make a little modification, i think that was why the reader 
 appeared broken (in XmlParserToModel:171, and :200) : 
 
 If reader.Node.Type = XmlReaderNodeType.EndElement
 
 This didn't work because reader.Node.Type never returns EndElement. It is 
 logical : EndElement is a State (the reader state) and reader.Node.Type is a 
 node type. So you should use the reader.State property instead : 
 
 If reader.State = XmlReaderNodeType.EndElement
 
 (Yes, the XmlReaderNodeType class should be renamed, but I can't, for 
 compatibility reasons ... )
 
 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


Re: [Gambas-user] New XML component

2012-04-23 Thread Caveat
Benoit and Fabien, you're both right of course.

Sorry, I was a little frustrated by how broken gb.xml now appears to be.

The project I've sent does allow you guys to get some serious testing in
and I'm here should you have any questions about the project and the
code.

There are plenty of simple xml examples out on the web, the beauty of my
project is that it *should* be generic enough to read pretty much any of
those xml examples either from file or from string and doesn't have to
be told about specific tags...

Regards,
Caveat

On Mon, 2012-04-23 at 11:16 +0200, Fabien Bodard wrote:
 Le 23 avril 2012 11:09, Benoît Minisini gam...@users.sourceforge.net a 
 écrit :
  Le 23/04/2012 00:22, Caveat a écrit :
  Note that there are 3 possibilities in my project to test XML stuff.
  Depending on what you set as the startup class, you can either try
  converting XML to a treeview, viewing the XML in a dynamically-built GUI
  or running a test suite which also applies changes to the XML once it's
  in the internal model.
 
  So the Form AllPurposeXMLEditor, the Form XMLToTreeView or the Module
  Test can be set as the startup class.
 
  If you need the Heroes.xml file for testing, it's still out there on
  pastebin at http://pastebin.com/aR11N5uc and the wireless network xml is
  also available at http://pastebin.com/4DGwdzYD
 
  None of the 3 programs I have provided in the project work with the new
  gb.xml!
 
  Did you do *any* testing on the new gb.xml before committing it?  The
  fact it can't even open a simple XML file AND fails reading simple XML
  from a String seems to indicate that very little testing went on...
 
  Regards,
  Caveat
 
 
  This is the reason why the code was committed on the *development*
  version. To get some return from testers. But how could we know who
  really use gb.xml without doing that? :-)
 
  --
  Benoît Minisini
 
  --
  For Developers, A Lot Can Happen In A Second.
  Boundary is the first to Know...and Tell You.
  Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
  http://p.sf.net/sfu/Boundary-d2dvs2
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 And it's difficult to test all the limits of a component without users
 



--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] New XML component

2012-04-22 Thread Caveat
It's not working for me.

I have a project that builds an internal model of an xml file.  the
project is working fine with gb.libxml but doesn't work with gb.xml and
gb.xml.xslt.

The xml I am trying to parse is the following:

?xml version=1.0 encoding=ISO-8859-1?
!-- Edited by XMLSpy® --
breakfast_menu
food
nameBelgian Waffles/name
price$5.95/price
descriptiontwo of our famous Belgian Waffles with plenty of 
real
maple syrup/description
calories650/calories
/food
food
nameStrawberry Belgian Waffles/name
price$7.95/price
descriptionlight Belgian waffles covered with strawberries and
whipped cream/description
calories900/calories
/food
food
nameBerry-Berry Belgian Waffles/name
price$8.95/price
descriptionlight Belgian waffles covered with an assortment 
of fresh
berries and whipped cream/description
calories900/calories
/food
food
nameFrench Toast/name
price$4.50/price
descriptionthick slices made from our homemade sourdough
bread/description
calories600/calories
/food
food
nameHomestyle Breakfast/name
price$6.95/price
descriptiontwo eggs, bacon or sausage, toast, and our 
ever-popular
hash browns/description
calories950/calories
/food
/breakfast_menu

The project is attached.

I'll also carry on looking for why it's not working...

Regards,
Caveat

On Sun, 2012-04-22 at 00:12 -0300, Sebastian Kulesz wrote:
 Hi! I have added most of the missing pages for the gb.xml and
 gb.xml.html documentation. I noticed that most of them where not even
 created. To the ones that seemed most relevant and important to the
 end user, I added some  information. To the rest (i.e. constants,
 obvious properties or methods, etc.) I created empty pages for two
 reasons. The first one is that the reader can now see the type of the
 required input/parameters and returned data of constants, methods and
 properties. The second one, is that if, for example, a method or a
 property of a class is not documented (the page does not exist) it
 makes it hard to read the full list of symbols as relative wiki url's
 are shown.
 
 IMHO, this should be done to every symbol for the reasons explained
 above. Names would still be shown in italics, but if an user without a
 wiki account clicks on it, show the same data as a blank page would.
 
 
 On Sat, Apr 21, 2012 at 9:04 PM, Benoît Minisini
 gam...@users.sourceforge.net wrote:
  Hi,
 
  Adrien Prokopowicz has rewrote the XML component, the old one being
  renamed as gb.libxml. Sorry for the surprise!
 
  Please report any problem or incompatibility. I am not a user of XML, I
  know the basic things only, so Adrien is the guy who will fix the
  problem and help you. :-)
 
  Regards,
 
  --
  Benoît Minisini
 
  --
  For Developers, A Lot Can Happen In A Second.
  Boundary is the first to Know...and Tell You.
  Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
  http://p.sf.net/sfu/Boundary-d2dvs2
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



XMLEditor-0.0.1.tar.gz
Description: application/compressed-tar
--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] New XML component

2012-04-22 Thread Caveat
Still not working with rev 4655.

Did you get a chance to test using the project I sent?  It's quite clear
that it works with gb.libxml but not with gb.xml.

I wish this change had been introduced in a more careful manner, perhaps
providing gb.newxml that we could transition to over time instead of
just breaking existing projects.

Regards,
Caveat

On Sun, 2012-04-22 at 12:40 +0200, Adrien Prokopowicz wrote:
 Le dimanche 22 avril 2012 11:42:20 Caveat a écrit :
  It's not working for me.
  
  I have a project that builds an internal model of an xml file.  the
  project is working fine with gb.libxml but doesn't work with gb.xml and
  gb.xml.xslt.
  
  The xml I am trying to parse is the following:
  
  ?xml version=1.0 encoding=ISO-8859-1?
  !-- Edited by XMLSpy® --
  breakfast_menu
  food
  nameBelgian Waffles/name
  price$5.95/price
  descriptiontwo of our famous Belgian Waffles with plenty of 
  real
  maple syrup/description
  calories650/calories
  /food
  food
  nameStrawberry Belgian Waffles/name
  price$7.95/price
  descriptionlight Belgian waffles covered with strawberries and
  whipped cream/description
  calories900/calories
  /food
  food
  nameBerry-Berry Belgian Waffles/name
  price$8.95/price
  descriptionlight Belgian waffles covered with an assortment 
  of fresh
  berries and whipped cream/description
  calories900/calories
  /food
  food
  nameFrench Toast/name
  price$4.50/price
  descriptionthick slices made from our homemade sourdough
  bread/description
  calories600/calories
  /food
  food
  nameHomestyle Breakfast/name
  price$6.95/price
  descriptiontwo eggs, bacon or sausage, toast, and our 
  ever-popular
  hash browns/description
  calories950/calories
  /food
  /breakfast_menu
  
  The project is attached.
  
  I'll also carry on looking for why it's not working...
  
  Regards,
  Caveat
  
  On Sun, 2012-04-22 at 00:12 -0300, Sebastian Kulesz wrote:
   Hi! I have added most of the missing pages for the gb.xml and
   gb.xml.html documentation. I noticed that most of them where not even
   created. To the ones that seemed most relevant and important to the
   end user, I added some  information. To the rest (i.e. constants,
   obvious properties or methods, etc.) I created empty pages for two
   reasons. The first one is that the reader can now see the type of the
   required input/parameters and returned data of constants, methods and
   properties. The second one, is that if, for example, a method or a
   property of a class is not documented (the page does not exist) it
   makes it hard to read the full list of symbols as relative wiki url's
   are shown.
   
   IMHO, this should be done to every symbol for the reasons explained
   above. Names would still be shown in italics, but if an user without a
   wiki account clicks on it, show the same data as a blank page would.
   
   
   On Sat, Apr 21, 2012 at 9:04 PM, Benoît Minisini
   
   gam...@users.sourceforge.net wrote:
Hi,

Adrien Prokopowicz has rewrote the XML component, the old one being
renamed as gb.libxml. Sorry for the surprise!

Please report any problem or incompatibility. I am not a user of XML, I
know the basic things only, so Adrien is the guy who will fix the
problem and help you. :-)

Regards,

--
Benoît Minisini


-- For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
   
   --
    For Developers, A Lot Can Happen In A Second.
   Boundary is the first to Know...and Tell You.
   Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
   http://p.sf.net/sfu/Boundary-d2dvs2
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 The problem should be solved for absolute paths in the revision #4655.



--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Gambas-user mailing list
Gambas-user

Re: [Gambas-user] New XML component

2012-04-22 Thread Caveat
If I put the xml file in the same dir as the project and reference it in
a relative way, then it works perfectly (as expected) using gb.libxml.
Using gb.xml I get an error File or directory does not exist.

Regards,
Caveat

On Sun, 2012-04-22 at 13:40 +0200, Fabien Bodard wrote:
 2012/4/22 Caveat gam...@caveat.demon.co.uk:
  Still not working with rev 4655.
 
  Did you get a chance to test using the project I sent?  It's quite clear
  that it works with gb.libxml but not with gb.xml.
 
  I wish this change had been introduced in a more careful manner, perhaps
  providing gb.newxml that we could transition to over time instead of
  just breaking existing projects.
 in fact it's a bug in the interpreter ... we can't access the file in the 
 projet
 
  Regards,
  Caveat
 
  On Sun, 2012-04-22 at 12:40 +0200, Adrien Prokopowicz wrote:
  Le dimanche 22 avril 2012 11:42:20 Caveat a écrit :
   It's not working for me.
  
   I have a project that builds an internal model of an xml file.  the
   project is working fine with gb.libxml but doesn't work with gb.xml and
   gb.xml.xslt.
  
   The xml I am trying to parse is the following:
  
   ?xml version=1.0 encoding=ISO-8859-1?
   !-- Edited by XMLSpy® --
   breakfast_menu
   food
   nameBelgian Waffles/name
   price$5.95/price
   descriptiontwo of our famous Belgian Waffles with plenty 
   of real
   maple syrup/description
   calories650/calories
   /food
   food
   nameStrawberry Belgian Waffles/name
   price$7.95/price
   descriptionlight Belgian waffles covered with strawberries 
   and
   whipped cream/description
   calories900/calories
   /food
   food
   nameBerry-Berry Belgian Waffles/name
   price$8.95/price
   descriptionlight Belgian waffles covered with an 
   assortment of fresh
   berries and whipped cream/description
   calories900/calories
   /food
   food
   nameFrench Toast/name
   price$4.50/price
   descriptionthick slices made from our homemade sourdough
   bread/description
   calories600/calories
   /food
   food
   nameHomestyle Breakfast/name
   price$6.95/price
   descriptiontwo eggs, bacon or sausage, toast, and our 
   ever-popular
   hash browns/description
   calories950/calories
   /food
   /breakfast_menu
  
   The project is attached.
  
   I'll also carry on looking for why it's not working...
  
   Regards,
   Caveat
  
   On Sun, 2012-04-22 at 00:12 -0300, Sebastian Kulesz wrote:
Hi! I have added most of the missing pages for the gb.xml and
gb.xml.html documentation. I noticed that most of them where not even
created. To the ones that seemed most relevant and important to the
end user, I added some  information. To the rest (i.e. constants,
obvious properties or methods, etc.) I created empty pages for two
reasons. The first one is that the reader can now see the type of the
required input/parameters and returned data of constants, methods and
properties. The second one, is that if, for example, a method or a
property of a class is not documented (the page does not exist) it
makes it hard to read the full list of symbols as relative wiki url's
are shown.
   
IMHO, this should be done to every symbol for the reasons explained
above. Names would still be shown in italics, but if an user without a
wiki account clicks on it, show the same data as a blank page would.
   
   
On Sat, Apr 21, 2012 at 9:04 PM, Benoît Minisini
   
gam...@users.sourceforge.net wrote:
 Hi,

 Adrien Prokopowicz has rewrote the XML component, the old one being
 renamed as gb.libxml. Sorry for the surprise!

 Please report any problem or incompatibility. I am not a user of 
 XML, I
 know the basic things only, so Adrien is the guy who will fix the
 problem and help you. :-)

 Regards,

 --
 Benoît Minisini

 
 -- For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
   
--
 For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Gambas-user mailing list
Gambas

Re: [Gambas-user] New XML component

2012-04-22 Thread Caveat
Nope, rev 4656 is not working with relative path (saved the xml as
simple.xml in the project dir and referred to it as simple.xml)... now
it just fails silently giving wrong results, no error message any more.

With absolute path is the same as before, still not working, silent
failure with wrong results.

Are you able to run my project?  Will save us (errm ME) a lot of time if
you just run that!  First try it using gb.libxml to see what it *should*
do, then try it with gb.xml until you get the same result...  no?

Regards,
Caveat

On Sun, 2012-04-22 at 18:07 +0200, Adrien Prokopowicz wrote:
 Le dimanche 22 avril 2012 13:51:22 Caveat a écrit :
  If I put the xml file in the same dir as the project and reference it in
  a relative way, then it works perfectly (as expected) using gb.libxml.
  Using gb.xml I get an error File or directory does not exist.
  
  Regards,
  Caveat
  
  On Sun, 2012-04-22 at 13:40 +0200, Fabien Bodard wrote:
   2012/4/22 Caveat gam...@caveat.demon.co.uk:
Still not working with rev 4655.

Did you get a chance to test using the project I sent?  It's quite clear
that it works with gb.libxml but not with gb.xml.

I wish this change had been introduced in a more careful manner, perhaps
providing gb.newxml that we could transition to over time instead of
just breaking existing projects.
   
   in fact it's a bug in the interpreter ... we can't access the file in the
   projet 
Regards,
Caveat

On Sun, 2012-04-22 at 12:40 +0200, Adrien Prokopowicz wrote:
Le dimanche 22 avril 2012 11:42:20 Caveat a écrit :
 It's not working for me.
 
 I have a project that builds an internal model of an xml file.  the
 project is working fine with gb.libxml but doesn't work with gb.xml
 and
 gb.xml.xslt.
 
 The xml I am trying to parse is the following:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 !-- Edited by XMLSpy® --
 breakfast_menu
 
 food
 
 nameBelgian Waffles/name
 price$5.95/price
 descriptiontwo of our famous Belgian Waffles with
 plenty of real
 
 maple syrup/description
 
 calories650/calories
 
 /food
 food
 
 nameStrawberry Belgian Waffles/name
 price$7.95/price
 descriptionlight Belgian waffles covered with
 strawberries and
 
 whipped cream/description
 
 calories900/calories
 
 /food
 food
 
 nameBerry-Berry Belgian Waffles/name
 price$8.95/price
 descriptionlight Belgian waffles covered with an
 assortment of fresh
 
 berries and whipped cream/description
 
 calories900/calories
 
 /food
 food
 
 nameFrench Toast/name
 price$4.50/price
 descriptionthick slices made from our homemade
 sourdough
 
 bread/description
 
 calories600/calories
 
 /food
 food
 
 nameHomestyle Breakfast/name
 price$6.95/price
 descriptiontwo eggs, bacon or sausage, toast, and our
 ever-popular
 
 hash browns/description
 
 calories950/calories
 
 /food
 
 /breakfast_menu
 
 The project is attached.
 
 I'll also carry on looking for why it's not working...
 
 Regards,
 Caveat
 
 On Sun, 2012-04-22 at 00:12 -0300, Sebastian Kulesz wrote:
  Hi! I have added most of the missing pages for the gb.xml and
  gb.xml.html documentation. I noticed that most of them where not
  even
  created. To the ones that seemed most relevant and important to the
  end user, I added some  information. To the rest (i.e. constants,
  obvious properties or methods, etc.) I created empty pages for two
  reasons. The first one is that the reader can now see the type of
  the
  required input/parameters and returned data of constants, methods
  and
  properties. The second one, is that if, for example, a method or a
  property of a class is not documented (the page does not exist) it
  makes it hard to read the full list of symbols as relative wiki
  url's
  are shown.
  
  IMHO, this should be done to every symbol for the reasons explained
  above. Names would still be shown in italics, but if an user
  without a
  wiki account clicks on it, show the same data as a blank page
  would.
  
  
  On Sat, Apr 21, 2012 at 9:04 PM, Benoît Minisini
  
  gam...@users.sourceforge.net wrote:
   Hi,
   
   Adrien Prokopowicz has rewrote the XML component, the old one
   being

Re: [Gambas-user] New XML component

2012-04-22 Thread Caveat
Note that there are 3 possibilities in my project to test XML stuff.
Depending on what you set as the startup class, you can either try
converting XML to a treeview, viewing the XML in a dynamically-built GUI
or running a test suite which also applies changes to the XML once it's
in the internal model.

So the Form AllPurposeXMLEditor, the Form XMLToTreeView or the Module
Test can be set as the startup class. 

If you need the Heroes.xml file for testing, it's still out there on
pastebin at http://pastebin.com/aR11N5uc and the wireless network xml is
also available at http://pastebin.com/4DGwdzYD 

None of the 3 programs I have provided in the project work with the new
gb.xml!

Did you do *any* testing on the new gb.xml before committing it?  The
fact it can't even open a simple XML file AND fails reading simple XML
from a String seems to indicate that very little testing went on...

Regards,
Caveat

On Sun, 2012-04-22 at 23:48 +0200, Caveat wrote:
 Nope, rev 4656 is not working with relative path (saved the xml as
 simple.xml in the project dir and referred to it as simple.xml)... now
 it just fails silently giving wrong results, no error message any more.
 
 With absolute path is the same as before, still not working, silent
 failure with wrong results.
 
 Are you able to run my project?  Will save us (errm ME) a lot of time if
 you just run that!  First try it using gb.libxml to see what it *should*
 do, then try it with gb.xml until you get the same result...  no?
 
 Regards,
 Caveat
 
 On Sun, 2012-04-22 at 18:07 +0200, Adrien Prokopowicz wrote:
  Le dimanche 22 avril 2012 13:51:22 Caveat a écrit :
   If I put the xml file in the same dir as the project and reference it in
   a relative way, then it works perfectly (as expected) using gb.libxml.
   Using gb.xml I get an error File or directory does not exist.
   
   Regards,
   Caveat
   
   On Sun, 2012-04-22 at 13:40 +0200, Fabien Bodard wrote:
2012/4/22 Caveat gam...@caveat.demon.co.uk:
 Still not working with rev 4655.
 
 Did you get a chance to test using the project I sent?  It's quite 
 clear
 that it works with gb.libxml but not with gb.xml.
 
 I wish this change had been introduced in a more careful manner, 
 perhaps
 providing gb.newxml that we could transition to over time instead of
 just breaking existing projects.

in fact it's a bug in the interpreter ... we can't access the file in 
the
projet 
 Regards,
 Caveat
 
 On Sun, 2012-04-22 at 12:40 +0200, Adrien Prokopowicz wrote:
 Le dimanche 22 avril 2012 11:42:20 Caveat a écrit :
  It's not working for me.
  
  I have a project that builds an internal model of an xml file.  the
  project is working fine with gb.libxml but doesn't work with gb.xml
  and
  gb.xml.xslt.
  
  The xml I am trying to parse is the following:
  
  ?xml version=1.0 encoding=ISO-8859-1?
  !-- Edited by XMLSpy® --
  breakfast_menu
  
  food
  
  nameBelgian Waffles/name
  price$5.95/price
  descriptiontwo of our famous Belgian Waffles with
  plenty of real
  
  maple syrup/description
  
  calories650/calories
  
  /food
  food
  
  nameStrawberry Belgian Waffles/name
  price$7.95/price
  descriptionlight Belgian waffles covered with
  strawberries and
  
  whipped cream/description
  
  calories900/calories
  
  /food
  food
  
  nameBerry-Berry Belgian Waffles/name
  price$8.95/price
  descriptionlight Belgian waffles covered with an
  assortment of fresh
  
  berries and whipped cream/description
  
  calories900/calories
  
  /food
  food
  
  nameFrench Toast/name
  price$4.50/price
  descriptionthick slices made from our homemade
  sourdough
  
  bread/description
  
  calories600/calories
  
  /food
  food
  
  nameHomestyle Breakfast/name
  price$6.95/price
  descriptiontwo eggs, bacon or sausage, toast, and our
  ever-popular
  
  hash browns/description
  
  calories950/calories
  
  /food
  
  /breakfast_menu
  
  The project is attached.
  
  I'll also carry on looking for why it's not working...
  
  Regards,
  Caveat
  
  On Sun, 2012-04-22 at 00:12 -0300, Sebastian Kulesz wrote:
   Hi! I have added most of the missing pages for the gb.xml and
   gb.xml.html documentation. I noticed that most of them where

Re: [Gambas-user] rev. 4651 and new gb.xml

2012-04-22 Thread Caveat
I'm now on 4659...

URL: https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk
Repository Root: https://gambas.svn.sourceforge.net/svnroot/gambas
Repository UUID: 96304659-1d19-0410-acd0-aead272a8bd5
Revision: 4659
Node Kind: directory
Schedule: normal
Last Changed Author: prokopy
Last Changed Rev: 4659
Last Changed Date: 2012-04-23 00:29:42 +0200 (Mon, 23 Apr 2012)

I don't follow what's the problem here.  I still get an error
specifically pointing to FromString...

Error when trying create a reader from String: ?xml version=1.0
encoding=ISO-8859-1??xml-stylesheet type = text/css href =
cd_catalog.css?all_ordersorder
priority=rushid20101120123/iddescrubber
duck/desc/orderorder priority=no
rmalid20101120123/iddescsponge/desc/order/all_orders:
Unknown symbol 'FromString' in class 'XmlReader' @
XMLParserToModel.parseInputString.60

=
Is FromString available in the new gb.xml or not?
=

Regards,
Caveat

On Mon, 2012-04-23 at 00:39 +0200, Adrien Prokopowicz wrote:
 Le dimanche 22 avril 2012 23:39:27 Charlie Reinl a écrit :
  Salut Adrien,
  
  works better since rev #4657.
  
  but I get a signal 6 at the seconde Out = XSLT.Transform(Xml, Xsl)
  
  here I attached a demo where you can see it.
  
  This (the FromXML_old is the working version before you changes) is the
  original sub I use.
 
 You got this signal because the resulting document of XSLT.Transform(Xml, 
 Xsl) 
 was empty, and hadn't any root element.
 
 I solved the problem in the rev #4659, but you should check if your resulting 
 documents are all valid, in all cases, otherwise the parser may crash and/or 
 return an empty document.
 
 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to test if result is an array

2012-03-16 Thread Caveat
Hi,

It's probably worth putting in a check for TypeOf(my_var) = gb.Object
(16) before doing the Is Array check...

(From the documentation):

  Expression type
Return value
NULL
gb.Null=15
Boolean
gb.Boolean=1
Byte
gb.Byte=2
Short
gb.Short=3
Integer
gb.Integer=4
Long
gb.Long=5
Single
gb.Single=6
Float
gb.Float=7
Date
gb.Date=8
String
gb.String=9
Variant
gb.Variant=12
Object
gb.Object=16
Pointer
gb.Pointer=11
Function
gb.Function=13
Class
gb.Class=14

Also from the documentation:
IS: Returns TRUE if an object is an instance of a class, or one of its
descendants.

So, obviously ;-) the thing you're checking with 'IS' has to be some
kind of object and can't be a type like Integer or Boolean etc...hence
you first need to ask is this thing an object? and then if so, ask is
this object an array?... otherwise Gambas will complain and say I
expected an object here and you gave me a Boolean (to take a random
example) :-D

Regards,
Caveat

On Fri, 2012-03-16 at 13:09 +0100, Emil Lenngren wrote:
 That kind of code should work, I think... On what line is the error?
 
 2012/3/16 Randall Morgan rmorga...@gmail.com
 
  The code is for a test framework. I am currently on the wrong machine to
  send the code. But it's something like this:
 
  Dim result As Variant
  Dim expected As Variant
  Dim i As Integer
  Dim isEqual As Boolean
 
  result = myFunction() As Variant
 
 
  if Typeof(result) = Typeof(expected) Then
isEqual = True
 
'test values
if expected Is Array Then
   'test each array element against the expected result
   if result Is Array Then
  For i=0 To result.Max()
 if expected[i]  result[i] then
   isEqual = False
 endif
  Next
   endif
else
 .
endif
  endif
 
 
 
 
 
  On Fri, Mar 16, 2012 at 4:08 AM, Emil Lenngren emil.lenng...@gmail.com
  wrote:
 
   How does your code look like?
   A boolean is certainly not an array... :)
  
   /Emil
  
   2012/3/16 Randall Morgan rmorga...@gmail.com
  
That works as long as a is an array. But it a is an a boolean then I
  get
   an
error Object expected but got boolean or float, ect...
   
I too thought it should work that way. Mybe there is a bug in the
  Gambas
   or
my code?
   
   
   
On Fri, Mar 16, 2012 at 3:34 AM, Emil Lenngren 
  emil.lenng...@gmail.com
wrote:
   
 Dim a As New String[]
 Print a Is Array

 should work I think...

 2012/3/16 Randall Morgan rmorga...@gmail.com

  Hi,
 
  I am writing a small test suit and need to tell is the result I got
back
  from a function is an array of some type.
  Does anyone have a solution for this?
 
  Thanks
 
  --
  If you ask me if it can be done. The answer is YES, it can always
  be
 done.
  The correct questions however are... What will it cost, and how
  long
will
  it take?
 
 

   
  
  --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 


   
  
  --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

   
   
   
--
If you ask me if it can be done. The answer is YES, it can always be
   done.
The correct questions however are... What will it cost, and how long
  will
it take?
   
   
  
  --
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
   
  
  
  --
   This SF email is sponsosred by:
   Try Windows Azure free for 90 days Click Here
   http://p.sf.net/sfu/sfd2d-msazure
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
  
 
 
 
  --
  If you ask me if it can be done. The answer is YES, it can always be done.
  The correct questions however are... What will it cost, and how long will
  it take

Re: [Gambas-user] Prepared statements

2012-03-13 Thread Caveat
You mean like this (not so long ago on this very mailing list...)

 Caveat wrote:
  
  Here's some working code...
  
conn = DataAccess.getConnection()
conn.Exec(delete from UTI001 where CLEF = 1, Caveat)
conn.Exec(insert into UTI001 (CLEF, Langue, Backup) VALUES (1,
2, 3), Caveat, EN, C:\\Temp)
rSet = conn.Exec(select * from UTI001 where CLEF = 1, Caveat)
If rSet Not Null Then
  If rSet.Count  0 Then
rSet.MoveFirst
Print rSet[CLEF], rSet[Langue]
  Endif
Endif
  
  As expected, it prints:
  
  Caveat  EN
  
  Regards,
  Caveat

Regards,
Caveat

On Tue, 2012-03-13 at 09:01 +0100, Mathias Maes wrote:
 Hello,
 
 Are there prepared statements in Gambas? It is so much safer to deal with a
 database with them!
 
 Thanks
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Prepared statements

2012-03-13 Thread Caveat
 With statements, you use a sign, and replace that with a type

The sign in Gambas is the 1, 2, 3...which are replaced by the varying
number of params after.

OK, as far as I can tell it's not a true prepared statement in that
there appears to be no way to reuse it with different params but it does
solve the escaping problem.

Depends whether you really need prepared statements or just think you
do...afaicr there are some small efficiency gains in reusing prepared
statements... 

Regards,
Caveat

(sorry forgot to copy 'the list')

On Tue, 2012-03-13 at 09:58 +0100, Mathias Maes wrote:
 That's not really a prepared statement.
 
 With statements, you use a sign, and replace that with a type. This is
 some java sample code:
 java.sql.PreparedStatement stmt = connection.prepareStatement(
SELECT * FROM users WHERE USERNAME = ? AND PASSWORD = ?);
 stmt.setString(1, username);
 stmt.setString(2, password);
 stmt.executeQuery();
 
 You see, the setString function is used, so something like 'or 1=1'
 wouldn't work, because it would be considered as a string.
 
 
 2012/3/13 Caveat gam...@caveat.demon.co.uk
 You mean like this (not so long ago on this very mailing
 list...)
 
  Caveat wrote:
  
   Here's some working code...
  
 conn = DataAccess.getConnection()
 conn.Exec(delete from UTI001 where CLEF = 1,
 Caveat)
 conn.Exec(insert into UTI001 (CLEF, Langue, Backup)
 VALUES (1,
 2, 3), Caveat, EN, C:\\Temp)
 rSet = conn.Exec(select * from UTI001 where CLEF = 1,
 Caveat)
 If rSet Not Null Then
   If rSet.Count  0 Then
 rSet.MoveFirst
 Print rSet[CLEF], rSet[Langue]
   Endif
 Endif
  
   As expected, it prints:
  
   Caveat  EN
  
   Regards,
   Caveat
 
 Regards,
 Caveat
 
 On Tue, 2012-03-13 at 09:01 +0100, Mathias Maes wrote:
  Hello,
 
  Are there prepared statements in Gambas? It is so much safer
 to deal with a
  database with them!
 
  Thanks
 
 
 
 --
  Keep Your Developer Skills Current with LearnDevNow!
  The most comprehensive online learning library for Microsoft
 developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5,
 CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you
 subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft
 developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5,
 CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you
 subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Strange Keyboard Behavior

2012-03-11 Thread Caveat
 but no change

Well if you did the apt-get install suggested by Jussi correctly, I
would expect the following messages to disappear (which is a change,
maybe just not the one you're looking for):


Gtk-WARNING **: Unable to locate theme engine in module_path: pixmap,

Gtk-WARNING **: Unable to locate theme engine in module_path: pixmap,

Can you confirm this?  It may not be of vital importance to get rid of a
couple of warning messages but it will show that changes you make are
having an influence...

Regards,
Caveat


On Sat, 2012-03-10 at 14:36 -0800, Bill-Lancaster wrote:
 OK Ran the code but no change, e.g.
 
 part of a line of code is  1005 AND  TransDate = '
 
 if I delete the D in TransDate I get  1005 AND  TransDte = '  mGen
 
 At this point, the cursor is not representing the point of editing.
 
 I'm going to try to copy this project into a new one.  New projects don't
 deem to have this problem.
 
 Thanks Jussi



--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Consider this and think about that, messages from autoreconf

2012-03-08 Thread Caveat
libtoolize: You should add the contents of the following files to
`aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Remember to add `LT_INIT' to configure.ac.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac
and
libtoolize: rerunning libtoolize, to keep the correct libtool macros
in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.


I always get these messages when reconfiguring as part of
building/compiling gambas3. As they don't appear to cause any problems,
should I continue with my until-now-successful strategy of completely
ignoring them?

Thanks and regards,
Caveat


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] ?gambas bug dateadd with leap years???

2012-02-28 Thread Caveat
Yeah, strange... you can add 12 months (temporary workaround?) but
adding a year results in an invalid date error...

  Print DateAdd(Now, gb.Month, 12)   'OK
  Print DateAdd(Now, gb.Year, 1) ' Gives invalid date

Kind regards,
Caveat

On Wed, 2012-02-29 at 09:47 +1100, richard terry wrote:
 Hi List, Benoit
 
 My program crashed today when using dateadd:
 
 
  DateAdd(Now, gb.Year, iNumberOfYears) has worked for eons in my
recall system
 
 dateAdd using gb.month still works.
 
 I reverted back from the latest svn to an older one  no difference.
 
 Could this be a leap year bug?
 
 richard


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How To INSERT INTO in MySQL?

2012-02-06 Thread Caveat
On Mon, 2012-02-06 at 00:14 -0800, abbat wrote:
 
 but it not work 

sigh

Can you at least tell us the error message you got?  Why do we have to
try to GUESS why it's not working?


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How To INSERT INTO in MySQL?

2012-02-06 Thread Caveat
Here's some working code...

  conn = DataAccess.getConnection()
  conn.Exec(delete from UTI001 where CLEF = 1, Caveat)
  conn.Exec(insert into UTI001 (CLEF, Langue, Backup) VALUES (1, 2,
3), Caveat, EN, C:\\Temp)
  rSet = conn.Exec(select * from UTI001 where CLEF = 1, Caveat)
  If rSet Not Null Then
If rSet.Count  0 Then
  rSet.MoveFirst
  Print rSet[CLEF], rSet[Langue]
Endif
  Endif

As expected, it prints:

Caveat  EN

Regards,
Caveat

On Mon, 2012-02-06 at 09:21 +0100, Caveat wrote:
 On Mon, 2012-02-06 at 00:14 -0800, abbat wrote:
  
  but it not work 
 
 sigh
 
 Can you at least tell us the error message you got?  Why do we have to
 try to GUESS why it's not working?
 
 
 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How To INSERT INTO in MySQL?

2012-02-06 Thread Caveat
 conn.Exec(insert into UTI001 (CLEF, Langue, Backup) VALUES (1, 2,
 3), Caveat, EN, C:\\Temp)

This has to be ONE LINE!

On Mon, 2012-02-06 at 02:40 -0800, abbat wrote:
 
 http://old.nabble.com/file/p33270528/2012-02-06-123728_1440x900_scrot.png 
 
 
 Caveat wrote:
  
  Here's some working code...
  
conn = DataAccess.getConnection()
conn.Exec(delete from UTI001 where CLEF = 1, Caveat)
conn.Exec(insert into UTI001 (CLEF, Langue, Backup) VALUES (1, 2,
  3), Caveat, EN, C:\\Temp)
rSet = conn.Exec(select * from UTI001 where CLEF = 1, Caveat)
If rSet Not Null Then
  If rSet.Count  0 Then
rSet.MoveFirst
Print rSet[CLEF], rSet[Langue]
  Endif
Endif
  
  As expected, it prints:
  
  Caveat  EN
  
  Regards,
  Caveat
  
  On Mon, 2012-02-06 at 09:21 +0100, Caveat wrote:
  On Mon, 2012-02-06 at 00:14 -0800, abbat wrote:
   
   but it not work 
  
  sigh
  
  Can you at least tell us the error message you got?  Why do we have to
  try to GUESS why it's not working?
  
  
  --
  Try before you buy = See our experts in action!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-dev2
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
  
  
  
  --
  Try before you buy = See our experts in action!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-dev2
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
  
  
 http://old.nabble.com/file/p33270528/2012-02-06-123728_1440x900_scrot.png 



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Compile error (gb.gsl) on Ubuntu 11.10

2012-01-31 Thread Caveat
Hi list

On a new machine running Ubuntu 11.10 Oneiric, I'm having problems
compiling Gambas3.  It seems to be to do with my installation of gsl
(gnu scientific library?).

Attached is the full (gzipped) output from the compile script.

I tried searching the documentation just out of interest to see what the
component gb.gsl is, but there seems to be no trace of it.

Thanks and regards,
Caveat




result.txt.gz
Description: GNU Zip compressed data
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Compile error (gb.gsl) on Ubuntu 11.10

2012-01-31 Thread Caveat
Thanks Jussi, that did the trick.

Seems like it's just looking in the wrong place... my gsl_math.h header
file is in /usr/include/gsl/ but it looks like the compile is looking
for it in /usr/local/include/gsl/
Dunno if that helps anyone...

If I understand correctly, gb.gsl is a new component which will
interface to the gnu scientific library.  Perhaps someone could take a
look at including it in the documentation, so it doesn't seem so
'mysterious' in the future? :-)

Thanks again and kind regards,
Caveat

On Tue, 2012-01-31 at 23:51 +0200, Jussi Lahtinen wrote:
 http://www.gnu.org/software/gsl/
 
 Very useful, at least to me.
 
 Jussi
 
 
 
 
 On Tue, Jan 31, 2012 at 23:50, Jussi Lahtinen
 jussi.lahti...@gmail.com wrote:
 You might want to compile without gsl right now...
 Instead of normal ./configure, do ./configure --disable-gsl
 
 Jussi
 
 
 
 On Tue, Jan 31, 2012 at 23:46, Caveat
 gam...@caveat.demon.co.uk wrote:
 
 Hi list
 
 On a new machine running Ubuntu 11.10 Oneiric, I'm
 having problems
 compiling Gambas3.  It seems to be to do with my
 installation of gsl
 (gnu scientific library?).
 
 Attached is the full (gzipped) output from the compile
 script.
 
 I tried searching the documentation just out of
 interest to see what the
 component gb.gsl is, but there seems to be no trace of
 it.
 
 Thanks and regards,
 Caveat
 
 
 
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for
 Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus
 HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you
 subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Seconds = Time.Format(hh:mm:ss)

2012-01-31 Thread Caveat
It's not so hard, ignore the Now bit and look at the second example

Print Time(14, 18, 25)

I don't think the documentation could be much clearer, it just needs you
to actually take the time to read it and figure out how to make the
example work for you.  The documentation can't possibly show exactly the
statements *you* need every time... but try to follow the examples (and
don't just stop and give up after the first sentence).

The example shows nice printing of a time with 14 hours, 18 minutes, and
25 seconds.  What do you think it'll show if the hours are zero, the
minutes are zero and the seconds are 300?

Regards,
Caveat

On Tue, 2012-01-31 at 14:11 -0800, abbat wrote:
 I've read the docs, but my 300 seconds is not the same like NOW so it
 does not work
 
 Emil Lenngren wrote:
  
  You should read the documentation.
  http://gambasdoc.org/help/lang/time?v3
  http://gambasdoc.org/help/cat/time?v3
  
  /Emil
  
  2012/1/31 abbat abbat...@mail.ru
  
 
  How to convert a seconds to time format
 
  Dim Sec = 300
 
  How to display it as:
 
  00:05:00
 
  Thanks
 
  --
  View this message in context:
  http://old.nabble.com/Seconds-%3D%3E-Time.Format%28hh%3Amm%3Ass%29-tp33239641p33239641.html
  Sent from the gambas-user mailing list archive at Nabble.com.
 
 
 
  --
  Keep Your Developer Skills Current with LearnDevNow!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
  --
  Keep Your Developer Skills Current with LearnDevNow!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
  
  
 



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Compile error (gb.gsl) on Ubuntu 11.10

2012-01-31 Thread Caveat
Sounds great Randall, thanks for the info

Regards,
Caveat

On Tue, 2012-01-31 at 14:17 -0800, Randall Morgan wrote:
 For the moment compile without GSL. My next commit will not provide
 the path so it will depend on the system to locate it.
 
 
 On Tue, Jan 31, 2012 at 2:13 PM, Caveat gam...@caveat.demon.co.uk
 wrote:
 Thanks Jussi, that did the trick.
 
 Seems like it's just looking in the wrong place... my
 gsl_math.h header
 file is in /usr/include/gsl/ but it looks like the compile is
 looking
 for it in /usr/local/include/gsl/
 Dunno if that helps anyone...
 
 If I understand correctly, gb.gsl is a new component which
 will
 interface to the gnu scientific library.  Perhaps someone
 could take a
 look at including it in the documentation, so it doesn't seem
 so
 'mysterious' in the future? :-)
 
 Thanks again and kind regards,
 Caveat
 
 On Tue, 2012-01-31 at 23:51 +0200, Jussi Lahtinen wrote:
  http://www.gnu.org/software/gsl/
 
  Very useful, at least to me.
 
  Jussi
 
 
 
 
  On Tue, Jan 31, 2012 at 23:50, Jussi Lahtinen
  jussi.lahti...@gmail.com wrote:
  You might want to compile without gsl right now...
  Instead of normal ./configure, do ./configure
 --disable-gsl
 
  Jussi
 
 
 
  On Tue, Jan 31, 2012 at 23:46, Caveat
  gam...@caveat.demon.co.uk wrote:
 
  Hi list
 
  On a new machine running Ubuntu 11.10
 Oneiric, I'm
  having problems
  compiling Gambas3.  It seems to be to do
 with my
  installation of gsl
  (gnu scientific library?).
 
  Attached is the full (gzipped) output from
 the compile
  script.
 
  I tried searching the documentation just out
 of
  interest to see what the
  component gb.gsl is, but there seems to be
 no trace of
  it.
 
  Thanks and regards,
  Caveat
 
 
 
 
 
 
 --
  Keep Your Developer Skills Current with
 LearnDevNow!
  The most comprehensive online learning
 library for
  Microsoft developers
  is just $99.99! Visual Studio, SharePoint,
 SQL - plus
  HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases
 when you
  subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
 
 ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
 
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 
 
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft
 developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5,
 CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you
 subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 
 
 -- 
 If you ask me if it can be done. The answer is YES, it can always be
 done. The correct questions however are... What will it cost, and how
 long will it take?
 



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Compile error (gb.gsl) on Ubuntu 11.10

2012-01-31 Thread Caveat
I thought you meant in the next few days/weeks, not the next few seconds
LOL

I can confirm that 4442 compiles fine for me in Oneiric now without the
disable-gsl option.

Thanks for the lightning fast turnaround!

Regards,
Caveat


On Tue, 2012-01-31 at 14:25 -0800, Randall Morgan wrote:
 Ok, should be fixed in rev 4442
 
 
 On Tue, Jan 31, 2012 at 2:17 PM, Randall Morgan rmorga...@gmail.com
 wrote:
 For the moment compile without GSL. My next commit will not
 provide the path so it will depend on the system to locate it.
 
 
 On Tue, Jan 31, 2012 at 2:13 PM, Caveat
 gam...@caveat.demon.co.uk wrote:
 Thanks Jussi, that did the trick.
 
 Seems like it's just looking in the wrong place... my
 gsl_math.h header
 file is in /usr/include/gsl/ but it looks like the
 compile is looking
 for it in /usr/local/include/gsl/
 Dunno if that helps anyone...
 
 If I understand correctly, gb.gsl is a new component
 which will
 interface to the gnu scientific library.  Perhaps
 someone could take a
 look at including it in the documentation, so it
 doesn't seem so
 'mysterious' in the future? :-)
 
 Thanks again and kind regards,
 Caveat
 
 On Tue, 2012-01-31 at 23:51 +0200, Jussi Lahtinen
 wrote:
  http://www.gnu.org/software/gsl/
 
  Very useful, at least to me.
 
  Jussi
 
 
 
 
  On Tue, Jan 31, 2012 at 23:50, Jussi Lahtinen
  jussi.lahti...@gmail.com wrote:
  You might want to compile without gsl right
 now...
  Instead of normal ./configure,
 do ./configure --disable-gsl
 
  Jussi
 
 
 
  On Tue, Jan 31, 2012 at 23:46, Caveat
  gam...@caveat.demon.co.uk wrote:
 
  Hi list
 
  On a new machine running Ubuntu
 11.10 Oneiric, I'm
  having problems
  compiling Gambas3.  It seems to be
 to do with my
  installation of gsl
  (gnu scientific library?).
 
  Attached is the full (gzipped)
 output from the compile
  script.
 
  I tried searching the documentation
 just out of
  interest to see what the
  component gb.gsl is, but there seems
 to be no trace of
  it.
 
  Thanks and regards,
  Caveat
 
 
 
 
 
 
 --
  Keep Your Developer Skills Current
 with LearnDevNow!
  The most comprehensive online
 learning library for
  Microsoft developers
  is just $99.99! Visual Studio,
 SharePoint, SQL - plus
  HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future
 releases when you
  subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
 
 ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
 
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 
 
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for
 Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus

Re: [Gambas-user] Gambas WebPage

2012-01-28 Thread Caveat
Nice one Benoit!

Will you call this technology GASP (Gambas ASP) or GAWP (GAmbas Web
Pages)? :-)

Will we have access to the Request and Response just like in asp/jsp?
How will we get params from decorated url/post?  It would be nice if
there were a standard means of accessing the params by name...

Kind regards,
Caveat

On Sat, 2012-01-28 at 11:06 +0100, Benoît Minisini wrote:
 Hi all,
 
 I have started the support of a new kind of form in the IDE, the 
 WebPage.
 
 WebPage is an HTML page with ASP-like syntax. It is implemented in the 
 gb.web component.
 
 The IDE now can edit WebPage, but cannot compile them.
 
 Actually it is just a matter of modyfing the compiler so that the 
 WebPage is transformed into Gambas code that generates the final HTML.
 
 At the moment, the following ASP-like syntax will be implemented:
 
 - % ... % to insert any Gambas code.
 
 - %= ... % to insert the result of a Gambas expression. Html$() will 
 be automatically called.
 
 - Maybe something like %INCLUDE ... % to include a WebPage in another one.
 
 Note that the WebPage is a file with a .webpage extension, and that, 
 they have their own class file attached (like any form).
 
 That way, you don't have to put all your code inside the HTML. Just what 
 is needed.
 
 Internally all WebPages will inherit the WebPage class, and will have a 
 Render method to render their contents (i.e. print to the standard 
 output - don't forget that a Gambas web application is a CGI script!). 
 They can be startup class too.
 
 I'd like to have the thoughts of Gambas users about that: what kind of 
 syntax you would like, what ideas you have...
 
 One idea I have would be a standard syntax for the URL received by the 
 CGI script, so that the displayed WebPage would be automatically 
 selected from it. It could be something as simple as 
 http://myapp.com/form name.
 
 Thanks in advance for your comments.
 
 Regards,
 



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Bizarre things with controls

2012-01-23 Thread Caveat
Hi John,

For compiling Gambas, I use a script which was originally inspired by
Kevin Fishburne of this mailing list.  I've hacked it around a bit and
added stuff to it over time.

The script is called comp_gambas and is attached herewith.  The script
contains all (?) the commands needed for compiling with or without
optimisations, getting the latest or a specific svn version etc.  I just
comment out/uncomment lines as needed.

Perhaps this script should be hosted somewhere on gambasdoc so we can
maintain it/point new compilers of Gambas to it...

Kind regards,
Caveat

On Sun, 2012-01-22 at 16:28 +, John Rose wrote:
 Benoit,
 
 I do not know how to install #4415. Can you refer me to a howto for it?
 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

#
# Install dependencies, normally only needs running once
# This example works for Ubuntu, but YMMV
#
#echo Installing dependencies...
#sudo apt-get install build-essential autoconf libbz2-dev libfbclient2 
libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev 
libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev 
libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev 
libxml2-dev libxslt1-dev libbonobo2-dev libcos4-dev libomniorb4-dev 
librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev 
libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev firebird2.1-dev 
libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev 
libgnome-keyring-dev libgdk-pixbuf2.0-dev

#
# If you run comp_gamas from the right dir, you probably don't need this
#
# cd ~/dev/gambas3

#
# Completely remove all source/build files
#
#echo Removing existing trunk
#rm -fr trunk

#
# Check out latest revision
#
echo Checking out latest revision
svn checkout https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/
cd trunk

#
# Check out specific revision
#
# echo Checking out specific revision 4152
# mkdir rev4152
# svn checkout -r 4152 
https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ rev4152
# cd rev4152

#
# Reconf all
#
#echo Reconfigure all
#./reconf-all

#
# Configure, normal with optimize ON
#
echo Configure - optimization ON
./configure

#
# Configure, optimize OFF for debugging
#
#echo Configure - optimization OFF
#./configure --disable-optimization

#
# Delete previous build stuff
#
echo Make clean
make clean

#
# Normal make
#
echo Make with optimizations
make

#
# Make without optimizing, usually for debugging
#
#echo Make without optimizations
#make CFLAGS=-O0 -g CXXFLAGS=-O0 -g

#
# Install
#
echo sudo make install
sudo make install

#
# Start Gambas3
#
echo Done, starting Gambas3...
gambas3

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to create simple applet?

2012-01-23 Thread Caveat
On Sun, 2012-01-22 at 16:10 -0800, abbat wrote:
 How to create simple applet with text?
 
 Thanks

That's the fourth time you've asked the same question on this list
within a matter of days.  The chances of getting an answer do not
increase with the number of times you ask the same question... in fact,
you may find there's an inverse relationship :-P

Having said that, there's a lot of friendly, helpful people on the list
so have a little patience and perhaps someone will come up with the
answer or an example for you.  If not, well then I guess it's time for
you to roll up your sleeves and work it out for yourself, then tell us
how you did it! :-D

Even if you don't succeed in doing it yourself, you may find your
chances of getting an answer will increase if you show you're prepared
to put some work into finding a solution for yourself... then let us
know what you have tried, what has and hasn't worked, and be a little
more specific in saying where you need help rather than having your
mails sound like I want you to write this program for me, and I want
you to write it NOW! ;-)

Kind regards,
Caveat



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] DB.Quote() doesn't quotes apostrophes

2012-01-23 Thread Caveat
Why not just process one term at a time?


  Dim conn As Connection
  Dim termStr As String
  Dim terms As String[]
  Dim enteredTerm, escapedTerm As String

  ...
  conn = DataAccess.getConnection()
  ...
  ' Get termStr from the input box  
  'termStr = txtQueryInput.Text
  
  ' Set termStr manually for testing
  termStr = abc def he's fill kill''d fine 1 %2 it's%

  terms = Split(termStr,  )
  For Each enteredTerm In terms
escapedTerm = DB.Subst(1, enteredTerm)
' do something with the escaped term... 
...
  Next

Kind regards,
Caveat


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Issue 199 in gambas: LostFocus Leave events not activated for ValueBox

2012-01-20 Thread Caveat
Looks good to me :-D

ComboBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...
ValueBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...
ComboBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...
ValueBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...
ComboBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...

Kind regards,
Caveat

On Fri, 2012-01-20 at 08:18 +, gam...@googlecode.com wrote:
 Updates:
   Status: Fixed
 
 Comment #2 on issue 199 by benoit.m...@gmail.com: LostFocus  Leave events  
 not activated for ValueBox
 http://code.google.com/p/gambas/issues/detail?id=199
 
 It should be fixed in revision #4411.
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Convert string to integer with arbitrary base

2012-01-20 Thread Caveat
Hi Tobias

I'm sorry if I haven't completely understood your request (perhaps
you're asking Benoit for a function built in to Gambas?) but I have here
some code I wrote to help me do arbitrary conversions of a number in any
base to any other base (well up to base 36 anyway... then I ran out of
digits!).

It works with unsigned ints and simply returns -1 if a digit is out of
range e.g. trying to convert 3G from hex.
There's 2 parts to it, toInt() and intToBase() which can be called
independently but I tend to just use convertBase() all the time.

It's probably not very efficient, but it works well enough for me and
has found its way into a few different projects of mine (I tend to do
quite a few things that require binary or hex conversions...).

Benoit will probably point us to some inbuilt function in Gambas that
makes all of this redundant but he can't take away the fun I had writing
it ;-)

Anyway, here's the code:

' Give some convenient names for the common bases
Public Const BASE_BINARY As Integer = 2
Public Const BASE_OCTAL As Integer = 8
Public Const BASE_DENARY As Integer = 10
Public Const BASE_TEN As Integer = 10
Public Const BASE_HEX As Integer = 16
' This table of digit values allows up to base36, using the same
' principle as for standard hex representation
' (i.e. A=10, B=11...F=15 etc)
Private DIGITS As String[] = [0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 
  A, B, C, D, E, F, G, H,
I, J, K, L, M,
  N, O, P, Q, R, S, T, U,
V, W, X, Y, Z]

Public Function convertBase(numberIn As String, fromBase As Integer,
toBase As Integer) As String

  Dim value As Integer
  value = toInt(numberIn, fromBase)
  Return intToBase(value, toBase)

End

Public Function intToBase(numberIn As Integer, base As Integer) As
String
  
  Dim remain, numToDivide As Integer
  Dim result As String = 
  
  numToDivide = numberIn
  If numToDivide  1 Then
result = 0
  Else
Do While numToDivide / base  0
  remain = numToDivide Mod base
  numToDivide = (Int)(numToDivide / base)
  result = DIGITS[remain]  result
Loop
  End If
  Return result
  
End

Public Function toInt(inputStr As String, base As Integer) As Integer
  
  Dim idx, mult, result, value As Integer
  mult = 1
  For idx = Len(inputStr) To 1 Step -1
' If we're in a base with digits bigger than 9
' we need the Find to return 10 for A, 11 for B, 12 for C etc.
value = DIGITS.Find(UCase(Mid$(inputStr, idx, 1)))
' If we have a digit out of range, return -1
If value = base Then
  Return -1
Endif
value = value * mult
result = result + value
mult = mult * base
  Next
  Return result
  
End

Kind regards,
Caveat


On Fri, 2012-01-20 at 23:17 +0100, tobias wrote:
 oops,
 make this comma in the for loop head a semicolon...
 
  /*
 * STR:  I string containing symbols
 * AL:   I alphabet to put symbols in order
 * RET:  O result in integer format
 * return value: O number of symbols put into the integer
 */
  char stoi_al(char *str, char *al, unsigned int *ret)
  {
int i;
unsigned int n = 0, base, c = 0;
char *ind;
 
base = strlen(al);
for (i = 0, str[i]; i++)
{
if (!(ind = strchr(al, str[i]))) break;
n = n * base + ind - al;
c++;
}
*ret = n;
return c;
  }
 
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Database question

2012-01-19 Thread Caveat
As Benoit says...

 SQL quoting is automatically done by the following methods of the 
 Connection class: Exec(), Find(), Edit(), Delete(), Subst(), provided
 that:

 - You use 1, 2... inside the request string to tell where
 quoted arguments must be inserted.

 - You actually pass these arguments.

Example:

  ...
  conn = DataAccess.getConnection()
  rSet = conn.Exec(select * from ART001 where CLEF = 1, AS20)
  ' ... or e.g. conn.Exec(select * from ART001 
  '   where CLEF = 1 AND DELE = 2, AS20, 0)
  '  ... etc.
  If rSet Not Null Then
If rSet.Count  0 Then
  rSet.MoveFirst
  Print rSet[CLEF], rSet[NOMNL]
Endif
  Endif

Kind regards,
Caveat

On Thu, 2012-01-19 at 14:09 +0100, M. Cs. wrote:
 Some more clarification of my problem:
 I had two procedures to communicate with the sqlite database:
 
 Public Sub Trans(be As String) As String
 Dim atmen As String
 atmen = Replace$(be, $, .)
 atmen = Replace$(atmen, €, -)
 atmen = Replace$(atmen, _,  )
 atmen = Replace$(atmen, £, /)
 atmen = Replace$(atmen, ¢, +)
 atmen = Replace$(atmen, §, ')
 atmen = Replace$(atmen, ¥, :)
 
 Return atmen
 End
 
 Public Sub TransB(be As String) As String
 Dim atmen As String
 atmen = Replace$(be, ., $)
 atmen = Replace$(atmen, -, €)
 atmen = Replace$(atmen,  , _)
 atmen = Replace$(atmen, /, £)
 atmen = Replace$(atmen, +, ¢)
 atmen = Replace$(atmen, ', §)
 atmen = Replace$(atmen, :, ¥)
 Return atmen
 End
 
 These were the guards for special characters.
 The first one did the conversion from database to GUI, the second did
 encode the strings for the database insertion.
 I suppose there is a better way for doing it.
 I'd like to learn that way!
 
 2012/1/19, M. Cs. mohar...@gmail.com:
  I'm sorry Benoit,
  I would like to ask your help with this kind of insertions:
  If I have a table called MyTable with creation:
 
  CREATE TABLE CENTRAL(VName Text,FPath TEXT,FName TEXT,FSubs
  INTEGER,FSize REAL,FChanged TEXT);
 
  How could I ensure the failsafe insert query with following fields:
  VName- Photos 5.
  FPath - /Image3 /2011
  FName- Brother's day.jpg
  FSubs- 1
  FSize- 568234.2
  FChanged- 2011-12-06
 
  So how to use 1 and 2 arguments in work?
 
  And how can I retrieve the fields where FName is Like sign ' as in
  Brother's day.jpg?
 
  The query usually fails just like that If I try to seek for the files
  containing certain characters which are in use by the Sqlite backend.
 
  I only need two lines of the answer. Thanks!
 
  Csaba
 
 
  2012/1/18, M. Cs. mohar...@gmail.com:
  Yes, Benoit. I'll check the documentation, since I always used the
  Myconnection.Exec(SELECT FROM table WHERE field=' myvar  ';) form
  of the querying, and now I would like to change it to a more
  convenient way, since I always had to assure myvar is safe.
 
  2012/1/18, Benoît Minisini gam...@users.sourceforge.net:
  Le 18/01/2012 14:17, M. Cs. a écrit :
  Hi!
  Is there any built in function in Gambas3 which can secure the
  database connection from the errors caused by special characters?
 
  I have written functions for replacing the dangerous characters like
  ', +, . and so on, but I'd like to know whether there is a way to make
  queries secure from failures.
 
  Thanks!
 
 
  SQL quoting is automatically done by the following methods of the
  Connection class: Exec(), Find(), Edit(), Delete(), Subst(), provided
  that:
 
  - You use 1, 2... inside the request string to tell where quoted
  arguments must be inserted.
 
  - You actually pass these arguments.
 
  Is it what you need?
 
  --
  Benoît Minisini
 
  --
  Keep Your Developer Skills Current with LearnDevNow!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro

Re: [Gambas-user] ValueBox value validation

2012-01-19 Thread Caveat
Oh, looks like you're right (I have Gambas3, rev 4409).  I just added a
ValueBox to an existing Form and put in the following code:

Public Sub ValueBox1_LostFocus()

  Print ValueBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...

End

Public Sub cbxLockingSystem_LostFocus()

  Print ComboBox: Oh no, I lost my focus!  I'm sure it's around here
somewhere...

End

The ComboBox fires off LostFocus quite happily, but the ValueBox never
does.

I wanted to check the docs to see if there was anything funny about
ValueBox (perhaps doesn't support LostFocus) but the component doesn't
appear in the gb.qt4 docs...
http://gambasdoc.org/help/comp/gb.qt4?v3show

Guess it's over to the devs...

Kind regards,
Caveat

On Thu, 2012-01-19 at 15:41 +, John Rose wrote:
 I have a problem with validating a user-entered value in a ValueBox. I've
 tried LostFocus  Leave and neither seems to do the validation i.e. no
 message box appears for incorrect values. So I thought that I would try
 Change, even though the documentation says that it is raised on each
 character typed in (rather than at the end of typing in the changes to the
 value) which would not be any good. However, I'm not able to use the Change
 event (i.e. not in popup menu for event and has no effect at runtime) for a
 Valuebox: looks like a bug.  I've tried using KeyRelease, but that applies
 to each character change, so that it rejects the value as each character is
 entered.  Code fragment is:
 Public Sub ValueBoxLatitude_Change()
   Dim latitude As Float
   Dim i As Integer
   Print Latitude Validation
   latitude = Last.Value
   If latitude  -90 Or latitude  90 Then
 Message.Info(Must be between -90 and +90 - try again)
 Last.SetFocus
 Stop Event
   Endif
   i = CInt(latitude * 100)
   Print CInt(latitude * 100)=, i
   If (latitude * 100) - CFloat(i)  0.0 Then
 Message.Info(More than 6 decimal digits - try again)
 Last.SetFocus
 Stop Event
   Endif
 End
 
 PS what event should this validation be under?
 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] File opening dialog and one more question

2012-01-06 Thread Caveat

 works correct without any DIM at all? 

Because HowManyUnits is a static function so you don't need to create
any instances of CUnit to be able to call that function.

Regards,
Caveat

On Fri, 2012-01-06 at 08:04 -0800, Dmitrij Malkov wrote:
 
 works correct without any DIM at all? 


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] File opening dialog and one more question

2012-01-05 Thread Caveat
Part one

I never really looked into how GTK-alike the FileChooser was, but it
didn't seem to 'fit' on my regular forms, so I just made a small Form
which handles file choosing/opening and raises the appropriate events.

To answer part two...

As I understand it, static variables exist only once for the class
regardless of how many instances of the class you have in memory.
Non-static variables exist per instance of the class.

A static variable that's not defined as a Const can be a little
dangerous (or at least confusing), as anyone changing the value on a
particular instance of the class changes it for all other instances of
that class too (as there is only one 'copy' of the variable).  Const
implies static...so the static keyword is optional when defining a
const.

As an example, you might have a CurrencyConverter class which defines
Euro to Belgian Francs as a static const set to 40., UKP to US$ as
static (but not const... so changing it on one instance of
CurrencyConverter will change it for all instances), and the amount to
convert as non-static, non-const... hope that example made some sense!

Regards,
Caveat


On Thu, 2012-01-05 at 12:35 +0100, M. Cs. wrote:
 Hi,
 in G2 we had a file opening dialog which was identical as KDE's native
 one. It seems to be removed, or am I wrong? I would like to have that
 old one. It's more convenient with the system-wide bookmarks etc.
 
 And the question: I don't understand the STATIC word's meaning. Is it
 given to define a constant inside a class? What's the practical usage
 of it? I have to redesign my Gambas project, and I need to know the
 exact usage. The documentation didn't make it clear to me. I Know what
 Public and what Private is. Thanks!
 
 Csaba
 
 --
 Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
 infrastructure or vast IT resources to deliver seamless, secure access to
 virtual desktops. With this all-in-one solution, easily deploy virtual 
 desktops for less than the cost of PCs and save 60% on VDI infrastructure 
 costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Release of Gambas 3 RC7

2011-12-25 Thread Caveat
Huh?  Perhaps I'm enjoying my box of English beers too much (Christmas
present so I feel obliged to drink them today) but how do you expect Im
the text to turn into Im The Text (with apologies to the apostrophe
police) when you don't use any Upper functions?

Or is your code deliberately obscure and using some trick to make the
initial letters uppercase?

Season's greetings!
Caveat

On Sun, 2011-12-25 at 17:52 +0100, M. Cs. wrote:
 Hello Benoit!
 Congrats for the RC7 and a possible bug with string functions:
 This function should return the string in mixed case, but it won't:
 
 Public Sub TextTog2_Click()
 Dim intet, gig, a, b As String
 Dim insta As String[]
 Dim i As Integer
 gig = editTitle.Text
 insta = Split(gig,  )
 intet = 
 For i = 0 To insta.Count - 1
   a = Left$(insta[i], 1)
   b = Lower$(Mid$(insta[i], 2))
 intet = intet  a  b   
 Next
 intet = Trim$(intet)
 editTitle.Text = intet
 End
 
 It should work like: Im the text - Im The Textwhere the editTitle
 is a text input
 
 2011/12/24, Benoît Minisini gam...@users.sourceforge.net:
  As promised, but a bit late, here is the seventh release candidate of
  Gambas 3!
 
  As many bugs as possible were fixed, and a few last-minute new features
  were implemented. Mainly:
 
  * A new Gambas highlighting theme for the IDE.
  * A new TabPanel control, that is a TabStrip with thin borders.
  * The ability to define the connection timeout in the database component.
  * gb.report that is almost finished.
 
  See the Release Notes for the full ChangeLog.
 
  Please report any problem as usual...
 
  The final release is planned for the 31 Dec 2011.
 
  Best regards,
 
  --
  Benoît Minisini
 
  --
  Write once. Port to many.
  Get the SDK and tools to simplify cross-platform app development. Create
  new or port existing apps to sell to consumers worldwide. Explore the
  Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
  http://p.sf.net/sfu/intel-appdev
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 --
 Write once. Port to many.
 Get the SDK and tools to simplify cross-platform app development. Create 
 new or port existing apps to sell to consumers worldwide. Explore the 
 Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
 http://p.sf.net/sfu/intel-appdev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas2 Gambas3 Compilation

2011-12-16 Thread Caveat
This is usually managed by links.

So for example, looking for libz.so...

$ sudo find / -name libz.so
[sudo] password: 
/usr/lib/libz.so

$ ls -l /usr/lib/libz.so
lrwxrwxrwx 1 root root 20 2011-04-15 16:32 /usr/lib/libz.so
- /lib/libz.so.1.2.3.4

The 'file' libz.so in /usr/lib is just a pointer to the specific
version, so the 'locate' just has to find libz.so and follow the link to
the right version.

Regards,
Caveat

On Fri, 2011-12-16 at 09:28 -0600, Randy Millner wrote:
 Trying to help the 64bit distro of PcLinuxOS by compiling first
 Gambas2 and then Gambas3
 
 When making sure I have all components first per the Gambas documentation,
 it seems most components exist, but with numbers appended to the filename
 
 For Example:
 
 [ee@localhost ~]$ locate libmysqlclient.so
 /usr/lib64/libmysqlclient.so.16
 /usr/lib64/libmysqlclient.so.16.0.0
 
 [ee@localhost ~]$ locate libz.so
 /lib/libz.so.1
 /lib/libz.so.1.2.5
 /lib64/libz.so.1
 /lib64/libz.so.1.2.5
 /usr/lib/libz.so.1
 /usr/lib/libz.so.1.2.5
 /usr/lib/dropbox-dist/libz.so.1
 /usr/lib64/libz.so.1
 /usr/lib64/libz.so.1.2.5
 
 Shouldn't the target file be somewhere exactly matching the argument
 to 'locate' ?
 
 The 64bit version of the OS might release early 2012, the release
 candidate is very stable,  volunteers
 are hard at work getting the repos filled.  Gambas needs to be in the
 repos when the 64bit version debuts.
 
 any help is appreciated.
 Randy
 
 --
 Learn Windows Azure Live!  Tuesday, Dec 13, 2011
 Microsoft is holding a special Learn Windows Azure training event for 
 developers. It will provide a great way to learn Windows Azure and what it 
 provides. You can attend the event by watching it streamed LIVE online.  
 Learn more at http://p.sf.net/sfu/ms-windowsazure
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Compile fails, rev 4278

2011-12-15 Thread Caveat
gbx3-gbx_class_init.o:(.rodata+0x280): undefined reference to
`NATIVE_System'
gbx3-gbx_class_init.o:(.rodata+0x2a0): undefined reference to
`NATIVE_User'
gbx3-gbx_c_process.o: In function `signal_child':
/home/jules/dev/gambas3/trunk/main/gbx/gbx_c_process.c:646: undefined
reference to `SIGNAL_previous'
gbx3-gbx_c_process.o: In function `init_child':
/home/jules/dev/gambas3/trunk/main/gbx/gbx_c_process.c:670: undefined
reference to `SIGNAL_install'
gbx3-gbx_c_process.o: In function `exit_child':
/home/jules/dev/gambas3/trunk/main/gbx/gbx_c_process.c:689: undefined
reference to `SIGNAL_uninstall'

Attached full output... 


comp_result.gz
Description: GNU Zip compressed data
--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Compile fails, rev 4278 [FIXED]

2011-12-15 Thread Caveat
./reconf-all
./configure
make

seems to have fixed it.  Probably quite a lot changed on my machine
since the last time I compiled Gambas. :-)



--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Big Gambas3 slowdown on hex edit / compare program

2011-12-15 Thread Caveat
I can confirm that rev #4278 is *much* faster on gtk+ now.  gtk+ now
scores about 6 seconds in comparison to qt4's 3 seconds, for my
massively inefficient GUI.

Many thanks for the quick turnaround Benoit!

Now I just need to decide if I want to stay with my beautiful-looking
but poorly-designed textboxes on panels GUI or switch to the rather
more boring-looking but pleasing to the design-police tableview GUI

:-D :-D :-D :-D

Kind regards,
Caveat

On Thu, 2011-12-15 at 05:50 +0100, Benoît Minisini wrote:
 Le 15/12/2011 03:42, Benoît Minisini a écrit :
  Le 15/12/2011 01:19, Caveat a écrit :
  Benoit,
 
  I decided to test against qt and gtk+ by selecting them manually from
  the Project Properties, Components.
 
  If I select gb.qt4, the '4k GUI' builds in just 3 seconds! The '1k GUI'
  takes less than 1/2 a second.
 
  With gb.gtk+ (or gb.gui which is auto-selecting gtk+ afaict), the same
  '4k GUI' takes 1.5 minutes to build.
 
  Hope this helps.
 
  Regards,
  Caveat
 
 
  Then maybe the problem is in the gb.gtk code, as I didn't wrote all of
  it... I will take a look.
 
  And I don't think that John wanted to be rude or sarcastic at all: I had
  the same reaction when I saw the 8000+ textboxes.
 
  It is something I didn't dare to do (even with qt) without expecting an
  explosion somewhere. :-)
 
 
 OK: the GTK+ functions that modify control colors and fonts are slow, 
 and become slower as the number of created controls grows. So I now call 
 them only if really necessary in revision #4278.
 
 If you try it, you will get a great speed up.
 
 Regards,
 



--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


  1   2   >