Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-19 Thread T Lee Davidson
Hello Martin,

If you are working with only one record at a time, you don't need to use 
transactions.
Transactions are used when multiple records need to be modified in an 
all-or-none scenario, such as when a record, that is the one in a 
one-to-many relationship, needs to be deleted.

In such a case, you would start a transaction with .Begin, delete the dependent 
records followed by the one record. Then, if all modifications 
are successful, you would .Commit. If there is a failure at any time during the 
transaction, you would .Rollback.

To get the datacontrol to display the original data after a canceled edit, use 
the .Refresh method.


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 01/19/2015 07:11 PM, Martin McGlensey wrote:
 Hello,



 I have a form containing a datasource linked to a MySQL database table. The
 datasource contains datacontrols to display the data from the underlying
 table. There are buttons for add, edit, save, delete and cancel. The add
 button creates a new record. The save button saves the record. The Edit
 button allows change to the record. The cancel button cancels the changes.
 The delete button deletes the entire record.



 I would like the cancel button to cancel the add and all edits and
 repopulate the form with the original data from the datasource table. If the
 user hits the cancel button no change should be made to the table. The
 delete button asks for confirmation before deleting the record.



 I'm not so much looking for code so much but for advice on the proper
 sequence of bd.begin etc. Should add and edit begin a transaction and save
 commit the transaction? Should cancel rollback the transaction? The syntax
 is $Con.Begin, $Con.Commit and $Con.Rollback. Is that correct? If my thought
 is correct how do I get the form to display the original data?



 Thanks

 --
 New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
 GigeNET is offering a free month of service with a new server in Ashburn.
 Choose from 2 high performing configs, both with 100TB of bandwidth.
 Higher redundancy.Lower latency.Increased capacity.Completely compliant.
 http://p.sf.net/sfu/gigenet
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How do I directly access the child controls in a panel container.

2015-01-10 Thread T Lee Davidson
On 01/10/2015 11:08 AM, Jørn Erik Mørne wrote:

 Hello,



 One can address a control on another form with fMain.txtHello.Text. This
 syntax also works for other container objects. I have a form with a panel
 control. There are several controls within the panel. To avoid naming
 conflicts I want to keep the panel controls separate from the parent form.
 Something like panel.txtEdit.Text would be great but, it does not work. I
 can get the children collection of the panel and get the control names.
 That does not help. I need to get to the control and use its properties and
 events. Is there a way to do this?



 Thanks

 This is the way: Panel1.Children[1].Text


The documentation for Container.Children says that it, Returns a collection 
[...] But it does not return a Collection (class).

That's too bad. The ability to do Panel1.Children[TextBox1].Text would be 
nice.

--
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] How do I directly access the child controls in a panel container.

2015-01-10 Thread T Lee Davidson
On 01/10/2015 01:37 PM, Tobias Boege wrote:
 On Sat, 10 Jan 2015, T Lee Davidson wrote:
 On 01/10/2015 11:08 AM, J?rn Erik M?rne wrote:

 Hello,



 One can address a control on another form with fMain.txtHello.Text. This
 syntax also works for other container objects. I have a form with a panel
 control. There are several controls within the panel. To avoid naming
 conflicts I want to keep the panel controls separate from the parent form.
 Something like panel.txtEdit.Text would be great but, it does not work. I
 can get the children collection of the panel and get the control names.
 That does not help. I need to get to the control and use its properties and
 events. Is there a way to do this?



 Thanks

 This is the way: Panel1.Children[1].Text


 The documentation for Container.Children says that it, Returns a collection 
 [...] But it does not return a Collection (class).

 That's too bad. The ability to do Panel1.Children[TextBox1].Text would be 
 nice.


 If Panel1's containing Form is FForm, then you can do

FForm.Controls[TextBox1]

 to have this access pattern. Since for every non-Form control, there must be
 a Form somewhere up in the parent chain, it is always an option to go up
 Panel.Parent, Panel.Parent.Parent, etc. to find the *first* container which
 is a Form and then use its Controls property as shown above.

 Since all controls (recursively[*]) included in a form must have different
 names, there are no name clashes by design.

 [*] It is not so easy if your Form embeds other Forms. If you want to, say,
  list all control names in your form, you descend recursively from the
  Form through all containers and Print their children's names.

  In this process, you may not descend into containers which happen to be
  Forms because another Form is a brand new namespace and you don't want
  the new names which are in there.

 To test whether a container is a form, you can use the Is operator[0].

 Regards,
 Tobi

 [0] http://gambaswiki.org/wiki/lang/is


Thanks for the elucidation, Tobi. But, I must be missing something.

FForm.Controls[TextBox1] returns a Control which does not have a Text 
property.

.Parent (Panel1.Parent) returns a Container which also does not have a Text 
property.

If we do something like

Dim hForm As Form
If Panel1.Parent Is Form Then hForm = Panel1.Parent

we would have hForm.Controls[TextBox1], which returns a Control with no Text 
property.


So, we seem to be right back to needing to know the integer index of the 
control in the container:
Jørn Erik Mørne wrote, This is the way: Panel1.Children[1].Text


I did not realize that my little comment would elicit a response, and I do not 
wish to hijack Martin's thread.
So, unless there is a better way to access the properties of a Container's 
children, then it seems his question has been answered.


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] How do I directly access the child controls in a panel container.

2015-01-10 Thread T Lee Davidson
On 01/10/2015 03:33 PM, Tobias Boege wrote:
 On Sat, 10 Jan 2015, T Lee Davidson wrote:
 If Panel1's containing Form is FForm, then you can do

 FForm.Controls[TextBox1]

[snip]


 Thanks for the elucidation, Tobi. But, I must be missing something.

 FForm.Controls[TextBox1] returns a Control which does not have a Text 
 property.

 .Parent (Panel1.Parent) returns a Container which also does not have a 
 Text property.

 If we do something like

  Dim hForm As Form
  If Panel1.Parent Is Form Then hForm = Panel1.Parent

 we would have hForm.Controls[TextBox1], which returns a Control with no 
 Text property.


 It returns an object *typed* as a Control. But if the object is actually a
 TextBox, say, you can cast that Control to a TextBox, with something like

Dim hControl As Control
Dim hTextBox As TextBox

hControl = FForm.Controls[TextBox1]
If hControl Is TextBox Then
  hTextBox = hControl
  ' ...
Endif

 Since now the type of the hTextBox variable says TextBox, and the object
 behind it has a Text property, this property can successfully be resolved.

That's great, Tobi. So then Martin can do something like:

   Dim hForm As Form
   Dim hControl As Control
   Dim hTextBox As TextBox

   If Panel1.Parent Is Form Then
 hForm = Panel1.Parent
 hControl = hForm.Controls[TextBox1]
 If hControl Is TextBox Then
   hTextBox = hControl
   Print hTextBox.Text
 Endif
   Endif

I tried it. It works.


 As for the hijacking, my bad. But I didn't understand Martin's question
 either way, so let's pretend I thought this was relevant to the thread :-)

Lol. Okay. :-)


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Array.Sort

2015-01-08 Thread T Lee Davidson
The empty set of parentheses is REQUIRED when sort is used as a function to 
return an array without the optional mode parameter

I don't know. Wouldn't it be more accurate to say that the parentheses are 
required to be able to use the function call as the object which it 
returns; as opposed to the syntax, without the parentheses, referring to the 
function itself?


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 01/08/2015 06:56 PM, Lewis Balentine wrote:
 On 01/08/2015 07:19 AM, Tobias Boege wrote:
 Array.Sort() is a *method* :-)

 The basic (pun intended) elements of all OOP languages are classes
 constructed of properties and methods.
 --- you got me on that one

 In GAMBAS there seem to be several class methods defined that sometimes
 require parenthesis and sometimes do not. I was trying to
 determine/define the conditions that delimit when those parenthesis are
 required using familiar BASIC terms ... as in:
   Public/Private Function  foo () as data type
   Public/Private Sub  foo ()
 both of which I believe are appropriately considered methods in OOP
 languages.

 I believe my second formal computer class was MBASIC on a Osborn CPM
 computer (4 inch green screen). I am trying to recall if the term
 Function was defined in that language but those gray cells are no
 longer responding reliably. The other option was Go to that eventually
 evolved into Public/Private Sub. At the time we called those
 procedures.  I still call them procedures to distinguish them from a
 function that by definition is supposed to return something.

 Take a look at what I put in the WiKi and let me know if I should change it.
 http://gambaswiki.org/wiki/comp/gb/string[]/sort
 ... and if someone insists I will go back and change the variables to
 Hungarian notation but personally I find it more confusing than enlighting.

 Cheers,

 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] Array.Sort

2015-01-08 Thread T Lee Davidson
On 01/08/2015 07:12 PM, Benoît Minisini wrote:
 Le 09/01/2015 01:09, T Lee Davidson a écrit :
 The empty set of parentheses is REQUIRED when sort is used as a function to 
 return an array without the optional mode parameter

 I don't know. Wouldn't it be more accurate to say that the parentheses are 
 required to be able to use the function call as the object which it
 returns; as opposed to the syntax, without the parentheses, referring to the 
 function itself?


 Lee

 Why not just say that?

 « You can omit the () at the end of a function or method call
 statement only. If you don't understand the previous sentence, always
 use () to call a function or a method. »

 :-)


Somehow simple always seems to promote clarity. But, I'll leave it to Lewis to 
edit his edit. :-)

--
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] Array.Sort

2015-01-07 Thread T Lee Davidson
Hi Lewis,

You're forgetting, like I often do, the parentheses for the method [.Sort()].

...
   XXX = TestFunction().Sort()
   DoPrint(XXX.Sort())
   DoPrint(TestFunction().Sort())

   For Each S In XXX.Sort()
 Print S
   Next
   Print ---

   For Each S In TestFunction().Sort()
 Print S
   Next
...


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 01/07/2015 05:55 PM, Lewis Balentine wrote:
 I was playing around trying to learn how to pass string arrays back and
 forth.
 I then looked at the array.sort function. The prototype in the Wiki
 indicates that it returns an string[].

 Function Sort([Mode As Integer]) As String[]

 However it seems that I can not use the returned values(s) where I would
 normally use an array. It appears to to me to operate more as a SUB than
 a FUNCTION in that it resorts the array but does not return something
 that I can use in another function or procedure. Is my interpretation of
 the prototype wrong-headed ?

 Regards,

 Lewis Balentine

 '
 Private Function TestFunction() As String[]
 Return [TEST:abcdefghij, TEST:1234567890, TEST:ABCDEFGHIJ]
 End

 Private Sub DoPrint(XXX As String[])
 Dim S As String
 For Each S In XXX
   Print S
 Next
 Print --
 End


 Public Sub Main()
 ' From Gambas Wiki:
' Function Sort([Mode As Integer]) As String[]
' Sort the array.
'
 Dim XXX As String[] = [XXX:abcdefghij, XXX:1234567890,
 XXX:ABCDEFGHIJ]
 Dim S As String

 ' All of the following work as expected
 DoPrint(XXX)
 DoPrint(TestFunction())
 XXX.Sort
 DoPrint(XXX)
 XXX = TestFunction()
 XXX.Sort
 DoPrint(XXX)

 ' None of the following works: Type Mismatch, wanted string[] got
 function instead
 ' xxx = TestFunction().sort
 ' DoPrint(XXX.sort)
 ' DoPrint(TestFunction().sort)

 ' For Each S In XXX.Sort'  not an object
 '   Print S
 ' Next
 ' Print ---

 ' For Each S In TestFunction().sort   '  not an object
 '   Print S
 ' Next

 Quit
 End

 ' [System]
 ' Gambas = 3.6.2
 ' OperatingSystem = Linux
 ' Kernel = 3.13.0 - 24 - generic
 ' Architecture = x86_64
 ' Distribution = Linux Mint 17 Qiana
 ' Desktop = MATE
 ' Theme = QGtk
 ' Language = en_US.UTF - 8
 ' Memory = 15994 M
 ' [Libraries]
 ' Cairo = libcairo.so.2.11301.0
 ' Curl = libcurl.so.4.3.0
 ' DBus = libdbus - 1. so.3.7.6
 ' GStreamer = libgstreamer - 0.10.so.0.30.0
 ' GStreamer = libgstreamer - 1.0.so.0.204.0
 ' GTK + 3 = libgtk - 3. so.0.1000.8
 ' GTK += libgtk - x11 - 2.0.so.0.2400.23
 ' OpenGL = libGL.so.1.2.0
 ' Poppler = libpoppler.so.44.0.0
 ' Qt4 = libQtCore.so.4.8.6
 ' SDL = libSDL - 1.2.so.0.11.4

 --
 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] Cannot log in to the Wiki

2015-01-06 Thread T Lee Davidson
On 01/06/2015 01:20 PM, Benoît Minisini wrote:
 Le 06/01/2015 18:51, T Lee Davidson a écrit :
 On 01/06/2015 12:24 PM, Tobias Boege wrote:
 On Tue, 06 Jan 2015, T Lee Davidson wrote:
 Submitting the login form only clears the fields and does not log me in.
 
 Knowing that Opera sometimes has issues with cookies, I tried also with 
 Firefox -- same result.
 
 An attempt to re-register shows that my login, 'tldavidson', is already 
 in use. Have Wiki passwords been reset?
 
 
 Same problem here but try clicking the OK button instead of hitting Return
 in the textbox. That got me logged in.
 
 Regards,
 Tobi
 
 
 Yep, that works. Thanks Tobi.
 
 
 Lee
 __
 
 It should be fixed now. I had to find a trick to choose the default
 submit button of a form without using javascript...

It works perfectly now. Thank you, Benoît.


Lee
__

Artificial Intelligence is no match for natural stupidity.

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


[Gambas-user] Cannot log in to the Wiki

2015-01-06 Thread T Lee Davidson
Submitting the login form only clears the fields and does not log me in.

Knowing that Opera sometimes has issues with cookies, I tried also with Firefox 
-- same result.

An attempt to re-register shows that my login, 'tldavidson', is already in use. 
Have Wiki passwords been reset?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Cannot log in to the Wiki

2015-01-06 Thread T Lee Davidson
On 01/06/2015 12:24 PM, Tobias Boege wrote:
 On Tue, 06 Jan 2015, T Lee Davidson wrote:
 Submitting the login form only clears the fields and does not log me in.

 Knowing that Opera sometimes has issues with cookies, I tried also with 
 Firefox -- same result.

 An attempt to re-register shows that my login, 'tldavidson', is already in 
 use. Have Wiki passwords been reset?


 Same problem here but try clicking the OK button instead of hitting Return
 in the textbox. That got me logged in.

 Regards,
 Tobi


Yep, that works. Thanks Tobi.


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Connecting DataControl to DataSource

2015-01-05 Thread T Lee Davidson
I think our mails crossed in transit. Anyway...

The SQL query used to obtain the Result should essentially be:
SELECT * FROM   DataSource.Table   WHERE   DataSource.Filter

So, it can actually be determined by calculation, or maybe more correctly 
stated, by concatenation.

The data control would then determine which of all columns are actually 
displayed.


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 01/06/2015 01:28 AM, Lewis Balentine wrote:
 YEP --- that was the problem. I completely missed is a container. In
 MS VB5/6 you only needed to place the Datasources on the same form 
 actually not even that: you could build a connection or selection set
 and reference that.

 One thing I would like to see is the ability to return the SQL Query
 actually used to obtain the Result. This would be very helpful when
 trying to figure out why something did not work like one expected it to.
 I have used the Subst function to build such a string but there is
 always the nagging doubt that it is not exactly the same via some way
 Gambas handles substitutions or (more likely) I made a typo in
 duplicating the process.

 Thanks for you help LEE.

 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


Re: [Gambas-user] Connecting DataControl to DataSource

2015-01-05 Thread T Lee Davidson
On 01/05/2015 04:35 PM, Lewis Balentine wrote:
 ' Console Window Output:
[snip]
 - - - - - - - - - - - - - - - - - - - - -
 ' FMain.Form_Open.37: DataView1 Parent: FMain

Lewis,

This is why you are not getting the results you expect. DataView1.Parent.Name 
should be DataSource1.

[Sorry for the extra post folks. I was a bit pressed for time earlier.]


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Connecting DataControl to DataSource

2015-01-05 Thread T Lee Davidson
On 01/05/2015 04:35 PM, Lewis Balentine wrote:
 I must be missing something very basic in the use of form database controls.
 I can not seem to get a data control populated ...
 It appears to me that the data control is not linked to the DataSource.
 What am I missing ???

 Two additional questions:
 Is there a way to access the Result object of a DataSource ?
 Is there a way to change the DataSource for a DataControl ?

 Regards,

 Lewis Balentine

Hi Lewis,

You didn't provide your project, so I can only guess at how you've designed the 
DataSource and DataControl(s).

But, I think I can answer your first and third questions with one answer. Your 
third question gives me a hint that you are doing the same thing 
I first did.

One thing that I missed at first is that the data control needs to be a child 
of the data source, and, conversely the data source must be the 
parent of the data control.

In other words, when you place the DataSource on the form, you then expand it 
so it can contain (ie. be the parent of) the data controls.


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Before Delete Event

2014-12-30 Thread T Lee Davidson
On 12/30/2014 11:50 PM, Christian e Ana Luiza Britto wrote:
 Hi Folks,
 First I would like to wish to you all a Happy New Year!
 After that, I would like to know how to use the DataSource Before
 Delete event to verify if a record can be deleted or not. If not the
 record cannot be deleted the program must keep the record intact.
 Best Regards,
 Christian

Greetings Christian,

Normally you should not need to test if a record can be deleted or not. 
DataSource.Remove will handle that automatically and report a success or 
failure. If the record could not be deleted, it would, of course, still remain 
intact. So, I am not really sure what you are asking for.

Now there may be application-specific circumstances where certain records may 
need to be protected. In that case, the question to ask would be, 
What, in *your* application determines whether or not a record can be deleted?

Working with a slightly modified version of the Database Sample, I've added the 
BeforeDelete event subroutine and an application-specific test 
subroutine.

Public Sub DataSource1_BeforeDelete(Keys As Variant[])

   If RecordProtected(Keys[0]) Then
 Stop Event
   Endif

End

Public Sub RecordProtected(Key As Variant) As Boolean

   Dim rRecordSet As Result

   rRecordSet = DataSource1.Connection.Exec(select `firstname` from `test` 
where `id`=  Key)
   If rRecordSet[firstname] = Pierre Then 'Do not delete any of Pierre's 
records
 Print Pierre's records are protected!
 Return True
   Endif
   Return False

End


HTH,


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Gridview sort function

2014-12-29 Thread T Lee Davidson
Bill, my message asking if it helped was delivered after yours due to the 
mailing list issue.

Glad it helped :-) Thanks to Bruce for clearing that up.


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 12/25/2014 04:04 AM, bill-lancaster wrote:
 Bruno and Lee, thank you for the Christmas present!
 Bill



 --
 View this message in context: 
 http://gambas.8142.n7.nabble.com/Gridview-sort-function-tp49863p49878.html
 Sent from the gambas-user mailing list archive at Nabble.com.

 --
 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] Gridview sort function

2014-12-28 Thread T Lee Davidson

On 12/24/2014 05:40 PM, B Bruen wrote:
 On Wed, 24 Dec 2014 11:57:11 -0500
 T Lee Davidson t.lee.david...@gmail.com wrote:

 Apparently I didn't take enough time, Bill.

 I only tested that the text of the TextBox changed appropriately for a 
 column_click, I did not test clicking Button1.

 You are right. The value of TableView.Columns.Ascending within the 
 Column_Click event does not agree with the value outside of the Column_Click
 event. I do not understand this behavior.

 So I'd say that either there is something missing in the documentation, or 
 this is a bug. I have attached a modified version of your sample that
 shows this anomaly more clearly.

 Can anyone else shed some light on this?


 Lee
 __

 Artificial Intelligence is no match for natural stupidity.


 This may shed a bit of light:

 Public Sub TableView1_ColumnClick(Column As Integer)

 The Column value in the click handler is the newly selected column, 
 however the sort values have not been set yet, this happens after the click 
 handler has finished. So you are not correctly displaying the sort values in 
 the TextBox1.

 Attached updated project with some more debug info that shows the actual sort 
 values.

 After you have waded through that a bit, uncomment lines 11 and 12 which 
 should really confuse you :-)

 cheers
 Bruce


Yes, that does explain it. Thanks Bruce.

It is clear now that the TableView sort properties (.Sort and .Ascending) are 
not to be relied upon within the Column_Click event. But they can 
indeed be relied upon within the Sort event.

Bill, does that help?


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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] Gridview sort function

2014-12-24 Thread T Lee Davidson

Apparently I didn't take enough time, Bill.

I only tested that the text of the TextBox changed appropriately for a 
column_click, I did not test clicking Button1.

You are right. The value of TableView.Columns.Ascending within the Column_Click event does not agree with the value outside of the Column_Click 
event. I do not understand this behavior.


So I'd say that either there is something missing in the documentation, or this is a bug. I have attached a modified version of your sample that 
shows this anomaly more clearly.


Can anyone else shed some light on this?


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 12/24/2014 04:51 AM, bill-lancaster wrote:

Thanks for taking the time Lee,
In fact I made that error when composing a simple example, my main programme
didn't have that error.
To make things simple for myself I toggle a boolean value every time the
gridview1_ColumnClick event occurs rather than use the Ascending value.
Thanks again
Bill


TableviewExample-0.0.1.tar.gz
Description: GNU Zip compressed data
--
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] Gridview sort function

2014-12-23 Thread T Lee Davidson
A column-click changes the state of TableView.Columns.Sort.

But that value appears to be one click behind which the following code shows:

Public Sub TableView1_ColumnClick(Column As Integer)

   Print Column, TableView1.Columns.Sort

End


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 12/23/2014 07:03 AM, bill-lancaster wrote:
 After setting the sort option (TableView1.Sorted = True) does a click on a
 column change the state of TableView1.Columns.Sort or do I need to change it
 myself?

--
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] Gridview sort function

2014-12-23 Thread T Lee Davidson
This code:

Public Sub TableView1_ColumnClick(Column As Integer)

  TextBox1.Text = column =   Column   sort = 
  If TableView1.Columns.Sort Then
   TextBox1.Text = Asc
  Else
   TextBox1.Text = Desc
  Endif
End

uses the wrong property.

TableView1.Columns.Sort sets or returns the index of the column that displays 
the sort indicator, not whether any particular column is sorted 
ascending or descending.

Try, If TableView1.Columns.Ascending Then instead.


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 12/23/2014 12:08 PM, bill-lancaster wrote:
 Thanks for that Lee,

 Please see the attached example.  The result of the column_click event does
 not agree with the results of button1_click which reports on the state of
 .Ascending.  In fact after two column_clicks there is no change of state
 with the Ascending property with the column_click event.

 Any thoughts?

 Gambas 3.5.3
 Kubuntu 14.04 TableviewExample-0.gz
 http://gambas.8142.n7.nabble.com/file/n49866/TableviewExample-0.gz



--
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] How to compute Eastern Day

2014-12-19 Thread T Lee Davidson
When I execute that, I get Syntax error. The first argument is not a valid 
identifier on line Public Sub Eastern(Year As Integer) As Date.

Year is a function.


And did you mean Easter Day?


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 12/19/2014 08:35 AM, Benoît Minisini wrote:
 Hi,

 Here is a little X-Mas gift, a function to compute Eastern Day:

 ---8

 Public Sub Eastern(Year As Integer) As Date

 Dim A, B, C, D, E, F, G As Integer

 A = Year Mod 19 + 1
 B = Year Div 100 + 1
 C = (3 * B) Div 4 - 12
 D = (8 * B + 5) Div 25 - 5
 E = (Year * 5) Div 4 - 10 - C
 F = ((11 * A + 20 + D - C) Mod 30 + 30) Mod 30
 If F = 24 Or (F = 25 And A  11) Then Inc F
 G = 44 - F
 If G  21 Then G = G + 30
 Return DateAdd(Date(Year, 3, 1), gb.Day, G + 7 - (E + G) Mod 7 - 1)

 End

 ---8

 I will put it in the 'gb.util' component.

 Regards,


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/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 compute Eastern Day

2014-12-19 Thread T Lee Davidson
On 12/19/2014 11:47 AM, Tobias Boege wrote:
 On Fri, 19 Dec 2014, T Lee Davidson wrote:
 On 12/19/2014 08:35 AM, Beno??t Minisini wrote:
 Hi,

 Here is a little X-Mas gift, a function to compute Eastern Day:

 ---8

 Public Sub Eastern(Year As Integer) As Date

  Dim A, B, C, D, E, F, G As Integer

  A = Year Mod 19 + 1
  B = Year Div 100 + 1
  C = (3 * B) Div 4 - 12
  D = (8 * B + 5) Div 25 - 5
  E = (Year * 5) Div 4 - 10 - C
  F = ((11 * A + 20 + D - C) Mod 30 + 30) Mod 30
  If F = 24 Or (F = 25 And A  11) Then Inc F
  G = 44 - F
  If G  21 Then G = G + 30
  Return DateAdd(Date(Year, 3, 1), gb.Day, G + 7 - (E + G) Mod 7 - 1)

 End

 ---8

 I will put it in the 'gb.util' component.

 Regards,


 When I execute that, I get Syntax error. The first argument is not a valid 
 identifier on line Public Sub Eastern(Year As Integer) As Date.
 Year is a function.

 And did you mean Easter Day?

 Lee

 Never look a gift horse in the mouth :-)


I wasn't, Tobi. I was just reporting that there was an error with the 
subroutine that needed correction.


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/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 compute Eastern Day

2014-12-19 Thread T Lee Davidson
On 12/19/2014 02:48 PM, Benoît Minisini wrote:
 Le 19/12/2014 16:57, T Lee Davidson a écrit :
 When I execute that, I get Syntax error. The first argument is not a
 valid identifier on line Public Sub Eastern(Year As Integer) As
 Date.

 Year is a function.


 And did you mean Easter Day?


 Yes. But why do you get a syntax error, and not me with the same code?
 Strange...


I don't know why that is, Benoît. Maybe because I'm using Gambas v3.6.0 ?


Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Progress Bar

2014-12-17 Thread T Lee Davidson
Try:

For X = 1 To 100 Step 1
 ProgressBar1.Value = X / 100
 ProgressBar1.Refresh
 Wait 0.1
Next


Lee
__

Artificial Intelligence is no match for natural stupidity.

On 12/17/2014 03:33 PM, Christian e Ana Luiza Britto wrote:
 Hi I'm trying to build a form with a progress bar. I make a simple
 For...Next loop to increment the progress bar value. The problems is
 that the Form only appears on the screen when the loop reach the final
 value. What I have to do to see the working bar progress?
 Christian

 Public Sub Form_Show()
Dim X As Integer
X = 0
For X = 1 To 100 Step 1
 ProgressBar1.Value = X / 100
 Wait 1
Next
 End

 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE
 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] DataBrowser Help Again

2014-12-15 Thread T Lee Davidson

Hello Christian,

I did not have any success getting the IDE to give me any options for 
the Connection property. (The list was always blank.) So, I set it 
programmatically.


With your app, on the form, make sure the DataSource control is the 
parent of the DataBrowser.


Sample project attached.


--
Lee
__

Artificial Intelligence is no match for natural stupidity.


On 12/14/2014 03:31 PM, Christian e Ana Luiza Britto wrote:

Hi Benoît Minisini and everybody

Yes, I've tried to follow the Database example. If I run it it works,
but my app still doesn't work. I'm using Gambas version 3.6.90.

When I try to inform the Datasource connection name property via IDE
the database connection I inform is not maintained, when I click in
other place the name I just typed before just disappear... :(

Please, can you send me a very simple code sample for me to try to follow?
There's something very obvious that I'm not understanding...

Christian


Le 14/12/2014 13:34, Christian e Ana Luiza Britto a écrit :

Hi,
I'm trying to make a form with a DataBrowser to edit fields in a
SqLite 3 table. I've tryed everything... I made a connection, put the
datasource container in a form with the Databrowser within with the
columns and labels names but nothing happen. It doesn't work.

Please, someone can share with me the correct coding to make the
connection, create the DataSource and make the Databrowser to work?
I'm trying for a few days now... :(
Best regards from Brazil,
Chrisian De Britto



Did you look at the 'Database' example?



DatabaseSample-1.0.1.tar.gz
Description: GNU Zip compressed data
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Two Databases at the same time...

2014-12-15 Thread T Lee Davidson
Hi Christian,

You really should have most of what you need to figure this out for yourself at:
http://gambaswiki.org/wiki/comp/gb.db/connection
http://gambaswiki.org/wiki/comp/gb.db/connection/open
http://gambaswiki.org/wiki/comp/gb.db/connection/exec
http://gambaswiki.org/wiki/comp/gb.db/connection/edit
http://gambaswiki.org/wiki/comp/gb.db/result


Though not SQL optimized nor transaction safe, maybe this example will help you 
get started:

Public Sub Main()

   Dim hConn1 As New Connection
   Dim hConn2 As New Connection
   Dim hResult1 As Result

   With hConn1
 .Type = mysql
 .Host = localhost
 .Login = username
 .Password = passwd
 .Name = testdb1
   End With

   Try hConn1.Open
   If Error Then Print Cannot Open Database. Error = ; Error.Text

   With hConn2
 .Type = mysql
 .Host = localhost
 .Login = username
 .Password = passwd
 .Name = testdb2
   End With

   Try hConn2.Open
   If Error Then Print Cannot Open Database. Error = ; Error.Text

   hResult1 = hConn1.Exec(select id, name from testdb1.those_records)
   For Each hResult1
 hConn2.Exec(update testdb2.these_records set this_name='  hResult1!name 
 ' where this_id=  hResult1!id)
   Next

End

You can also access the fields as a collection, ie. hResult1[id], 
hResult1[name]


Lee
__

Artificial Intelligence is no match for natural stupidity.


On 12/15/2014 01:10 PM, Christian e Ana Luiza Britto wrote:
 Hi,
 I need to work with 2 different databases at the same time, each one
 with his own tables. So, what I have to do to setup up the Result
 variables for each database? I wanna write a module that will read
 data from one database to update the another.
 Thanks,
 Christian

 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE
 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Bug: Mageia packages made by IDE do not install application icon in distro menu

2014-12-07 Thread T Lee Davidson
On 12/03/2014 04:05 PM, T Lee Davidson wrote:
 On 08/31/2014 07:54 AM, Willy Raets wrote:
 Hi all,

 Lee (also on this mailinglist) did some testing of an application of
 mine.
 He reported that when installing the rpm he had script errors.
 The application did install and had a menu entry, but no icon was
 present for the entry.

 When I run the .deb files on Mint icon are properly made for the distro
 menu entry.

 So the problem seems to be in the mageia package as made by the IDE.

 I believe, with the help of gbWilly who did testing on Linux Mint 13
 (which is based on Ubuntu 12.04), I have determined the cause of the
 script errors and the icon installation issue (and a temporary fix).

 The SPEC file generated by Gambas relies on build macros that may not be
 defined on a Ubuntu-based system. These macros are defined in
 '20build.macros' which, at least on Willy's system, does not exist.

 So, here is my suggestion to fix this, Benoît.

 In the SPEC file, define the _iconsdir, _miconsdir, and _liconsdir
 macros as follows:
 %define_iconsdir%{_datadir}/icons
 %define_miconsdir%{_datadir}/icons/mini
 %define_liconsdir%{_datadir}/icons/large

 Then, simply remove %{update_menus} and %{clean_menus}. They, on my
 system, expand to %{nil} anyway.

 I renamed '20build.macros' so these macros would not be available,
 modified a Gambas-generated package SPEC file as suggested above, and
 rebuilt the package. It built and installed with no errors and correctly
 attributed the application icon to the menu entry.


 If and until this is fixed in Gambas, I have attached a project file
 that users with Ubuntu-based systems may be able to use to fix their
 systems (ie. add the macro definitions) to facilitate making no-error
 RPM-based packages on their systems.

Well I was mistaken. The project I created modifies the user's 
~/.rpmmacros file to define the macros that are used by the Gambas 
packager. However, a look at the gambas3 Package.module shows that the 
~./rpmmacros file is set aside during the packaging process.

The project I attached won't fix anything. The required macros will need 
to be fully defined in the Package.module.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Bug: Mageia packages made by IDE do not install application icon in distro menu

2014-12-03 Thread T Lee Davidson

On 08/31/2014 07:54 AM, Willy Raets wrote:

Hi all,

Lee (also on this mailinglist) did some testing of an application of
mine.
He reported that when installing the rpm he had script errors.
The application did install and had a menu entry, but no icon was
present for the entry.

When I run the .deb files on Mint icon are properly made for the distro
menu entry.

So the problem seems to be in the mageia package as made by the IDE.


I believe, with the help of gbWilly who did testing on Linux Mint 13 
(which is based on Ubuntu 12.04), I have determined the cause of the 
script errors and the icon installation issue (and a temporary fix).


The SPEC file generated by Gambas relies on build macros that may not be 
defined on a Ubuntu-based system. These macros are defined in 
'20build.macros' which, at least on Willy's system, does not exist.


So, here is my suggestion to fix this, Benoît.

In the SPEC file, define the _iconsdir, _miconsdir, and _liconsdir 
macros as follows:

%define _iconsdir   %{_datadir}/icons
%define _miconsdir  %{_datadir}/icons/mini
%define _liconsdir  %{_datadir}/icons/large

Then, simply remove %{update_menus} and %{clean_menus}. They, on my 
system, expand to %{nil} anyway.


I renamed '20build.macros' so these macros would not be available, 
modified a Gambas-generated package SPEC file as suggested above, and 
rebuilt the package. It built and installed with no errors and correctly 
attributed the application icon to the menu entry.



If and until this is fixed in Gambas, I have attached a project file 
that users with Ubuntu-based systems may be able to use to fix their 
systems (ie. add the macro definitions) to facilitate making no-error 
RPM-based packages on their systems.



--
Lee
__

Artificial Intelligence is no match for natural stupidity.


PackageBuildConfigurationTest-0.0.1.tar.gz
Description: GNU Zip compressed data
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] HttpClient Example #2 ?

2014-12-03 Thread T Lee Davidson
At http://gambaswiki.org/wiki/comp/gb.net.curl/httpclient, under Example 
#2, in:

Public Sub DownloadAsync(URL As String)

   sDownloadBuffer = 
   hAsyncClient.URL = URL
   hAsyncClient.TimeOut = 20
   hClient.Async = TRUE
   hAsyncClient.Get()

End

Should the line hClient.Async = TRUE be hAsyncClient.Async = TRUE?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] String[].Extract not behaving as expected

2014-12-03 Thread T Lee Davidson
http://gambaswiki.org/wiki/comp/gb/string[]/extract says:

[edited-quote]
Function Extract (Start As Integer [, Length As Integer ]) As String[]

If Length is negative, then Length elements counting backwards from the 
specified Start are removed.
[/edited-quote]

But this does not appear to be the manner in which it behaves. (I am 
also unsure what counting backwards means. Would that be toward the 
beginning or the end of the array?)

Public Sub Main()
   Dim myStrings As String[] = [s1, s2, s3, s4, s5, s6, s7]
   Dim sString As String

   myStrings = myStrings.Extract(2, -1)
   Print Number of extracted elements:   myStrings.Count
   For Each sString In myStrings
 Print sString
   Next
End

produces:
Number of extracted elements: 5
s3
s4
s5
s6
s7

Obviously, myStrings.Extract(2, -1) extracted all elements from the 
specified Start to the end of the array, not just one element from the 
specified Start.

myStrings.Extract(2, -2) gives an Out of bounds error.

So, I guess my question should be, what is the intended behavior?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] HttpClient Example #2 ?

2014-12-03 Thread T Lee Davidson
On 12/03/2014 07:59 PM, Benoît Minisini wrote:
 Le 03/12/2014 23:16, T Lee Davidson a écrit :
 At http://gambaswiki.org/wiki/comp/gb.net.curl/httpclient, under Example
 #2, in:

 Public Sub DownloadAsync(URL As String)

  sDownloadBuffer = 
  hAsyncClient.URL = URL
  hAsyncClient.TimeOut = 20
  hClient.Async = TRUE
  hAsyncClient.Get()

 End

 Should the line hClient.Async = TRUE be hAsyncClient.Async = TRUE?



 Obviously.


Well that's what I thought. But, I didn't want to correct that if it 
was done intentionally for some reason I may not be aware of.

Fixed :-)


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] String[].Extract not behaving as expected

2014-12-03 Thread T Lee Davidson
On 12/03/2014 07:59 PM, Benoît Minisini wrote:
 Obviously, myStrings.Extract(2, -1) extracted all elements from the
 specified Start to the end of the array, not just one element from the
 specified Start.
 
 myStrings.Extract(2, -2) gives an Out of bounds error.
 
 So, I guess my question should be, what is the intended behavior?
 
 
 The doc is false. -1 means all elements until the end, and other
 negative values have no meaning.

That makes sense. Thank you for confirming.

But, I cannot correct the documentation. The only Markdown Syntax I see 
for that page is, -- /comp/gb/boolean[]/extract, and I have no idea 
what to do with that.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] An utility component for Gambas

2014-12-01 Thread T Lee Davidson
On 12/01/2014 08:48 AM, Benoît Minisini wrote:
 Hi,

 I'd like to create a 'gb.util' component, written in Gambas, to collect
 useful non-GUI programming routines that can't go directly into the
 interpreter because it would make it too heavy.

 [snip]

 The difficulty will be to find the best interface (class name, method
 name, where to put it) for that.

 For example, for the removing accents method, I extended the String
 class. Logical... For directory methods, I created a new Shell static
 class...

 [snip]

I'm not sure if you are asking for thoughts on miscellaneous functions 
to put in a gb.Util component or thoughts on useful extensions to 
existing classes, or both. But...

A. Format decimal numbers as octal:
Public Sub Format(iDecimal as Integer) as String
   Dim digit as Byte
   Dim out as String
   While (iDecimal  0)
  digit = iDecimal % 8
  iDecimal /= 8
  out = digit  out
   Wend
   Return out
End

B. It would be nice to be able to work with *nix-native timestamps. 
Perhaps this might be relatively easily accomplished by just a couple 
functions:
1. DateToTimestamp(dDate as Date) as Integer
2. TimestampToDate(iTimestamp as Integer) as Date
Format$ should be able to take over from there.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] An utility component for Gambas

2014-12-01 Thread T Lee Davidson
On 12/01/2014 02:35 PM, Benoît Minisini wrote:
 Maybe an Oct$() function inside the interpreter. Octal is normally not
 needed with Gambas. Do you have any use of that?

Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a 
file as a decimal integer which is not very intuitive for someone used 
to working with CHMOD with octal numbers. Oct$(420) -- 644

A while back I looked at the interpreter's source and it appeared that 
one conversion function (was it bin_hex?) was structured to allow for 
different conversions. But, it also looked as though there was no more 
room in the jump table. However, IIRC, those were actually conversion 
functions and not formatting functions.

Perhaps Format$ could allow for eg. Format$(mode, gb.Octal), or to 
follow what you originally proposed: eg. Util.Oct$(mode) As String.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] An utility component for Gambas

2014-12-01 Thread T Lee Davidson
On 12/01/2014 03:47 PM, Benoît Minisini wrote:
 Le 01/12/2014 21:37, Tobias Boege a écrit :
 On Mon, 01 Dec 2014, T Lee Davidson wrote:
 On 12/01/2014 02:35 PM, Beno??t Minisini wrote:
 Maybe an Oct$() function inside the interpreter. Octal is normally not
 needed with Gambas. Do you have any use of that?

 Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a
 file as a decimal integer which is not very intuitive for someone used
 to working with CHMOD with octal numbers. Oct$(420) -- 644


 Stat.Mode is an Integer. An integer is a value. There is no such thing as
 a decimal integer. It may be *stored* in a binary base in memory, it may
 be *displayed* in decimal base if you Print it, but per se it doesn't have
 any base attached to it. You only give an integer a base if you encode it
 to a string.


 Moreover, you can use Stat.Auth that decodes the authorization into a
 chmod-like string. No need to deal with integer in any base. :-)

Well yes, that's true. But, as you said, Stat.Auth represents the mode 
as a string in the form rw-r--r--, not as a number. Not a real big 
deal, hence why I said, Perhaps only occasional use.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Cannot download OfflineHelp because Desktop.NetworkAvailable incorrectly returns False

2014-11-28 Thread T Lee Davidson

I couldn't download the offline Help and wanted to know why.

I have found that NetworkAvailable_Read() in Desktop.class is relying on 
'/sbin' being configured in the user's path. On my system, it is not. 
And, so `ifconfg` and `ip` from a console both produce, command not found.


It is necessary to use the absolute path for these commands, ie. 
'/sbin/ifconfig' and '/sbin/ip', for them to work on my system.


Note: For anyone else experiencing this issue, I have attached two 
files. One is a script that will update the offline help for you. And, 
the second is a Gambas command-line app that will let you know if the 
help needs updating.


Note to Benoît: Stat.LastModified returns a localized time and needs to 
be corrected to match sTimestamp. (But, of course, I may be confused again.)



[System]
Gambas=3.6.0
OperatingSystem=Linux
Kernel=3.10.60-desktop-1.mga3
Architecture=x86
Distribution=Mageia 3
Desktop=KDE4
Theme=Oxygen
Language=en_US.UTF-8
Memory=1005M
[Libraries]
Cairo=libcairo.so.2.11200.12
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.2
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.5.0
GTK+3=libgtk-3.so.0.600.4
GTK+=libgtk-x11-2.0.so.0.2400.17
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.34.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4


--
Lee
__

Artificial Intelligence is no match for natural stupidity.


GetOfflineHelpStatus-0.0.1.tar.gz
Description: GNU Zip compressed data


update-offline-help.sh
Description: application/shellscript
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] UTC conversion Tip for Date class doesn't work as expected

2014-11-28 Thread T Lee Davidson
http://gambaswiki.org/wiki/lang/type/date says, Dates can be converted 
to numbers. Then the number returned is the number of days stored 
internally and the fraction of day represented by the number of 
microseconds.

And ,there is a tip box that says:
[[ tip
As date are internally stored in UTC, the time offset between local time 
and UTC is represented by the fractional part  of the floating point 
number returned by the date to float conversion.

So, to convert a date into UTC, you do the following:
 UTCDate = LocalDate - Frac(Date(Now))
]]

1. It is unclear to me how the fractional part can represent both the 
fraction of day represented by the number of microseconds *and* the 
time offset between local time and UTC, especially since it would 
always be changing.

2. A simple command-line app is apparently also confused:
Public Sub Main()

   Dim dDate1, dDate2 As Date

   Print System.TimeZone:   System.TimeZone
   Print Number of hours to add:   Str(System.TimeZone / 60 / 60)
   Print Frac(Date(Now)):   Frac(Date(Now))  \n

   dDate1 = Now
   Print Date now:   Format(dDate1, /mm/dd hh:nn)
   dDate2 = dDate1 - Frac(Date(Now)) 'To follow example
   Print UTC date now:   Format(dDate2, /mm/dd hh:nn)  \n

   Print Difference:   DateDiff(dDate1, dDate2, gb.Hour)

End

On my system, this produced:
System.TimeZone: 18000
Number of hours to add: 5
Frac(Date(Now)): 0.7916651145

Date now: 2014/11/28 18:49
UTC date now: 2014/11/27 23:49

Difference: -19


Instead of adding 5 hours, it subtracted 19.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

P.S.
[System]
Gambas=3.6.0
OperatingSystem=Linux
Kernel=3.10.60-desktop-1.mga3
Architecture=x86
Distribution=Mageia 3
Desktop=KDE4
Theme=Oxygen
Language=en_US.UTF-8
Memory=1005M
[Libraries]
Cairo=libcairo.so.2.11200.12
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.2
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.5.0
GTK+3=libgtk-3.so.0.600.4
GTK+=libgtk-x11-2.0.so.0.2400.17
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.34.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] UTC conversion Tip for Date class doesn't work as expected

2014-11-28 Thread T Lee Davidson
On 11/28/2014 07:24 PM, Benoît Minisini wrote:

 You're right, the tip is false, i.e. it works only when System.TimeZone
  0, otherwise you have a 24h error. It was written before
 System.TimeZone exist.

 So you must do that instead:

   UTCDate = DateAdd(LocalDate, gb.Second, System.TimeZone)

 And the wiki must be fixed...

I'd be glad to do that. But, would you like the Tip simply removed or 
modified re: UTCDate = DateAdd(LocalDate, gb.Second, System.TimeZone)?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] UTC conversion Tip for Date class doesn't work as expected

2014-11-28 Thread T Lee Davidson
On 11/28/2014 07:33 PM, Benoît Minisini wrote:
 Le 29/11/2014 01:32, T Lee Davidson a écrit :
 On 11/28/2014 07:24 PM, Benoît Minisini wrote:

 You're right, the tip is false, i.e. it works only when System.TimeZone
  0, otherwise you have a 24h error. It was written before
 System.TimeZone exist.

 So you must do that instead:

 UTCDate = DateAdd(LocalDate, gb.Second, System.TimeZone)

 And the wiki must be fixed...

 I'd be glad to do that. But, would you like the Tip simply removed or
 modified re: UTCDate = DateAdd(LocalDate, gb.Second, System.TimeZone)?


 Remove the tip, as it is false.


Done. :-)


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Environmental Variable

2014-11-28 Thread T Lee Davidson
On 11/28/2014 11:40 PM, Lewis Balentine wrote:
 Is there a way to read an Environmental Variable other than:

 Dim HomeEnvStr as String
 Shell echo $HOME to HomeEnvStr

 thank you,

 Lewis

Yep. Application.Env (gb)


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Environmental Variable

2014-11-28 Thread T Lee Davidson
On 11/28/2014 11:50 PM, T Lee Davidson wrote:
 On 11/28/2014 11:40 PM, Lewis Balentine wrote:
 Is there a way to read an Environmental Variable other than:

 Dim HomeEnvStr as String
 Shell echo $HOME to HomeEnvStr

 thank you,

 Lewis

 Yep. Application.Env (gb)

I almost forgot. For $HOME, you can use System.User (gb):
User.Home.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Conversion of array value to integer

2014-11-28 Thread T Lee Davidson
On 11/29/2014 12:08 AM, Ian wrote:
 If you have an array value that is a number - TmpAry[0] = 1

 If you try to convert it to an integer with CInt you get an error Not a
 Function
 CInt(TmpAry[0])

 You get the same error with Val(TmpAry[0])

 You DON’T get the same error for CFloat(TmpAry[0]) ?

 I assume this is a bug ?

 Thanks,
 Ian.

Hi Ian,

Need more info - like a small program that reproduces the error.

I get no error with:
Public Sub Main()

   Dim TmpAry As New String[1]
   Dim iBucket As Integer
   Dim fBucket As Float

   TmpAry[0] = 1
   iBucket = CInt(TmpAry[0])
   iBucket = Val(TmpAry[0])
   fBucket = CFloat(TmpAry[0])

   Print done

End


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 08:39 AM, Benoît Minisini wrote:
 Le 27/11/2014 14:29, Stephen a écrit :
 I'm not consciously overriding the event observer so I'm not clear how
 to not do it.
 Obviously I still have much to learn.


 mhForm1 = New Form1(TabStrip1) As Form1
  \/

Now *I'm* confused. The documentation for New 
(http://gambaswiki.org/wiki/lang/new) gives its syntax as:
Object = NEW Class [ ( Constructor parameters... ) ] [ AS Name ]


And, there is a warning box that says, If you forget to specify the 
Name part, your object will never raise events!

But after stripping As Form1 off the end of that line, the form 
obviously *does* raise events.

Is the documentation in need of correction? If so, what should that 
warning actually say?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 12:55 PM, Tobias Boege wrote:
 On Thu, 27 Nov 2014, T Lee Davidson wrote:
 On 11/27/2014 08:39 AM, Beno?t Minisini wrote:
 Le 27/11/2014 14:29, Stephen a ?crit :
 I'm not consciously overriding the event observer so I'm not clear how
 to not do it.
 Obviously I still have much to learn.


 mhForm1 = New Form1(TabStrip1) As Form1
   \/

 Now *I'm* confused. The documentation for New
 (http://gambaswiki.org/wiki/lang/new) gives its syntax as:
 Object = NEW Class [ ( Constructor parameters... ) ] [ AS Name ]


 And, there is a warning box that says, If you forget to specify the
 Name part, your object will never raise events!

 But after stripping As Form1 off the end of that line, the form
 obviously *does* raise events.

 Is the documentation in need of correction? If so, what should that
 warning actually say?


 What the documentation says is generally true. But Form is a special class:
 it attaches to itself as event observer by default when instantiated.

 Regards,
 Tobi


Thanks Tobi. I understand that a form is by default its own event observer.

What confuses me is that the warning seems to indicate that the As 
Name part is required for the object to be able to raise events.

Thinking that the warning should say, *If you specify As* but forget to 
specify the Name part ..., I took off just the Name part leaving As 
at the end of the line. I then got, Unexpected end of line.

So, I guess I'm just confused as to what that warning is actually saying.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
Wow. That is a very good explanation. Thank you, Tobi!

I did understand that a form is by default its own event observer. But 
I guess I did not fully understand exactly what that meant.

(And, yes, I have seen code like, Public Sub Form_Open(), and always 
wondered why it did not say Form1_Open().)

I thought, when I first asked, that it would be a simple answer. (I 
apologize to you, Stephen, for unintentionally hi-jacking your thread. I 
did think you were done with it.)

Okay, so:
1. Should that warning actually say, Unless ~Class~ is a 
[Form](/comp/gb.qt4/form), if you forget to specify the ~Name~ part, 
your object will never raise events!

2. And, should this explanation be put on the Wiki somewhere? If so, where?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.


On 11/27/2014 01:47 PM, Tobias Boege wrote:
 Thanks Tobi. I understand that a form is by default its own event observer.
 
 What confuses me is that the warning seems to indicate that the As
 Name part is required for the object to be able to raise events.
 
 Thinking that the warning should say, *If you specify As*  but forget to
 specify the Name part ..., I took off just the Name part leaving As
 at the end of the line. I then got, Unexpected end of line.
 
 So, I guess I'm just confused as to what that warning is actually saying.
 
 OK, As name comes as a bundle. It makes your newly created object raise
 events under the given name and makes the current class its event observer.
 This is called attaching the object to its observer. As without a name
 is a syntax error.

 This means that in a class Bob the lines

Private h As Alice

Public Sub _new()
  h = New Alice As Beth
End

 create a new Alice in the variable h and assigns her the event name Beth
 (just to show that the event name is totally free to choose).

 The current Bob where you create that Alice is now her event observer, that
 is you can intercept the events of h in the code of Bob. Say, Alice raises
 an event called Send, you can write

Public Sub Beth_Send()
  ' This is called when the h object raises the Send event.
End

 in your Bob.class. Take your time to experiment if you're still insecure
 here. (Or ask for a concrete example!)

 If you don't give As name, the object will not be attached to any observer
 and this will prevent it from raising events (actually it_can_  raise events
 but nobody will hear it).

 But Form plays a special role. It will attach itself to itself automatically,
 using the event name Form. You have very likely already seen code like

Public Sub Form_Open()
  ' ...
End

 without worrying about it. Well, you don't need to worry about it because of
 the automatic attaching logic that is built into the Form class.

 However, if you create a new form and explicitely give it an event name, the
 procedure I described above kicks in. That is, the form is not attached to
 itself as Form but to the object which creates the form, with the given
 name (an object can have at most have one primary observer). Consequently,
 Form_Open within the form code will no longer fire. That's what the thread
 was originally about.

 Regards,
 Tobi

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 02:36 PM, T Lee Davidson wrote:
 Wow. That is a very good explanation. Thank you, Tobi!

 I did understand that a form is by default its own event observer. But
 I guess I did not fully understand exactly what that meant.

 (And, yes, I have seen code like, Public Sub Form_Open(), and always
 wondered why it did not say Form1_Open().)

 I thought, when I first asked, that it would be a simple answer. (I
 apologize to you, Stephen, for unintentionally hi-jacking your thread. I
 did think you were done with it.)

 Okay, so:
 1. Should that warning actually say, Unless ~Class~ is a
 [Form](/comp/gb.qt4/form), if you forget to specify the ~Name~ part,
 your object will never raise events!

 2. And, should this explanation be put on the Wiki somewhere? If so, where?

Nevermind the second question in #2. Apparently I can't create pages.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas Markdown Syntax - Underlining

2014-11-27 Thread T Lee Davidson
I don't see Underlining in the Gambas Markdown Syntax 
(http://gambaswiki.org/wiki/doc/markdown). But from looking at the code 
for various pages, I see that tilde, ~, is for underlining.

I'd like to add Underlining to that page. But, to avoid the risk of 
screwing something up by experimenting to get the answers, I'm asking here.

Are the caveats for Underlining basically the same as for Emphasis?

Emphasis cannot be used in the middle of a word, nor alone in a word.

It will be treated as a literal asterisk.

To produce a literal asterisk at a position where it would otherwise be 
used as an emphasis delimiter, you must escape it with a backslash (see 
below).

In other words, could emphasis and asterisk be replaced with 
underlining and tilde in that text, and it would be correct?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Documentation: Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 04:02 PM, Tobias Boege wrote:
 Hmm, comp/gb.qt4/form already says the entire truth -- if you know what all
 the words mean.

All comp/gb.qt4/form says about events is:
===
Event management

By default, a form is its own event observer.

It means that all the events raised by the Form object are caught by 
event handlers defined in the form source code.
===

It does not say anything about the change in event observer when 
instantiating a form AS FormWhatever. So, to me, not the entire truth.


 I must admit that I don't really care: I think I understand what happens to
 a good extent and if someone asks the question again, I can pull of the
 explanation again (or more likely I'll link to this thread).

Rhetorically, wouldn't it be nice, though, if someone didn't *have* to ask?


 If everything was in the docs, what fun would there be in learning [ being
 able to discover things on your own over time ] ?;-)  It's at least what I
 enjoy most.

Lol. Yes, discovering and learning can be fun.

But, I think it is more fun to learn how to do something with the tools 
at hand than having to learn the special nuances of any particular tool.

As a farmer, I sometimes have to make a tool to get the job done. Do I 
enjoy that? Well, I enjoy making things. But I do not enjoy feeling 
robbed of my productive time.

Not knowing that instantiating a form As FormWhatever overrides the 
default event handler could be a gotcha for someone who is not as 
knowledgeable as you, as Stephen found out.

And, As Name is a feature of the Gambas language implementation. So, 
in my opinion, the appropriate venue for documenting this behavior would 
not be in a GambasMag article.

But, whatever. I was just looking to try to make things better for others.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Documentation: Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 06:40 PM, Tobias Boege wrote:
 I see your point. Are you content with what I wrote[0] into the docs?

 Regards,
 Tobi

 [0]http://gambaswiki.org/wiki/lang/new

Yes, Tobi, that is clear enough without writing a book about it ;-) 
Thank you.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Documentation: Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 06:52 PM, Benoît Minisini wrote:
 I have updated the 'Gambas object model' description on the wiki to
 clarify the special behaviour of the Form objects.

 http://gambaswiki.org/wiki/doc/object-model

 If you haven't read that document yet, I strongly suggest that you read
 it and tell me if the explanations are clear enough for you.

 Regards,

 -- Benoît Minisini

Thank you for updating that page, Benoît. I think it is quite clear 
regarding the behavior of As Name.


I had given it a cursory read it previously, and have just now read it 
more thoroughly.

I did spot some typos, but I can take the time to fix those.

There are some things that I do find confusing:

A. 2.2. Default parent object (or default default observer). Should 
that be simply, or default observer?

B. 3.1. What is inherited: You must use the ME keyword to access the 
inherited elements from the class inside. I think I understand what 
that ultimately means but am not exactly sure what the class inside 
would be.

C. 3.4. Inheritance and constructor: Regarding the order of arguments, 
it is stated that the arguments of elder classes are specified first.

However, 'hMyListBox = NEW MyListBox(Name, hContainer)' appears to 
contradict this and the other examples. It, as far as I can tell, gives 
the argument of the younger class first.

Should the syntax be, 'hMyListBox = NEW MyListBox(hContainer, Name)'?


That's it. That's all I found confusing. (A truly rare occasion!)


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Documentation: Events not firing in dynamically instantiated forms.

2014-11-27 Thread T Lee Davidson
On 11/27/2014 08:49 PM, Benoît Minisini wrote:
 B. 3.1. What is inherited: You must use the ME keyword to access the
 inherited elements from the class inside. I think I understand what
 that ultimately means but am not exactly sure what the class inside
 would be.
 I mean: ...from the class implementation code.

 
 C. 3.4. Inheritance and constructor: Regarding the order of arguments,
 it is stated that the arguments of elder classes are specified first.
 
 However, 'hMyListBox = NEW MyListBox(Name, hContainer)' appears to
 contradict this and the other examples. It, as far as I can tell, gives
 the argument of the younger class first.
 
 Should the syntax be, 'hMyListBox = NEW MyListBox(hContainer, Name)'?
 You're right, that is a mistake. The arguments of elder classes come
 first. If you want to fix that too, you can do it.

Done. :-)


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-26 Thread T Lee Davidson
On 11/26/2014 12:24 AM, Kevin Fishburne wrote:
 On 11/26/2014 12:02 AM, T Lee Davidson wrote:

 Hence, my suggestion that it could be used as a pseudo-marketplace by
 allowing publishers to make their listing private. The payment and/or
 transaction details, access credential delivery, and level of on-going
 support (free/paid) would be the responsibility the individual publisher.


 That's an interesting suggestion, but I'm not sure if it can be made to
 fit in with the plan to have the farm compile and install the
 application on the end user's system. If that's the farm's primary
 objective then it would be too late for a password-protective archive as
 the program would already be installed.

I don't see why it would be too late. The password-protection would 
naturally come into play prior to the download/compile/install access 
being granted.


 Any publishers successfully using the Farm commercially could graciously
 'buy Benoît a beer', or three.


 True, I've even bought him a few beers myself, but I wouldn't build a
 business on that premise.

Oh, I didn't realize Benoît was trying to build a business from the Farm.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-26 Thread T Lee Davidson
On 11/26/2014 06:22 AM, Benoît Minisini wrote:
 Le 26/11/2014 12:05, T Lee Davidson a écrit :

 Oh, I didn't realize Benoît was trying to build a business from the Farm.


 No, I don't. Did I say that?


No, Benoît, to my knowledge you never said that.

My statement was only in response to:

 Any publishers successfully using the Farm commercially could graciously
 'buy Benoît a beer', or three.


 True, I've even bought him a few beers myself, but I wouldn't build a
 business on that premise.

For which the only logical, even if incorrect, conclusion would be that 
you would be the one trying to build a business on the 'buy me a beer' 
premise. It was implied.

But again, to be clear, to my knowledge you never said or even hinted at 
that.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-26 Thread T Lee Davidson
On 11/26/2014 09:47 AM, Fabien Bodard wrote:
 I like the idea of a password, one could also imagine a password
 dynamic key. That is to say a calculated key and unique provided by
 the farm at the time of payment.

Yes, Fabien, that would be very handy for a marketplace.

But, my idea of protecting private listings with a password was not 
intended to complicate the Farm platform, nor to try turning it into a 
marketplace. If the Farm provided any access credentials at the time of 
payment, then it would have to process payments -- and would be a 
marketplace.

The idea was primarily intended to respect Benoît's declaration that the 
Farm is not intended to be a marketplace while giving publishers, who 
wished to do so, the ability to use it *somewhat* in that manner.

It should be quite simple in concept.
1. Publisher sets listing to Private and sets a password.
2. User wishing to have publisher's software follows publisher's URL.
3. Publisher handles all the rest through to providing the password.

Of course, if Benoît wants to make it more complicated than that, that's 
up to him. :-)


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/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 EXEC and GB.Desktop

2014-11-26 Thread T Lee Davidson
On 11/26/2014 07:45 AM, Lewis Balentine wrote:
 /' Gambas module file
 ' uses:
 '  gb
 '  gb.desktop
 '  gb.desktop.x11(automatically selected by gb.desktop)
 '  gb.image(automatically selected by gb.desktop)
 '  gb.qt4 (alternates are: gb.gtk, gb.gtk3, gb.gui)

 Public Sub Main()
 Dim S0, S1, S2 As String
 Dim ww As Integer[]
 Dim n, WinId As Integer

 S0 = /usr/bin/mate-terminal
 S1 = --title=  Chr(34)  Exec Terminal  Chr(34)
 S2 = DISPLAY=:0.0
 Exec [S0, S1] With [S2]
 ' at list 0.25 second delay required between exec and Desktop.FindWindow
 ' may vary according to hardware
 Wait 2
 ww = Desktop.FindWindow(Shell Terminal)
 n = ww.Count - 1
 'WinId is the same as xwininfo id
 WinId = ww[n]
 WinId = ww[0]
 Desktop.ActiveWindow = WinId
 Desktop.SendKeys(ls -l \n)
 Quit
 End
 /--/
 /

 /With ALL component options ww.Count returns 0 although ww[0] holds a
 valid ID.
 With ALL component options *ww[0] *generates *“out of bounds” error*..
 With gb.gui.opengl (select GTK+3) the program crashes at the first line
 of code.

I think maybe you are not waiting long enough. I have to Wait 5 (on my 
admittedly slow system) to keep from getting the out of bounds error. 
When I do that, all works just fine.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-26 Thread T Lee Davidson
On 11/26/2014 04:05 PM, Fabien Bodard wrote:
 I don't want to it to be so complicated... it was just an idea. As the
 farm can be not only on the wiki place but on private servers too.
 It was an idea for extends.

Okay, Fabien. I understand; and thank you.

I just wanted to be clear on the fact that my suggestion was in no way 
intended to turn the Farm into a marketplace, nor to make development 
unduly more complicated than reasonable.

Perhaps extensions could ultimately be plugged in.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-25 Thread T Lee Davidson
On 11/25/2014 05:20 AM, B Bruen wrote:
 On Mon, 24 Nov 2014 14:11:54 +0100
 Benoît Minisini gam...@users.sourceforge.net wrote:

 - Installing is not done.

 I still maintain that autotools is the way to go. It is, as far as I know, 
 distro independent and complies with the desire to make the whole menagerie 
 based on source code visibility.  The installer, apart from the nastiness 
 checking previously posted, could use the existing code in the IDE to create 
 an autotools package and then run the .reconf;.configure;make;su(do) make 
 install circus to install it.

Maybe I'm missing something, but why do all that? The IDE already has a 
package maker. Why not just let the user make their own application 
package and install from that? Gambas must be installed to run the 
application anyway, right?

Perhaps an option to install the package after its creation could be 
added to the package maker.


 - In the future, the error message could be replaced by an automatic
 installation of binary packages depending on the distribution. I need
 help for that: for each distribution, I need to know how to install a
 binary package, and if the distribution follows the gambas binary
 package naming convention.

 As mentioned by Kevin, I would eschew binary installs. Too much danger.

Not necessarily. People install binary packages from various 
unofficial repositories all the time, like the Daily PPA. I think the 
main issue with installing binary packages is: Is the repository trusted.

That being said, I think that doing binary installs of applications 
published on the Farm just complicates things needlessly. But then there 
are components which I have not worked with. Can they also be made into 
packages via the IDE?

Or are we talking about installing the necessary Gambas components from 
the distribution's repository?


 - If there are dependencies of other softwares, then a recursive search
 of all the dependencies is done, and the corresponding software must be
 installed first.

 We have found that too hard. Better a message Can't install, you need the 
 zyxxy component to be installed first.

That may be what Benoît was saying.


 - The source package is downloaded, and stored in something like
 '~/.local/gambas3/farm/farm server/'.

 Hmmm. Not sure. I have a feeling ~/Downloads may be more friendly, or a 
 configurable target.

~/Downloads is not guaranteed to exist. So, if a hard-coded 
'~/.local/gambas3/farm/farm server/' is not acceptable, then a 
configurable target should be allowed. But, in my opinion, 
'~/.local/gambas3/farm/farm server/' makes more sense since this *is* 
a Gambas thing, and ~/Downloads can get cluttered just like 
~/Desktop does.


Now, for those who may wish to use the Farm as a (pseudo-)marketplace. I 
wonder if adding the ability to password-protect an 
application/component listing, like published and private, would be 
worth considering. It would definitely not be ideal, but might be workable.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-25 Thread T Lee Davidson
On 11/25/2014 05:25 PM, Benoît Minisini wrote:

 Binary packages must be made for all distributions

I would ask why must binary packages be made for all distributions (IMHO 
a huge undertaking), but you have answered that in the paragraph below.


 The Gambas Farm allows to install any Gambas program in one click
 whatever your Linux system is. And you have to upload only one package.

That is definitely an awesome goal. But, I just have to wonder why is it 
necessary to go that far? If, as I thought, the Gambas Farm would be 
more of a source-code repository, compiling/packaging could be left up 
to the user, greatly simplifying things.

However, if that particular decision has already been made, then my 
thoughts on it are moot.


 Now, for those who may wish to use the Farm as a
 (pseudo-)marketplace. I wonder if adding the ability to
 password-protect an application/component listing, like published
 and private, would be worth considering. It would definitely not be
 ideal, but might be workable.


 Please elaborate.

I don't know if I can elaborate much as it was just a conceptual idea. 
Wordpress allows pages/posts to be published as public or private. It is 
a similar concept but applied instead to application/component listings 
on the Farm.

Conceptually, publishers could choose to password-protect their listing. 
It may be visible, with its description, in whatever directory or 
listing there is, or found through a search. But, to view the source 
code or to download/install the program would require a password that 
the user would need to get from the publisher.

One of the reasons it is not ideal is that passwords can be easily 
shared. A publisher might, therefore, wish to periodically change the 
password for their listing.

Again, not ideal, but maybe workable. For a true marketplace, specially 
coded (redirect) download links would likely be generated on-the-fly 
after payment processing.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Software Farm in revision #6676

2014-11-25 Thread T Lee Davidson
On 11/25/2014 10:38 PM, Kevin Fishburne wrote:
 Since the farm (as it stands currently) is only for free software (as in
 GPL), users will be free to circumvent payment by downloading the
 application from another source, such as someone who paid and then began
 hosting the source code and/or binaries themselves. This is perfectly
 legal, as the GPL states users may modify or distribute the application
 as they see fit as long as they provide access to the source code. So
 payment will effectively be for convenience, application support or
 kindness rather than the only way they can access the application.

 I'm thinking that creating a payment system for GAMBAS would be an
 insane amount of work and probably isn't a good idea. A much easier way
 would be to support existing payment solutions such as PayPal. Here's
 some information on their digital goods payment solutions:

Benoît stated that the Farm was not intended to be a marketplace.

Hence, my suggestion that it could be used as a pseudo-marketplace by 
allowing publishers to make their listing private. The payment and/or 
transaction details, access credential delivery, and level of on-going 
support (free/paid) would be the responsibility the individual publisher.

I was not suggesting creating a payment system for GAMBAS, nor 
complicating or burdening the Farm platform with transactional needs.

All I was proposing was simply allowing publishers to make their listing 
private if they wished. The rest would be up to them.

Any publishers successfully using the Farm commercially could graciously 
'buy Benoît a beer', or three.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [SegFault 11] Enumerating HttpClient.Headers with For Each

2014-11-23 Thread T Lee Davidson
Okay, I've done more testing related to the noise I accidentally sent to 
the list yesterday.


Attempting to enumerate through HttpClient.Headers with For Each causes 
a SegFault 11 under certain conditions.


In the attached project, there is a procedure that traverses through a 
list of three URLs from a GridView and does HttpClient.Get on each one.


If HttpClient.Headers for each URL is enumerated with Headers[iIndex], I 
can run through the list of URLs multiple times all day long. But, if I 
enumerate the Headers array with For Each, the application SegFaults at 
the second execution of the procedure.


When using Headers[iIndex], Headers.Count is correct.

But, when using For Each, URL[1].Headers.Count is obviously 
URL[0].Headers.Count plus URL[1].Headers.Count. And, actually printing 
out the headers shows that URL[1].Headers is the URL[0].Headers with 
URL[1].Headers appended.


Interestingly, the Headers for the third URL are correct no matter which 
enumeration method is used. And, the application does not SegFault when 
attempting to enumerate the Headers (with For Each) for the third URL on 
the first run. Only after the procedure is re-entered the second time 
does the app SegFault.



How to reproduce:

Set Actually Print Headers to Console to your preference.

A.
1. Leave Enumerate Response Headers With set to Headers[iIndex].
2. Click Get Response Status Codes as many times as you wish to show 
that enumerating with Headers[iIndex] does not SegFault.


B.
1. Set Enumerate Response Headers With to For Each Headers.
2. Click Get Response Status Codes twice. (SegFault)


One last note: I stumbled across this while trying to determine why 
HttpClient.Code sometimes returned 0, and IIRC, I was enumerating with 
For Each at the time.



Now just for clarification, is enumerating HttpClient.Headers with For 
Each something I should not be doing? Have I done something else wrong? 
Or is this actually a bug?



Oops, almost forgot. System info:
[System]
Gambas=3.6.0
OperatingSystem=Linux
Kernel=3.10.60-desktop-1.mga3
Architecture=x86
Distribution=Mageia 3
Desktop=KDE4
Theme=Oxygen
Language=en_US.UTF-8
Memory=1005M
[Libraries]
Cairo=libcairo.so.2.11200.12
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.2
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.5.0
GTK+3=libgtk-3.so.0.600.4
GTK+=libgtk-x11-2.0.so.0.2400.17
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.34.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4


--
Lee
__

Artificial Intelligence is no match for natural stupidity.


GraphicalAppTest-0.0.1-crash-141123-151942.tar.bz2
Description: application/bzip
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Submitting projects with bug reports?

2014-11-23 Thread T Lee Davidson
On 11/23/2014 01:24 PM, Benoît Minisini wrote: 3) In the future, will 
you modify your project to be purely command-line
  (no dialog, no window, no GUI used at all)? Note that if you use a GUI
  component, you use its event loop, not the one provided by the
  interpreter. That may change the behaviour of bugs...

Benoît, do you wish this for ALL projects submitted with bug reports, or 
just that one submitted by Jussi?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Roberto, Re: [SegFault 11] Enumerating HttpClient.Headers with For Each

2014-11-23 Thread T Lee Davidson
Roberto,

I don't mind you hi-jacking my thread, but I'm sure others do as it 
disrupts thread integrity and makes email message management more 
difficult, especially for those who have alot to manage.

Plus, you would likely get better response if you started your own 
thread. To do so, DO NOT use the Reply button. Compose a NEW message to 
gambas-user@lists.sourceforge.net .

When you do, try to include as much applicable code in the same message 
as is practical. The snippets you have provided here may not be enough 
information for someone to give you an intelligent answer. (For example, 
where did hPart as MimePart come from?)


That being said, I do not have an answer for your question, sorry.


---
Lee
__



On 11/23/2014 10:27 PM, roberto wrote:
 to bypass the segfault 11 , if I wanted to use the external library
 libgmime with:

 Library libgmime-2.6:0

 the declaration of the function should be this:

 Private Extern g_mime_part_get_content_object(GMimePart As Pointer) As
 Pointer

 and  my data is in variable hPart as MimePart

 how i can pass hPart to the libgmime function?

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Desktop.Open [,Wait], what does it do?

2014-11-22 Thread T Lee Davidson
Hi,

Desktop.Open is quite a handy utility. Thank you for that, Benoît.


But now can anyone help me understand what Desktop.Open, with Wait=True, 
does?

The Gambas documentation does not say, and the 'xdg-open' documentation 
gives no mention of it.

I thought perhaps it might cause Desktop.Open to wait until the opened 
application terminates. But it does not.

I have tested it with Wait set to True and False, and with image and 
text files. And, the only difference I see is that Wait=True causes only 
a slight delay before Desktop.Open returns.

In both cases (True or False), Desktop.Open returns before the 
application fully launches and becomes the active window.


One more thing to clarify. Am I correct in assuming that since it is 
optional, the default would be False?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Desktop.Open [,Wait], what does it do?

2014-11-22 Thread T Lee Davidson
On 11/22/2014 03:04 PM, Tobias Boege wrote:
 Apparently it waits for the xdg script to terminate. There is no relation to
 the actually launched application -- the xdg script can a priori terminate
 before the application window emerges, or it can terminate even after the
 launched application did (if it's very short-lived), or everything between
 these extremes.

 But when Wait = True, Desktop.Open() tries to report errors that happened
 during running the xdg script. You can answer these questions yourself, too,
 if you care to do that, by looking at the source code. gb.desktop is written
 in Gambas. The particular sources I got these answers from are [0] and [1].

 Regards,
 Tobi

 [0]http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.desktop/.src/Desktop.class
 [1]http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.desktop/.src/Main.module

Thank you, Tobi. Those links helped me get right to it. I can now see 
the difference clearly.

I have updated the documentation 
(http://gambaswiki.org/wiki/comp/gb.desktop/desktop/open) based on your 
response.


However, Desktop.Open with Wait=True does not Error.Raise(The action 
has failed) when it should.

On the command-line, `xdg-open doesnotexist.txt` causes an error message 
box to pop up and exits with a status code of 4, which is The action 
failed. (It sure would be nice if xdg-open provided a --quiet option.)

The following code in a form, when executed, prints no errors:

Public Sub Button1_Click()

   Try Desktop.Open(doesnotexist.txt, True)
   If Error Then Print Error.Text

   Catch
 Print Error.Text

End


So, perhaps the documentation revision I just made is not entirely 
correct in practice.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [CRASH REPORT] Graphical App Test -- UPDATED

2014-11-22 Thread T Lee Davidson

Hello,

Damned, my program crashed Gambas!

Updated HttpClient project attached. Notice the command-line printout 
for the second URL.



--
Lee
__

Artificial Intelligence is no match for natural stupidity.


GraphicalAppTest-0.0.1-crash-141123-022113.tar.bz2
Description: application/bzip
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [CRASH REPORT] Graphical App Test -- UPDATED

2014-11-22 Thread T Lee Davidson
Oops, sorry about the noise folks. I meant to send that to Benoît privately.


On 11/23/2014 02:23 AM, T Lee Davidson wrote:
 Hello,

 Damned, my program crashed Gambas!

 Updated HttpClient project attached. Notice the command-line printout
 for the second URL.



-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] DnsClient not working?

2014-11-21 Thread T Lee Davidson

Greetings,

Either I am doing something wrong, my network config is amiss (LAN with 
DNS server set to router's IP), or DnsClient is not working.


Exec [host, Domain] works. But, both DnsClient.GetHostName and 
DnsClient.GetHostIP return null for a valid, resolvable host.


Project attached.

By the way, the documentation states that the default process mode for 
DnsClient is synchronous. But, when I dropped the DnsClient control onto 
the main form, the Async property defaulted to True. Does the 
documentation need to be updated?



--
Lee
__

Artificial Intelligence is no match for natural stupidity.


DnsClientTest-0.0.1.tar.gz
Description: GNU Zip compressed data
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] DnsClient not working?

2014-11-21 Thread T Lee Davidson
On 11/21/2014 05:19 PM, Benoît Minisini wrote:
 Le 21/11/2014 23:06, T Lee Davidson a écrit :
 Greetings,

 Either I am doing something wrong, my network config is amiss (LAN with
 DNS server set to router's IP), or DnsClient is not working.

 Exec [host, Domain] works. But, both DnsClient.GetHostName and
 DnsClient.GetHostIP return null for a valid, resolvable host.

 The documentation is false. You must call GetHostName() to get the
 hostname, and GetHostIP() to get the ip. Note that gambaswiki.org is
 currently down (not my fault).

Yes, that works better :-) Thank you, Benoît.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Datasource.Filter does not work

2014-11-08 Thread T Lee Davidson
On 11/08/2014 09:29 AM, Martin McGlensey wrote:
 Thanks, Bruce. That worked. Suggest they update the documentation to show
 Datasource.Filter = db.Subst(Field 1, Text) instead of Datasource.Filter
 = string. That may save someone else a few hours of debugging.

Done.
http://gambaswiki.org/wiki/comp/gb.db.form/datasource/filter

Any suggested corrections?


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

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


[Gambas-user] Cannot uncheck text decorations in IDE theme preferences

2014-11-01 Thread T Lee Davidson
Hello,

In trying to figure out how to change the font color of the line numbers 
in the IDE, I discovered what seems to be a strange behavior.

In Tools-Preferences-Theme-Define (buttons), any text decoration 
checkboxes (bold, italic, underline) that are checked, either by default 
or manually, are not uncheckable.

This is not intentional, is it?

The definitions can easily be reverted to default by switching to a 
different color theme and then back again.


And while we're here, is there a way to change just the font color of 
the line numbers? I really prefer the Gambas color theme, but the line 
numbers are too light. And, I have not been able to determine what 
definition controls that.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

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


Re: [Gambas-user] Cannot uncheck text decorations in IDE theme preferences

2014-11-01 Thread T Lee Davidson
On 11/01/2014 03:01 PM, T Lee Davidson wrote:
 Hello,

 In trying to figure out how to change the font color of the line numbers
 in the IDE, I discovered what seems to be a strange behavior.

 In Tools-Preferences-Theme-Define (buttons), any text decoration
 checkboxes (bold, italic, underline) that are checked, either by default
 or manually, are not uncheckable.

 This is not intentional, is it?

 The definitions can easily be reverted to default by switching to a
 different color theme and then back again.


 And while we're here, is there a way to change just the font color of
 the line numbers? I really prefer the Gambas color theme, but the line
 numbers are too light. And, I have not been able to determine what
 definition controls that.



Oops, forgot this may help:
[System]
Gambas=3.6.0
OperatingSystem=Linux
Kernel=3.10.54-desktop-2.mga3
Architecture=x86
Distribution=Mageia 3
Desktop=KDE4
Theme=Oxygen
Language=en_US.UTF-8
Memory=1005M
[Libraries]
Cairo=libcairo.so.2.11200.12
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.2
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.5.0
GTK+3=libgtk-3.so.0.600.4
GTK+=libgtk-x11-2.0.so.0.2400.17
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.34.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

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


Re: [Gambas-user] About SMTP component

2014-10-22 Thread T Lee Davidson
Jorge,

I took your code and modified it only enough to use a form to populate 
the relevant data; all else remained the same.

Testing it showed that the attachment was indeed sent as 
Content-Transfer-Encoding: quoted-printable.

But, that does not appear to be a problem; at least with my Thunderbird. 
The attachment was sent as a true attachment (showing the paperclip) and 
not included in the message body.

Perhaps Base64 encoding is not required for plain text and, hence, the 
reason Gambas does not bother with it.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.


On 10/22/2014 06:49 AM, Jorge Carrión wrote:
 I've a problem with gambas 3.6 Smtpclient (with previous versions too).
 perhaps I don't understand very well the SMTP protocol or I don't undestand
 what some propertis of SmtpClient are, but If someone can help me I'll
 appreciate it very much:

 I use this function to send eMails:

 Public Sub enviarmail(aTo As String[], cSubject As String, cTexto As
 String, cFrom As String, Optional aAttacheds As String[], Optional bcc As
 String[])

  Dim SmtpC As New SmtpClient
  Dim s, fich, mime, fname As String

  SmtpC.debug = True
  SmtpC.host = mcomun.mailserver[host]
  SmtpC.user = mcomun.mailserver[user]
  SmtpC.password = mcomun.mailserver[password]
  SmtpC.From = cFrom
  For Each s In aTo
  SmtpC.To.Add(s)
  Next
  SmtpC.Subject = cSubject
  SmtpC.Body = cTexto
  SmtpC.Alternative = False''Not sure about this is for
  If Not IsNull(aAttacheds) Then
  For Each fich In aAttacheds
  Exec [file, -bi, fich] To mime
  mime = Left(mime, InStr(mime, ;) - 1)
  fname = Right(fich, - RInStr(fich, /))
  SmtpC.Add(File.Load(fich), mime, fname)
  Next
  Endif
  If Not IsNull(bcc) Then
  For Each s In bcc
  SmtpC.bcc.Add(s)
  Next
  Endif
  SmtpC.Encrypt = Net.SSL
  SmtpC.send

 End

 All works fine, but when a text file is attached the content of file is
 showed under the .Body content. Sending the same file with Thunderbird, The
 content of the message is both the same, except this, relative to
 attachement:

 Content-Type: text/plain; charset=UTF-8;
   name=ftp.txt
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
   filename=ftp.txt

 The message that send the smtp client has:

 Content-Type: text/plain; name=sirigamin.txt
 Content-Transfer-Encoding: quoted-printable
 Content-Length: 13

 abcdefghijklmn

 Seems that Gambas smtpclient doesn't base64 encode the file attached if is
 plain/text...
 Is this a expected behavior?  Can it be changed or the encode forced?

 Thanks in advance
 --
 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://p.sf.net/sfu/Zoho
 ___
 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] Import qbasic

2014-10-21 Thread T Lee Davidson
On 10/21/2014 09:57 AM, Barry wrote:
 Hello

 I have a package written in qbasic which is run from command line and
 then controlled by a menu program. I would like to import programs to
 gambas with the intent of running using the GUI and developing extra
 capabilities to the package. I know I have a lot of work to do to
 achieve this but I really don't want to rewrite the whole package. Could
 I please have a few pointers to get started.

 Barry


Hello Barry,

It might be difficult to give you useful pointers to get you started 
without knowing, among other things, how familiar you are with GUI 
programming -- and Gambas in particular.

Since Gambas is similar to Visual Basic, you may find some pointers by 
doing a web search for convert qbasic to visual basic. And then 
combine that info with the info at:
http://gambaswiki.org/wiki/doc/diffvb

Creating a form for each of the tasks your menu handles may work for 
you. You will find information on Menu at:
http://gambaswiki.org/wiki/comp/gb.qt4


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Attempted build of v3.6.0 RPM fails due to DejaVuSans.ttf require

2014-10-18 Thread T Lee Davidson
On 10/17/2014 06:18 PM, Benoît Minisini wrote:
 Yes. This font was used as a default font for gb.sdl. It has been
 replaced by a custom bitmap font integrated inside the gb.sdl sources,
 to remove this dependency.

 Regards,

 -- Benoît Minisini


Thank you Benoît and Tobi for your help.

After a few build-edit-clean cycles, I was finally successful in 
building a Gambas 3.6.0 RPM for Mageia!

In addition to removing the footprints of the deprecated external font 
requirement, I also had to make a few modifications of the SPEC file to 
accommodate the new components and find parents for some orphan files 
that were included in the source but not packaged by that file.

But, I now have a working Gambas 3.6.0 on my Mageia 3 box that I can 
manage with my package manager. Yay!

For anyone else using Mageia, you can read a summary of my short 
journey, which includes step-by-step instructions to build a 3.6.0 RPM 
on Mageia, at 
https://forums.mageia.org/en/viewtopic.php?f=8t=8598p=52267#p52291


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Paint misbehaves on QT when a ValueBox.value is changed (v3.5.4)

2014-10-18 Thread T Lee Davidson
On 10/18/2014 04:06 PM, Benoît Minisini wrote:
 Well that's a little disappointing that you weren't able to replicate
 the issue on your system. On mine, the red line is drawn and then when
 it comes time for the blue line to be drawn, the red line disappears as
 if the DrawingArea has been cleared. It's a mystery to me.
 
 But, thank you for looking into it.
 
 Lee
 
 Did the 3.6 version fix your probelm or not?

 -- Benoît Minisini

I was curious about that too, Benoît. And, it was the first thing I 
tested after getting 3.6 installed. I didn't report my findings, because 
I had no idea that you would have remembered. But you did! :-)

Did 3.6 fix the problem?

Partially. DrawingArea.Clear now works with both QT4 and GTK(2).

But I still need to call DrawingArea.Show to get the drawing to display 
properly after any modification of a TextBox or ValueBox control's Value 
property. (Note: DrawingArea.Cache = True)

Just FYI: If I wrap each line draw in a Paint.Begin/End structure, the 
first line will be displayed until the second line's Paint.End is 
called. As so in pseudo-code:
Paint.Begin
   Draw red line
Paint.End
Modify ValueBox.Value
Paint.Begin
   Draw blue line
Paint.End 'The red line disappears here and blue line is not displayed

If I do not wrap each line in its own block as in:
Paint.Begin
   Draw red line
   Modify ValueBox.Value
   Draw blue line
Paint.End

then nothing is displayed unless I call DrawingArea.Show after Painting.

I can provide a project if you wish, but I think calling 
DrawingArea.Show is a very workable solution.

And, thank you for remembering.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Strange error message

2014-10-18 Thread T Lee Davidson
It looks as thought there might be a special character hidden somewhere 
in that file.

You can check the file encoding to make sure it is not some bastard 
encoding with the command-line: `file .gtkrc-2.0:1`

You can also view special characters in a text file with the VI editor.
`vi .gtkrc-2.0:1`
Then type :set list to show special characters.
:set nolist turns that off, and
:q quits out of VI.

You might be able to 'fix' it by simply loading it up into a visual text 
editor, manually setting its encoding, and saving it.

HTH

-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.


On 10/18/2014 05:32 PM, se...@drofle.co.uk wrote:
 I have installed Gambas v 3.6  on to Xubuntu. Then I started to set up a
 new project. This was mainly to test how well I remembered  working
 previously with version 2. When I ran a test I saw an error message on
 the console ...

 .gtkrc-2.0:1: error: unexpected character '\342', expected string
 constant

 So I checked out the .gtkrc file

 style “xfdesktop-icon-view” {
 XfdesktopIconView::label-alpha = 0

 fg[NORMAL] = “#fafa06”
 fg[SELECTED] = “#fafa06”
 fg[ACTIVE] = “#fafa06”
 }

 widget_class “*XfdesktopIconView*” style “xfdesktop-icon-view”

 Just a normal file to set some colours. Now I am baffled, although the
 test file still seems to run OK. If anyone can point me in the right
 direction I would be very grateful,

 Thanks

 Neil




 --
 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://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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Paint misbehaves on QT when a ValueBox.value is changed (v3.5.4)

2014-10-18 Thread T Lee Davidson

On 10/18/2014 06:29 PM, Benoît Minisini wrote:

Yes, I need your project to test again. And remind me which version of
GTK+ exactly you use.

Regards,

-- Benoît Minisini


I have to assume this project uses gtk+2.0.

I did not package gb.gtk3 in my RPM build SPEC file since I didn't think 
of it. And, the build process did not give me any errors about gtk3 
files being included but not packaged; even though libgtk+3_0 and 
libgtk+3.0-devel are installed.


Also, Project-Properties-Components does not list gb.gtk3 as an 
available component; only gb.gtk.



Project attached.

--
Lee
__

Artificial Intelligence is no match for natural stupidity.


PaintTest-0.0.1.tar.gz
Description: GNU Zip compressed data
--
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://p.sf.net/sfu/Zoho___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to update Gambas 3.5.4 to 3.6

2014-10-18 Thread T Lee Davidson
No, it will not upgrade itself automatically. You can find instructions 
for compilation and installation here:
http://gambaswiki.org/wiki/install

There is also a section there containing instructions for specific 
distributions. It is basically a configure-make-install process.

I don't follow the Debian/Ubuntu community, but I believe there is a 
package repository maintained by one of our list members (PPA?) for 
those Linux flavors.

Also, if you are using a rpm-based system, you may be able to build a 
RPM package for your distro.


-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.


On 10/18/2014 07:08 PM, Martin McGlensey wrote:
 Hello,



 Will Gambas 3.5.4 upgrade to 3.6 automatically? If not what is the correct
 way to update it?



 Thanks,

 Marty

 --
 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://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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Attempted build of v3.6.0 RPM fails due to DejaVuSans.ttf require

2014-10-17 Thread T Lee Davidson
I am trying to build a RPM of Gambas 3.6.0 on my Mageia 3 system, 
because I prefer to use package management instead of the 
configure-make-install process.

I successfully built a v3.5.4 RPM by grabbing the Source RPM from the 
Mageia development repository (Cauldron). However, v3.6.0 is not yet there.

So I grabbed the SPEC file from that SRPM 
(http://svnweb.mageia.org/packages/cauldron/gambas3/current/SPECS/gambas3.spec) 
and modified it slightly for v3.6.0.

The package seems to build just fine, but %install fails trying to 
create a symlink to /usr/share/fonts/TTF/dejavu/DejaVuSans.ttf within 
the 
~/rpmbuild/BUILDROOT/gambas3-3.6.0-1.mga3.i386/usr/share/gambas3/gb.sdl/ 
directory, since that directory does not exist after the build.

Apparently DejaVuSans.ttf was at one time required by the SDL component?

Whether or not it was ever required, is it required today by v3.6.0? Can 
I safely remove that requirement from the SPEC file?


--
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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Attempted build of v3.6.0 RPM fails due to DejaVuSans.ttf require

2014-10-17 Thread T Lee Davidson
On 10/17/2014 02:04 PM, Tobias Boege wrote:

 There were things done to that file. Quoting the commit logs (in excerpts):

 --8
 Revision: 5933
 [GB.SDL]
 * NEW: Rename the default SDL font file as _default.ttf to prevent
packaging conflicts.

 Added Paths:
 ---
  gambas/trunk/gb.sdl/src/data/_default.ttf

 Removed Paths:
 -
  gambas/trunk/gb.sdl/src/data/DejaVuSans.ttf

 --8
 Revision: 5937
 [GB.SDL]
 * NEW: Use the Gambas monospace font as SDL default font now.

 Added Paths:
 ---
  gambas/trunk/gb.sdl/src/data/_default.bdf

 Removed Paths:
 -
  gambas/trunk/gb.sdl/src/data/_default.ttf
 --8

 Maybe you can go further from here?

 Regards,
 Tobi


Thank you for your response, Tobi.

I need to learn how to use SourceForge. Did you go to 
http://sourceforge.net/p/gambas/code/HEAD/tree/ and then click Browse 
Commits? Is there a way to search them?

In browsing the commits, I found [r6390]: * NEW: The default font is 
now embedded in the library.

I think that means I can safely remove the references to that external 
font in the SPEC file. I will try that.

Thanks again.

-- 
Lee
__

Artificial Intelligence is no match for natural stupidity.

--
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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Update: Re: Wow, Gambas is twice as fast as (Free) Pascal

2014-10-16 Thread T Lee Davidson
I feel responsible to make a correction. After further research, I have 
discovered that Gambas, doing the Polynomial benchmark, is not faster 
than the pre-compiled Free Pascal program.

I thought it might be prudent, before adding any Pascal benchmarks to 
the Wiki, to see if there might be some way to optimize the compilation 
of the Pascal program -- which is usually the case for just about any 
compiled language. Plus, I thought there might be something wrong with 
my system's Free Pascal Compiler (FPC) configuration that made my 
relative results so disparate from Jussi's. So I took the little 
Polynomial benchmark, and my results thus far, to the Free Pascal forum.

With their assistance, I had gotten the performance ratio between the 
Pascal program and the Gambas program down to 1.37:1 on my system, which 
was real close to Jussi's performance ratio of 1.29:1 (5.376s / 4.172s). 
I was satisfied with that.

They, on the other hand, apparently were not ;-)

Long story short, FPC can make use of a unit (similar to a Gambas 
module) for floating point code. FPC for the x86-64 automatically uses 
this unit for floating point code due to the fact that all x86-64 CPUs 
support it. I, on the other hand, had to specifically tell the compiler 
to use that unit so the FPU on my Pentium4 could be utilized. That 
combined with what they call Level 2 optimization, for this particular 
program, significantly increased the performance of the compiled Pascal 
program.

Anyone so inclined can read more about Level 1-3 optimizations at 
http://www.freepascal.org/docs-html/prog/progse49.html#x255-26800011.3


A 64-bit sytem user would need compile only with:
`fpc -O2 polynom.pas`

But I had to use (the SSE2 unit):
`fpc -Cfsse2 -O2 polynom.pas`

Here are my latest results with program output omitted.

The Pascal program:
$ time ./polynom
[...]
real0m9.910s
user0m8.685s
sys 0m0.031s

The Gambas program, first run:
$ time gbs3 -f polynom.gambas
[...]
real0m12.573s
user0m9.607s
sys 0m0.083s

The Gambas program, second run (making use of the compile cache?):
$ time gbs3 -f polynom.gambas
[...]
real0m11.143s
user0m9.717s
sys 0m0.046s


So Gambas is still right up there in performance :-) Well, taking out 
compile time, and for this particular program.


Is there still a place for Pascal program benchmarks on the Wiki? ;-) If 
so, I'll try to work on that when I can manage to find some play time.


Lee



On 10/11/2014 08:24 PM, Jussi Lahtinen wrote:
 My cleaning script didn't include rm -f /usr/local/bin/gbs3 and
 apparently because of changed paths make install didn't overwrite old
 version. So my gbs3 had version number 3.2.90, and no -f option (it was
 simply ignored)!
 Just to warn others, you may want to check whether you too have two
 versions of gbs3 installed (in /usr/local/bin/gbs3 and in /usr/bin/gbs3).
 If you do, remove the files, run sudo make install again and restart your
 terminal.

 $ time gbs3 -c -f polym.gambas
 125
 125
 125
 125
 125
 125
 125
 125
 125
 125

 real0m4.172s
 user0m4.158s
 sys0m0.012s


 $ time ./polym
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006
   1.25E+006

 real0m5.376s
 user0m5.374s
 sys0m0.000s


 So, Gambas really is faster in fair comparison!




 Jussi



--
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://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Wow, Gambas is twice as fast as (Free) Pascal

2014-10-12 Thread T Lee Davidson
Hey Jussi,

I'd like to try figuring out why the Pascal program runs so much slower, 
relative to Gambas, on my system than on yours. May I ask what version 
of FPC you are using?


On 10/11/2014 08:24 PM, Jussi Lahtinen wrote:

 $ time gbs3 -c -f polym.gambas
[snip]
 real0m4.172s
 user0m4.158s
 sys0m0.012s


 $ time ./polym
[snip]
 real0m5.376s
 user0m5.374s
 sys0m0.000s

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


Re: [Gambas-user] Wow, Gambas is twice as fast as (Free) Pascal

2014-10-11 Thread T Lee Davidson
I guess I should have included my system information; just didn't think 
about it being relevant at the time. Obviously, though, it is.

System Info:
Intel(R) Pentium(R) 4 CPU 2.40GHz, 1G RAM
Mageia 3, Kernel 3.10.54 (KDE4)
Gambas 3.5.4
Free Pascal Compiler version 2.6.4 [2014/03/07] for i386


Interestingly, closing my web browser gave me better performance with 
both, but still a roughly 2:1 difference:

Pascal program compiled with `fpc polynom.pas` and then timed:
real0m22.445s
user0m20.875s
sys 0m0.014s

Gambas program executed with `time gbs3 -f -c polynom.gambas`:
real0m11.303s
user0m10.297s
sys 0m0.035s


Lee


On 10/11/2014 02:37 PM, Jussi Lahtinen wrote:
 As you can see, my numbers are something completely different. My test was
 done with Intel Core2 Quad @ 2.83 GHz. And the Pascal version was compiled
 with fpc polym.pas.
 What kind of system ran the Gambas code in 18 seconds!? And yet, how did it
 spend 7 times more time on the Pascal program than my system!?

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


Re: [Gambas-user] Wow, Gambas is twice as fast as (Free) Pascal

2014-10-11 Thread T Lee Davidson
Just to be clear, I did not run 'polynom.gambas' as a script with the 
she-bang specifying to use 'gbs3' to execute it. That *is* slow.

I executed it using gbs3 with the '-f' option invoking the JustInTime 
compiler.

I also just now used the IDE to create a command-line application based 
on the benchmark, created an executable, and then ran that. That was 
also so slow (almost 2 minutes to Print the first result) that I did not 
let the timing test finish.

So, it appears that the JIT compiler option is what makes the huge 
difference -- on my system anyway.


On 10/11/2014 03:07 PM, T Lee Davidson wrote:
 I guess I should have included my system information; just didn't think
 about it being relevant at the time. Obviously, though, it is.

 System Info:
 Intel(R) Pentium(R) 4 CPU 2.40GHz, 1G RAM
 Mageia 3, Kernel 3.10.54 (KDE4)
 Gambas 3.5.4
 Free Pascal Compiler version 2.6.4 [2014/03/07] for i386


 Interestingly, closing my web browser gave me better performance with
 both, but still a roughly 2:1 difference:

 Pascal program compiled with `fpc polynom.pas` and then timed:
 real0m22.445s
 user0m20.875s
 sys 0m0.014s

 Gambas program executed with `time gbs3 -f -c polynom.gambas`:
 real0m11.303s
 user0m10.297s
 sys 0m0.035s


 Lee


 On 10/11/2014 02:37 PM, Jussi Lahtinen wrote:
 As you can see, my numbers are something completely different. My test
 was
 done with Intel Core2 Quad @ 2.83 GHz. And the Pascal version was
 compiled
 with fpc polym.pas.
 What kind of system ran the Gambas code in 18 seconds!? And yet, how
 did it
 spend 7 times more time on the Pascal program than my system!?

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


Re: [Gambas-user] Paint misbehaves on QT when a ValueBox.value is changed (v3.5.4)

2014-10-10 Thread T Lee Davidson
On 10/09/2014 07:32 PM, Benoît Minisini wrote:
 Le 10/10/2014 00:04, T Lee Davidson a écrit :
 If a form's ValueBox.value is modified, subsequent Paint'ing on a cached
 DrawingArea of the form doesn't produce the draw when the gb.qt4
 component is loaded. It does work if, instead, the gb.gtk component is
 manually selected in the project. Trying to set the focus back to the
 DrawingArea, DrawingArea1.SetFocus, after modifying the ValueBox.value
 did not help.

 I have attached an archive of a sample project that shows this.

 Also, the sample project contains two methods to clear the DrawingArea,
 because what works for GTK does not work for QT.

 Is this a bug, or am I doing something wrong?


 Thanks for any help,
 Lee



 I saw no problem in the drawing, whatever the GUI component (gb.qt4,
 gb.gtk or gb.gtk3). But I saw that there are bugs in DrawingArea.Clear()
 in all components!

 Regards,


I have found that, on my system, modifying the value of a TextBox also 
causes this behavior. However...

If I use DrawingArea1.Show after modifying a text or value box, the 
drawing does indeed show correctly after the method terminates and 
returns control to the main loop (even though it does not appear to be 
drawing correctly during the procedure itself).

[code]
Public Sub btnDraw_Click()

   'Line 1
   Paint.Begin(DrawingArea1)
   Paint.Brush = Paint.Color(Color.RGB(255, 0, 0))
   Paint.LineWidth = 5
   Paint.MoveTo(10, DrawingArea1.Height / 3)
   Paint.LineTo(DrawingArea1.Width - 10, DrawingArea1.Height / 3)
   Paint.Stroke
   Paint.End
   Debug Drew red line. Sleeping 2.
   Sleep 2

   ValueBox1.Value = Int(Rnd(100, 999))
   '***
   ' The line below makes the drawing show correctly after this
   ' method returns control to main loop.
   '***
   DrawingArea1.Show

   'Line 2
   Paint.Begin(DrawingArea1)
   Paint.Brush = Paint.Color(Color.RGB(0, 0, 255))
   Paint.LineWidth = 5
   Paint.MoveTo(10, DrawingArea1.Height / 3 * 2)
   Paint.LineTo(DrawingArea1.Width - 10, DrawingArea1.Height / 3 * 2)
   Paint.Stroke
   Paint.End
   Debug Drew blue line. Sleeping 2.
   Sleep 2

End
[/code]

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


Re: [Gambas-user] Wow, Gambas is twice as fast as (Free) Pascal

2014-10-10 Thread T Lee Davidson
On 10/10/2014 08:50 PM, Benoît Minisini wrote:

Thank you for trying to explain that to me. But, now I am really confused.

As far as I can tell, the Gambas program also uses floating point 
numbers. The only integers I see used in that program are for an 
iterator, an array index, and an iterator boundary. Everything else is 
declared as a Float.

~~~
Sub Test(X As Float) As Float

   Dim Mu As Float = 10.0
   Dim Pu, Su As Float
   Dim I, J, N As Integer
   Dim aPoly As New Float[100]

   N = 50

   For I = 0 To N - 1
 For J = 0 To 99
   Mu =  (Mu + 2.0) / 2.0
   aPoly[J] = Mu
 Next
 Su = 0.0
 For J = 0 To 99
   Su = X * Su + aPoly[J]
 Next
 Pu += Su
   Next

   Return Pu

End

Dim I as Integer

For I = 1 To 10
   Print Test(0.2)
Next
~~~

What am I missing?

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


[Gambas-user] Paint misbehaves on QT when a ValueBox.value is changed (v3.5.4)

2014-10-09 Thread T Lee Davidson
If a form's ValueBox.value is modified, subsequent Paint'ing on a cached 
DrawingArea of the form doesn't produce the draw when the gb.qt4 
component is loaded. It does work if, instead, the gb.gtk component is 
manually selected in the project. Trying to set the focus back to the 
DrawingArea, DrawingArea1.SetFocus, after modifying the ValueBox.value 
did not help.


I have attached an archive of a sample project that shows this.

Also, the sample project contains two methods to clear the DrawingArea, 
because what works for GTK does not work for QT.


Is this a bug, or am I doing something wrong?


Thanks for any help,
Lee


P.S. System informations reports the Theme as Oxygen no matter what 
desktop theme I have enabled. I have tried the sample project with Air, 
Aya, Oxygen, and QtCurve-Luna.



[System]
Gambas=3.5.4
OperatingSystem=Linux
Kernel=3.10.54-desktop-2.mga3
Architecture=x86
Distribution=Mageia 3
Desktop=KDE4
Theme=Oxygen
Language=en_US.UTF-8
Memory=1005M
[Libraries]
Cairo=libcairo.so.2.11200.12
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.2
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.5.0
GTK+=libgtk-x11-2.0.so.0.2400.17
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.34.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4



DrawingTest-0.0.1.tar.gz
Description: GNU Zip compressed data
--
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://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Paint misbehaves on QT when a ValueBox.value is changed (v3.5.4)

2014-10-09 Thread T Lee Davidson


On 10/09/2014 07:32 PM, Benoît Minisini wrote:
 Le 10/10/2014 00:04, T Lee Davidson a écrit :
 If a form's ValueBox.value is modified, subsequent Paint'ing on a cached
 DrawingArea of the form doesn't produce the draw when the gb.qt4
 component is loaded. It does work if, instead, the gb.gtk component is
 manually selected in the project. Trying to set the focus back to the
 DrawingArea, DrawingArea1.SetFocus, after modifying the ValueBox.value
 did not help.

 I have attached an archive of a sample project that shows this.

 Also, the sample project contains two methods to clear the DrawingArea,
 because what works for GTK does not work for QT.

 Is this a bug, or am I doing something wrong?


 Thanks for any help,
 Lee



 I saw no problem in the drawing, whatever the GUI component (gb.qt4,
 gb.gtk or gb.gtk3). But I saw that there are bugs in DrawingArea.Clear()
 in all components!

 Regards,


Well that's a little disappointing that you weren't able to replicate 
the issue on your system. On mine, the red line is drawn and then when 
it comes time for the blue line to be drawn, the red line disappears as 
if the DrawingArea has been cleared. It's a mystery to me.

But, thank you for looking into it.

Lee

--
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://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Possible bug in IDE

2014-10-08 Thread T Lee Davidson
Confirmed with v3.5.4. Except simply opening another project with 
File-Open_project does not clear the incorrect filters. I have to Quit 
and re-launch Gambas to clear them.


On 10/08/2014 10:53 AM, Willy Raets wrote:
 Try this at home and see what goes wrong.
 Both 3.5.4 and 3.5.90 (rev#6521) show this behaviour.

 1. Open a project in IDE
 2. In project browser
- right click 'Sources'
- select 'New'
- select 'Module'
- Click tab 'Existing'
- 'Gambas modules (*.module) is the correct filter set
 3. Repeat step 2 for Class, Form and Report (if gb.report activated)
 All should be good so far and correct filters should be shown.

 4. In Project browser
- right click 'Data'
- select 'New'
- select 'Image'
- click tab 'Existing'
- 'Gambas modules (*.module) is the WRONG filter set!!
 5. Repeat step 4 for HTML file, Stylesheet, Javascript file and Other
 You see what goes wrong in the filter.
 Somehow the filters of Sources are kept.

 No to make it even odder try this:
 1. Open ANOTHER project in IDE (important)
 2. In Project browser
- right click 'Data'
- select 'New'
- select 'Image'
- click tab 'Existing'
- 'Images files (*.png,*jpg,..) is the correct filter set
 3. Repeat step 4 for HTML file, Stylesheet, Javascript file and Other
 All should be good so far and correct filters should be shown.

 4. In project browser
- right click 'Sources'
- select 'New'
- select 'Module'
- Click tab 'Existing'
- 'Images files (*.png,*jpg,..) is the WRONG filter set!!
 5. Repeat step 2 for Class, Form and Report (if gb.report activated)
 You see what goes wrong in the filter.
 This time the filters of Data are kept.

 So, filters seem to depend on if you first right clicked 'Sources' or
 'Data' in the Project browser.


--
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://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Locating a function's source code?

2014-09-18 Thread T Lee Davidson
Thank you, Benoît, for pointing me to exactly what I was looking for 
this time.


 There are some places to remember:

  - /gb.*: components written in C/C++
  - /comp/src/gb.*: components written in Gambas
  - /app/src/*: Gambas programs such as the IDE, the wiki and the scripter
  - /examples: the example projects available from the IDE
  - /main/gbc: compiler, informer, archiver
  - /main/gbx: interpreter
  - /main/lib: components in C/C++ without dependencies

That is a good general, birds-eye guide.

And it does appear that to do any more than cursory (curiosity) browsing 
of the source code, it makes a whole lot of sense to just checkout a 
local copy of the repository.

Thanks Tobi.


--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Locating a function's source code?

2014-09-18 Thread T Lee Davidson
Thanks, Jussi. It does indeed work perfectly ... once one knows how to 
use it. In my case, I did not understand the column heading, File; in 
that it could also mean a directory of files (in the tree).


On 09/18/2014 04:57 PM, Jussi Lahtinen wrote:
 The Gambas home page (http://gambas.sourceforge.net/en/main.html) has a
 Browse Source Code link, but that page only shows the latest commits.
 And, anything I do there to try to browse the tree, just seems to take
 me around in circles.


 The Browse Source Code feature works perfectly here. Just click on the file
 name, not on the commit number, and you will see the code.
 Here is the code you were looking for, by using the feature:
 http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/main/gbx/gbx_subr_conv.c


 Jussi
 --
 Slashdot TV.  Video for Nerds.  Stuff that Matters.
 http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Locating a function's source code?

2014-09-18 Thread T Lee Davidson
I have registered an account on the Wiki and now need to get a handle on 
the wiki syntax, so

On 09/18/2014 01:57 PM, Tobias Boege wrote:
 Everything you find under /lang in the documentation belongs to the
 language, which means that it's built into the interpreter.


 There are some places to remember:

   - /gb.*: components written in C/C++
   - /comp/src/gb.*: components written in Gambas
   - /app/src/*: Gambas programs such as the IDE, the wiki and the scripter
   - /examples: the example projects available from the IDE
   - /main/gbc: compiler, informer, archiver
   - /main/gbx: interpreter
   - /main/lib: components in C/C++ without dependencies

I think the above information would be good on the How To Deal With 
Subversion Wiki page, right underneath, You can read the repository 
contents from the web at this address: http://sourceforge.net/p/gambas/code;

What do you think? Yes? No?

There is one thing I need clarified, though. I was under the impression 
that Gambas was written in C *only*. Does it also use C++ code?



--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Building /trunk, deprecated documentation

2014-09-17 Thread T Lee Davidson
This again brings up an issue I brought up previously: that every page 
on the old wiki should have that same notice that is on the home page.

THE WIKI IS NOW IN READ-ONLY MODE.
THE NEW WIKI IS NOW HOSTED AT http://gambaswiki.org;

I asked if that could be done, but I don't see it yet. And, I realize 
not everyone has all the time in the world.

Even better yet, though, might be a page specific 301 (Moved 
Permanently) redirect to the new Wiki so that SEs would update their 
links. Could that be done with the old wiki, relatively easily?


On 09/17/2014 04:33 PM, John Leake wrote:
 I used a net se to look for how to build gambas3 trunk from the
 subversion repo which pulled up

 http://www.gambasdoc.org/help/howto/svn?v3#t2

--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] form grab handles

2014-09-16 Thread T Lee Davidson
Create a *new* message instead of simply replying to a message from a 
thread that already exists. Creating a new message will create a new thread.


On 09/16/2014 08:22 PM, John Leake wrote:
 IDE - form design.
 Are the form grab handles supposed to be visible/active when a control
 is clicked ?


 Why not?

 Please start a new thread when you want to talk about another subject!
 Thanks.

 Sorry, I changed the email subject.  What else should I do ?


 --
 Want excitement?
 Manually upgrade your production database.
 When you want reliability, choose Perforce
 Perforce version control. Predictably reliable.
 http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] How to create a new thread

2014-09-16 Thread T Lee Davidson
You're using Thunderbird, right?

In the header section of the message you should see the To field. 
Hovering over that should show gambas-user@lists.sourceforge.net

Right click on that and choose Compose message to

HTH,
Lee


On 09/16/2014 08:36 PM, John Leake wrote:
 Create a *new* message instead of simply replying to a message from a
 thread that already exists. Creating a new message will create a new thread.

 Thank you. I have just elucidated my difficulty with this.
 Where do I create a *new* message ?

 --
 Want excitement?
 Manually upgrade your production database.
 When you want reliability, choose Perforce
 Perforce version control. Predictably reliable.
 http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Responding to a thread

2014-09-16 Thread T Lee Davidson
Not sure, John.

In the header section, I have a Reply and a Reply List button. Using 
either one sends the message to the list address.

There is also Reply to List in the Message menu.


On 09/16/2014 08:32 PM, John Leake wrote:
 Responding to a thread
 ---
 When someone responds to my post and I receive an email why can I not
 just click 'Reply' with out having to go through steps 1 to 5 above ?

 If I click reply the message goes to the personal email address of the
 respondent and not the mailing list !

 Best regards,
 John Leake


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Responding to a thread

2014-09-16 Thread T Lee Davidson

On 09/16/2014 09:16 PM, John Leake wrote:
 Yes, same here.  The hover tool tip shows 'Reply to Sender' for the
 Reply button and the Reply to list button tool tip shows Reply to List
 however both put the list email adr in the To: field when composing a reply.

 I’ve been told off by the boss over this early on but I cannot see the
 difference.

If by, the boss, you mean Benoît, then I don't think you were 
actually, told off. It was probably more like he was merely honoring 
another list user's plea for the preservation of thread integrity.


 So if a message is composed from scratch it will start a new thread
 irrespective from what is in the subject field.

To my knowledge, it is the In reply to field in the message header 
that keeps track of message threading. Whether or not the list 
management software takes into account the subject text, I do not know, 
but I doubt it. Your statement is likely entirely correct.


HTH,
Lee


 On 17/09/14 01:54, T Lee Davidson wrote:
 Not sure, John.

 In the header section, I have a Reply and a Reply List button. Using
 either one sends the message to the list address.

 There is also Reply to List in the Message menu.


 On 09/16/2014 08:32 PM, John Leake wrote:
 Responding to a thread
 ---
 When someone responds to my post and I receive an email why can I not
 just click 'Reply' with out having to go through steps 1 to 5 above ?

 If I click reply the message goes to the personal email address of the
 respondent and not the mailing list !

 Best regards,
 John Leake


 --
 Want excitement?
 Manually upgrade your production database.
 When you want reliability, choose Perforce
 Perforce version control. Predictably reliable.
 http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Want excitement?
 Manually upgrade your production database.
 When you want reliability, choose Perforce
 Perforce version control. Predictably reliable.
 http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] ...And what is planned for Gambas 3.7

2014-09-15 Thread T Lee Davidson
If I recall correctly, this idea has come up before. And, I think it's a 
great idea. Good to hear there is official support for it with a 
project in planning.

I think Randall's suggestion of a web front end is a good idea. That 
would expose the software, and Gambas itself, to a larger audience than 
just those who have the external Search/Download Gambas program installed.


 3) In the IDE, I will add a dialog to upload your project.

Restricting the ability to upload software to within the IDE and, hence, 
only those who have Gambas installed is a good idea. I do marketing, and 
I know there are unscrupulous marketers out there who will abuse any 
site they can just to make a buck. (Note: I do not consider *anyone* on 
this list to be in that category.)


 4) Uploading a project requires:
 - a project screenshot (optional).

Maybe multiple screenshots optional? Eventually?

 - tags. Some tags will be automatic (for example the component used by
 the project), some will be predefined.

I also think software should be categorized especially if a web front 
end is implemented. But, perhaps predefined tags would cover that.


 I want to start with something as simple as possible first...

What you have proposed, Benoît, does not sound very simple ;-) Very 
cool, yes! But not simple.

And in the interest of simple-at-first, I would like to add to a 
*future* wishlist:

12) A feedback/support venue similar in concept to what is provided on 
wordpress.org for themes and plugins. This would quite likely require 
the implementation of a web front-end, but maybe not.


I think this is exciting! You will let us know how we can help, won't 
you, Benoît?


Lee


On 09/15/2014 08:03 PM, Benoît Minisini wrote:
 Hi again,

 For the next version, I'd like to implement a Gambas dedicated software
 repository.

 Here are my current thoughts about it, and I'd like to hear comments and
 ideas from you. I want to start with something as simple as possible
 first...

 1) The Gambas repository is an http web service, but without website at
 the moment. It will allow to:
 - upload software.
 - search for software.
 - download software.

 2) A software is a compiled Gambas project, with eventually the source
 project. Nothing more.

 3) In the IDE, I will add a dialog to upload your project.

 4) Uploading a project requires:
 - a login and a password, so you should be able to create an account
 from the IDE.
 - a project name.
 - a project description.
 - a project icon.
 - a project screenshot (optional).
 - a project major version.
 - tags. Some tags will be automatic (for example the component used by
 the project), some will be predefined.
 - a project control sum (MD5/SHA...).

 5) I will made an external Gambas program to:
 - Search for projects inside the repository.
 - Download and install a project somewhere in the user home directory.

 6) That program should be able to know how to install the needed gambas
 binary packages according to the system distribution. If it is not
 possible, it should at least warn the user about missing components.

 7) A Gambas program may depend on other programs in the repository. That
 way libraries will be able to be put in the repository too.

 8) Gambas examples will be moved from the source tree to the repository.

 9) The repository will be able to include the same program in different
 X.Y versions.

 10) The web service protocol will be documented, and the server will be
 a GPL Gambas project, so that anybody can bring up its own repository if
 needed.

 11) Consequently, we should be able to define different source
 repositories (like Ubuntu ppas) for downloading, and different targets
 for publishing.

 Now just tell me what you think about that.


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.db.form: Program hangs after erasing content in a DataControl and clicking into a DataBrowser

2014-09-11 Thread T Lee Davidson
I get the same behavior: application hangs (with mysqld taking about 
20-40% of CPU and gbx3 taking about 7-16%).

Upon relaunch of the app, the db table does indeed appear to have been 
updated.


On 09/11/2014 01:57 PM, Tobias Boege wrote:
 Hi,

 attached is a project which shows odd behaviour. At first glance, the source
 code seems OK to me, so it might be a bug.

 It needs:
   - MySQL running, a user named test without password but with the ability
 to create a database.table Kontakte.kontakte.

 To reproduce:
   - (If you start the application without the above-mentioned table, it will
  automatically be created and filled with sample data.)
   - Select a record,
   - Go to the DataControl for the Vorname field and delete its contents,
   - Click anywhere into the DataBrowser,
   - Application hangs.

 Regards,
 Tobi



 --
 Want excitement?
 Manually upgrade your production database.
 When you want reliability, choose Perforce
 Perforce version control. Predictably reliable.
 http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk



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


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Editing shortcut keys and valueboxes

2014-08-31 Thread T Lee Davidson
Hi,

I am wondering ... is it by design that the edit shortcut keys (Ctrl-x, 
Ctrl-c, and Ctrl-v) do not work with ValueBoxes whereas the editing 
options in the right-click menu (at least for the number type) do?

The other value types have copy  paste issues even with the right-click 
menu as any selection is undone when the right-click occurs.


Lee
(Gambas v3.5.4)

--
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] Bug: Mageia packages made by IDE do not install application icon in distro menu

2014-08-31 Thread T Lee Davidson
I have attached a simple application package that properly installs the 
icon to /usr/share/icons and also properly displays the icon in the menu 
entry.


On a side note: This project is related to a message I just recently 
sent to the list about the editing shortcut keys and valueboxes. I am 
unsure if that message made it to the list.



Lee


On 08/31/2014 08:10 AM, Benoît Minisini wrote:

Is it possible to have:

- The package you tried to install and that failed.

- A mageia package that installs one application with its icons and that
works.

Thanks!

-- Benoît Minisini


editshortcuts-0.0.1-1mga.noarch.rpm
Description: application/rpm
--
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


<    1   2   3   >