Re: [Gambas-user] Problems on mail list

2014-12-27 Thread B Bruen
On Sat, 27 Dec 2014 18:37:05 +0100
Benoît Minisini  wrote:

> Le 27/12/2014 13:44, Gian a écrit :
> > This morning I received the email sent on 25 by Wolfgang.
> > My answer of 11:29 today 27 not appears.
> > What happens to the mail list?
> > Hello
> > Gianluigi
> >
> 
> The mailing-list is managed by the Sourceforge servers, and we can't do 
> anything if something goes wrong, except praying.
> 
> -- 
> Benoît Minisini
> 

Hail Mary full of grace,
Deliver us from this terrible place,
There is no mail, there is no news
And no-one solves my Gambas blues.

We keep the faith, we hold the light,
Please get us out of this terrible plight.
My events don't fire, my handlers fold
silently, no errors told.

We hold the 'Forge in reverence
and look each hour in expectation
of clues, and even Tobi's sense
but yet there seems to be stagnation.

Mary, we do implore
that you knock upon their door,
kick their a*s*, make them move
and hopefully then things improve.

Amen

(apologies  but I was on a roll)

Looking forward to Gambas2015  !!! :_)

Bruce

-- 
B Bruen 

--
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 B Bruen
On Wed, 24 Dec 2014 11:57:11 -0500
T Lee Davidson  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
-- 
B Bruen 


TableviewExample-0.0.1.tar.gz
Description: Binary 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] how to capture click event on a popup menu.

2014-12-02 Thread B Bruen
On Tue, 2 Dec 2014 20:35:01 -0500
"Martin McGlensey"  wrote:

> Thanks for the responses. Remember I'm still climbing that steep learning
> curve. The sub to catch the click event is Public Sub mnuAdvanced_Click()
> but that does not catch the event. I do not know how declare or find the
> event name. The menu was created in the form menu editor, so how do I define
> an event name?
> 
>  
> 
> Thanks,
> 
> Marty
> 

OK, try studying the attached project.  It has a displayed and a hidden menu 
that is attached to a textbox.
If it doesn't enlighten then we'd better go back to Tobi's "send the project" 
suggestion.

hth
Bruce




demoMenus-0.0.1.tar.gz
Description: Binary 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=164703151&iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Class.Symbols - local, inherited, overridden ???? Bah!

2014-12-02 Thread B Bruen
I am trying to work out whether a .Symbol as returned by Class.Symbols (or more 
correctly Classes["someclass"].["somesymbolname"]) is local, inherited or 
overridden.
(Don't ask, "Why?".)

In my naive days back in Gambas 2 I had the following routine that seemed to go 
a far way there:
Public Sub btnCopyOwnProps_Click()

  Dim sList As New String[]
  Dim symName As String

  For Each symName In $currControl.Symbols
If $currControl[symName].kind = Class.Property Then
  Try IsNull($currParent[symName])
  If Error Then
sList.Add(MakeProp(symName))
  Endif
Endif
  Next
  sList.Sort
  Clipboard.Copy(sList.Join("\n"))

End

This was, as far as I can recall, supposed to copy the names of property 
symbols declared in the subject $currControl class onto the clipboard that are 
not declared in the $currControl's parent class($currParent), i.e. they are 
local properties.  This still appears to work for detecting whether a property 
is local or inherited.  However, what is driving me mad is trying to detect 
whether the current class actually overrides the inherited property..

Is there any way to detect this? The IDE help browser "seems" to do so somehow, 
but I think it is doing it some other way.



(If you r e a l l y want to know why, it's for a custom control code 
generator.  ... ... ... I didn't think so...)

tia
Bruce

-- 
B Bruen 

--
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=164703151&iu=/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 capture click event on a popup menu.

2014-12-02 Thread B Bruen
On Tue, 2 Dec 2014 22:44:04 +0100
Tobias Boege  wrote:

> On Tue, 02 Dec 2014, Martin McGlensey wrote:
> > Hello,
> > 
> >  
> > 
> > I've used the menu to create menus on my main form. Those that I want to see
> > on the tool bar are marked visible. Those that I want to use as popups are
> > not visible on the tool bar. These two menus are attached to individual text
> > boxes in the graphic form designer. When I right click on the textbox the
> > popup appears but, when I click on it nothing happens. In the form code I
> > have the sub:
> > 
> >  
> > 
> > Private Sub mnuA_Click()
> > 
> > FForm.Open
> > 
> > End
> > 
> >  
> > 
> > The form FForm does not open. In the debugger I can see the click event is
> > not captured. What did I miss?
> > 
> 
> Well, what's the event name of your menu?
> 
> Or if you don't want us to guess around: Can you send the project?
> 
> Regards,
> Tobi
> 

I can guess :-)

PUBLIC Sub mnuA_Click()

regards
Bruce

--
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=164703151&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] IDE silent crash with Connections

2014-12-01 Thread B Bruen
It seems that if the underlying sqlite database file for a defined connection 
has been deleted then when you click on the IDE Connections entry for that 
database the IDE will silently crash.

Create an sqlite datdbase.
Create a connection for it in the IDE.
Delete the database file.
Double click on the Connections entry for it.
Poof! IDE gone.

Not confirmed against native IDE, but certainly happens here.

regards
Bruce

-- 
B Bruen 

--
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=157005751&iu=/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 B Bruen
On Mon, 1 Dec 2014 20:30:19 -0300
Sebastian Kulesz  wrote:

> Would it be okay to include this component inside the gambas3-runtime
> package or should I create a new one for it?
> 
> 
Not sure what you are talking about?

B

-- 
B Bruen 

--
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=157005751&iu=/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 B Bruen
On Mon, 01 Dec 2014 14:48:59 +0100
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.
> 
> For example:
> 
> - Creating a directory and all its parent.
> 
> - Removing accents from an UTF-8 string.
> 
> - A CsvFile class to read CSV files easily.
> 
> - Removing a directory recursively.
> 
> - Moving a file or a directory, whether source and destination are on 
> the same device or not.
> 
> ...
> 
> If you have ideas, just drop them. And better, uf you have code, and are 
> agree to share it, modify it, maintain it, you are welcome!
> 
> 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...
> 
> I'm waiting for your comments!
> 
> P.S. The gambas fram client is more and more polished. Don't hesitate to 
> play with it. The more tests, the sooner it will be released. I want to 
> release Gambas 3.7 as soon as it is ready, even if there is not a lot of 
> other changes in Gambas.
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
Attached our GenUtil module source, use what you like.

My "favorites" are DateUtil.StrToDate and StrUtil.Proper and StrUtil.NormName

regads
Bruce

-- 
B Bruen 


genutil-0.0.52.tar.gz
Description: Binary 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=157005751&iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A good idea? Revisited again.

2014-11-29 Thread B Bruen
Woops, I chopped off the notes.

Notes
1] This concept can also provide with minimal effort your own industry specific 
virtual menu items. For example, say your system has a EditCustomer form that 
you want to be able to access from mulitple other forms in your system.  By 
wrapping that form in a "virtual menu" project, which takes but a few minutes, 
you can create a virtual custom control for the form.

2] The helpset development utility is buggy and there is a problem with 
relative paths that I haven't got around yet (complex situation where the 
target helpset file is in a "middle level" component, i.e. application project 
uses vhelp component and another vmenu component, say a search utility which 
also uses vhelp. I cannot solve how to extract the target help set file from 
the middle component ...

3] alpha only

4] This is an interesting thing, I have a patch/hack for the IDE that lets us 
run the custom control configuration editor.  It is a fairly simple change to 
FProperty.class around line 774:
--- FProperty.class(revision 6688) 
+++ FProperty.class(working copy) 
@@ -774,8 +774,15 @@
 
 Case Else 'object
 
-  hEditor = cmbProperty 
-  InitComboWith($hForm.FindControlFromType($sType).Sort(gb.Natural + 
gb.IgnoreCase), "(" & ("None") & ")") 
+  If $hObject.Unknown Then 
+If Project.Sources.Exist("FEditConfig.form") Then 
+  Project.Run(False, -1, "FEditConfig") 
+  Return  
+Endif 
+  Else 
+hEditor = cmbProperty 
+InitComboWith($hForm.FindControlFromType($sType).Sort(gb.Natural + 
gb.IgnoreCase), "(" & ("None") & ")") 
+  Endif 
 
   End Select
 
It looks for a specifically named form in the current project and if found then 
runs that form.  The configuration must be self contained, i.e. in this case we 
write an "options" text file into the source project directory. It cannot send 
any information back to the IDE.  Not entirely satisfactory but it does provide 
some sort of proof that it may be possible to enhance the IDE properties editor 
through external code.

regards
Bruce
-- 
B Bruen 

--
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=157005751&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A good idea? Revisited again.

2014-11-29 Thread B Bruen
So far, and ignoring our own "industry specific" (see Note 1) virtual menu 
items, I have produced the following general popup forms as virtual menu items 
(custom controls):

* Help|About Me : 
A virtual custom control that implements a "standard" popup form 
showing information about the current application extracted from the Gambas 
executable archive.

* Help|System Information : 
A virtual custom control that implements a "standard" popup showing 
information about the current OS, Gambas and application environment.

* Help|Browse Help : 
A virtual custom control that provides an application level help 
browser similar to the IDE help browser. This is supported by a help system 
development utility. However it has some limitations as explained in Note 2 
below.

* File|Recent : (This one I am very happy with :-) ). 
A completely self contained implementation of the "Recent Files" 
concept.

 *File|* : 
This one is a bit weird, it creates a "standard" File menu item at the 
top level and most (well OK "some") of the standard things one would expect in 
the "File" menu of a normal user application. See Note 3.

*Tools|Options : (On the one hand I'm very happy with this, on the other...)
A virtual custom control that implements a program options menu item 
under Tools and a popup form "similar" to the IDE Tools|Preferences menu item.  
It creates the entire popup form on the fly from a definition file (let's call 
it .options) within the executable archive.   
The "other hand" is this.  I have hacked the IDE form designer code a bit and 
can now edit that definition file from within the IDE.  That is, the virtual 
control component has a form that let's the programmer create/modify the 
definition file. The IDE hack responds to a button click on the "Options" 
property, shows the editor (which is somewhat similar to the Menu editor) and 
allows the programmer to  set up the Tools|Options for the project without a 
single line of code.  I am not really very happy with the way the hack works 
(Note 4) but it does appear to work.

What's the point of all this?
--
These custom controls provide self contained functionality that implement a 
menu item in a form menu by simply dragging the control from the toolbox onto 
the form. Little or no coding is needed in the form class to manage that 
functionality. For developers who support multiple projects and would like to 
have the same functionality, with the same appearance, shortcut key etc etc 
across multiple forms this approach makes implementing that "standard-ness" 
very easy.

I would like to know whether there is any interest in this stuff. We are quite 
prepared to publish them on the Gambas farm if there is such interest (they are 
"programming tools" if you like and thus have no commercial value to us.)

regards
Bruce
 


-- 
B Bruen 

--
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=157005751&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] New behaviour for the Split() instruction

2014-11-29 Thread B Bruen
On Sat, 29 Nov 2014 22:22:23 +0100
Tobias Boege  wrote:

> On Sat, 29 Nov 2014, Beno??t Minisini wrote:
> > I'm currently a new behaviour for the Split() instruction, that is 
> > normally backward-compatible.
> > 
> > Split("abcd",";","\\;")
> > 
> > splits the "abcd" string with the ";" character, and uses the backslash 
> > character for escaping it.
> > 
> > This behaviour is enabled when the escape string (the third argument) 
> > has two characters, and its second character is the same as the first 
> > splitting character (the second argument). Then the first character of 
> > the escape string is the escape character (usually a backslash).
> > 
> > What do you think about that?
> > 
> 
> I have not found any use of a two-character escape string in my collective
> projects. Therefore, no objection. (Although I don't really understand what
> the change means. Do you have an example of what Split() gives before and
> after your change, in a case where they're different?)
> 
> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
> 

Yes, I would like to see an example of before and after as well.

I think I had a need for exactly this the other day. I wanted to split a comma 
delimited list except where the comma is immediately followed by a space. Will 
this change help that?

regards
Bruce

-- 
B Bruen 

--
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=157005751&iu=/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 B Bruen
On Wed, 26 Nov 2014 22:05:26 +0100
Fabien Bodard  wrote:

> 2014-11-26 19:12 GMT+01:00 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. :-)
> 
> 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.
> 

Which is certainly the way we intend to use it.

One thought, if the download part was managed using ftp rather than http then 
the "private" downloading could possibly be handled via the ftp server security 
features without much internal effort? I believe, but haven't tried it, that 
the ftpClient has the means to pass the necessary credentials on a Get.
(Note: I mean the actual retrieval part only, not the whole farm concept.)

regards
Bruce

-- 
B Bruen 

--
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=157005751&iu=/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 B Bruen
gt; 
> - A *.desktop file is created and installed in 
> '~/.local/share/applications' so that it appears in the desktop menu.

I think this should only happen if the project is a "Normal".

> 
> Waiting for your comments!

 You got em.

> 
> -- 
> Benoît Minisini
> 

Most of the above is based on my intent to use our own farm server, which I 
wont use until this whole thing works fully. But as I said, it is looking good. 

best regards
Bruce

-- 
B Bruen 

--
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=157005751&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] IDE enhancement request - "Run that form"

2014-11-24 Thread B Bruen
The "Run that form" button on the form editor toolbar is so handy I'd like to 
request that it also be included in the project tree popup menu (when the item 
selected is a form obviously).

And to really go out on a limb, could the popup menu for a selected module have 
a "Run that module" entry that would invoke the module if it has a "Main" 
method"

tia
Bruce

-- 
B Bruen 

--
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=157005751&iu=/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 #6666 (!)

2014-11-23 Thread B Bruen
On Sun, 23 Nov 2014 03:30:28 +0100
Benoît Minisini  wrote:

> Hi,
> 
> It's late there, but I wanted to make that available as soon as possible 
> so that people can see it and comment, even if it is not finished at 
> all. (It's for the revision number too...)
> 
> I added a new button in the IDE welcome dialog that opens the "Gambas 
> Software Farm" dialog.
> 
> At the moment, it allows to browse the content of a Gambas farm. By 
> default, it should points at 'http://gambaswiki.org' for testing.
> 
> Voting for a software and installing a software is not done yet.
> 
> I have registered the 'gambasfarm.org' website, so that it become the 
> official Gambas Software Repository in the future.
> 
> At the moment, registering to a farm is possible from the IDE option 
> dialog only. And publishing is done from the 'Publish...' menu entry.
> 
> Waiting for the comments now...
> 
> -- 
> Benoît Minisini

Deleting a tag by clicking on the red cross fails. See pic.


-- 
B Bruen 
--
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=157005751&iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Re-ordering menus

2014-11-19 Thread B Bruen
On Thu, 20 Nov 2014 00:26:07 +0100
Benoît Minisini  wrote:

> Le 20/11/2014 00:22, B Bruen a écrit :
> > Probably a silly question, but I'm just having a little think.
> >
> > Is there any way to programatically (i.e. dynamically) change the order in 
> > which a menu item appears in a drop down menu?
> >
> > regards
> > Bruce
> >
> 
> Alas no, the toolkits do not allow that easily. You have to recreate the 
> menu from scratch in order.
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

Damn!  (It was a nice little "think".)

It came about from a comment from Felicity, our gui design expert, who said 
"How come we let the users configure the toolbars to their own satisfaction but 
they can't do it with menus?"  and several other things including "How about a 
user "Favorites" menu then?" etc etc.

Oh well, never mind.

regards
Bruce

-- 
B Bruen 

--
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=157005751&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Re-ordering menus

2014-11-19 Thread B Bruen
Probably a silly question, but I'm just having a little think.

Is there any way to programatically (i.e. dynamically) change the order in 
which a menu item appears in a drop down menu?

regards
Bruce

-- 
B Bruen 

--
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=157005751&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Events in local classes dont show up in the help

2014-11-17 Thread B Bruen
Looking at the help for a class in the current project it seems that any events 
declared do not appear in the help for that class.
e.g.
' Gambas class file

''' A test for event inline help in local classes

Event Test() '' A simple event

Public Sub _new()

End

All that appears in the help browser is as attached.

-- 
B Bruen 
--
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=157005751&iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Bug with IDE detach Tab

2014-11-17 Thread B Bruen
On Mon, 17 Nov 2014 18:40:04 +0100
Benoît Minisini  wrote:

> Le 16/11/2014 03:42, B Bruen a écrit :
> >
> > If an IDE tab is detached and then reattached then if there are lines in 
> > the file to wide to display there is no scroll bar.
> >
> > I'd raise an error report but I have mucked up my login credentials.
> >
> > regards
> > Bruce
> >
> 
> I don't have this problem. Please send a project that has that error, 
> and tell me what to do to reproduce it.
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
> 
Hmm. I updated to rev 6652 yesterday and now the problem has gone away.
The prior version was one of the interim revs from the 6.5.2 pre-release.
Sorry about the noise.
Bruce

-- 
B Bruen 

--
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=157005751&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Bug with IDE detach Tab

2014-11-15 Thread B Bruen

If an IDE tab is detached and then reattached then if there are lines in the 
file to wide to display there is no scroll bar.

I'd raise an error report but I have mucked up my login credentials.

regards
Bruce

-- 
B Bruen 

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


Re: [Gambas-user] Snippets bug

2014-11-12 Thread B Bruen
On Wed, 12 Nov 2014 22:40:38 +0100
Jørn Erik Mørne  wrote:

> Hi!
> 
> I have these two snippets:
> 
> prb
> Private $b${1:VariableName} as Boolean
> prc
> Private $c${1:VariableName} as Collection
> 
> The first, prb, works as expected. But with the prb the initial c gets 
> selected in addition to VariableName.
> 
> -- 
> Kind regards
> 

Interesting but weird. The expansion macro works fine if the trigger string is 
something else, e.g.
prf
Private $c${1:VariableName} as Collection

then on the other hand if it is "prc" then I get a different expansion result 
from you. (It indents the line and leaves the cursor just before the P in 
Private). What is even stranger is that if I change the expansion string to 
something else for "prc" then I get a different result, for example
prc
Public $c${1:VariableName} as Collection
then in using the tab key everything from the "V" in VariableName is selected

But at the end-of-the-day, I'd suggest you use different trigger strings, I 
have tried 
vc
Private $c${1:VariableName} as Collection
vb
Private $b${1:VariableName} as Boolean
vi
Private $i${1:VariableName} as Integer
vx
Private $h${1:VariableName} as Object
vv
Private $v${1:VariableName} as Variant

and they all behave as you would expect.

hth
Bruce

-- 
B Bruen 

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


[Gambas-user] Possible sqlite3 component error

2014-11-12 Thread B Bruen
The following query is a "standard" CTE based query to return the contents of a 
hierarchical table (i.e. columns are id, parentid, data):
WITH RECURSIVE tmp AS ( 
  SELECT *, 0 AS depth 
  FROM pages p 
  WHERE p.parent = 0 
 UNION ALL 
  SELECT p.*, tmp.depth + 1 
  FROM pages p 
JOIN tmp ON (p.parent=tmp.id)
) 
SELECT id, title, parent, category, indexed, htmlsrc, depth 
FROM tmp 
ORDER BY depth;

I use the following method in Gambas:
Private Sub LoadTOC() '' Build the 
index tree

  Dim rslt As Result
  Dim pnode As String
  Dim sQry As String = "WITH RECURSIVE tmp AS ( SELECT *, 0 AS depth FROM pages 
p WHERE p.parent = 0 UNION ALL SELECT p.*, tmp.depth + 1 FROM pages p JOIN tmp 
ON (p.parent=tmp.id)) SELECT id, title, parent, category, indexed, htmlsrc, 
depth FROM tmp ORDER BY depth"

  tvwIndex.Clear

db.Debug = True
  rslt = $conn.Exec(sQry) 'Find("pages")
db.Debug = False

  For Each rslt
pnode = rslt!parent
If Not pnode Then Continue
If Not rslt!indexed Then Continue
tvwIndex.Add(rslt!id, rslt!title,, IIf(pnode = 0, "", pnode))
  Next
  
  tvwIndex["1"].Expanded = True
  tvwIndex["1"].Text = "Index"
  tvwIndex["1"].Picture = Picture["icon:/32/book"]

Catch
Error Subst("&1\nERR: &2 (&3)\n&4\n&1\n", String$(40, "-"), Error.Text, 
Error.Code, Error.Backtrace.Join("\n"))
Error db.Error
Stop

End

When this is executed it fails at the rslt=$conn.Exec line with 
ERR: Query failed: SQL error or missing database (-1)
and db.Error is "1"
the $conn connection is valid and is open.

Similarly when I try to execute that query in the connection browser in the IDE 
I get the same error.

However, when I run the same query in the sqlite3 cli tool it works faultlessly.

The output produced by the db.debug is:
sqlite3: 0x8551560: WITH RECURSIVE tmp AS ( SELECT *, 0 AS depth FROM pages p 
WHERE p.parent = 0 UNION ALL SELECT p.*, tmp.depth + 1 FROM pages p JOIN tmp ON 
(p.parent=tmp.id)) SELECT id, title, parent, category, indexed, htmlsrc, depth 
FROM tmp ORDER BY d
epth

apart from the line break in the ORDER BY clause (which I dont think is the 
problem) I cannot see any corruption of the query string.

I am not sure but have a suspicion that this has arisen after the recent 
changes for db collations etc.

regards
Bruce
-- 
B Bruen 

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


Re: [Gambas-user] [Gambas-devel-svn] SF.net SVN: gambas:[6632] gambas/trunk/app/src/gambas-wiki

2014-11-11 Thread B Bruen
On Tue, 11 Nov 2014 23:22:50 +0100
Benoît Minisini  wrote:

> Le 11/11/2014 23:01, B Bruen a écrit :
> >
> > Yes, it is a nice look.
> >
> > Two comments though:
> > 1) the doc/richtext page doesn't look quite right.
> 
> What do you mean?
How very strange? 20 minutes later and it now looks correct. (The second and 
third lines of the allowed markups list was a different font size.) 
> 
> > 2) code examples are a bit too hard to read at the smaller font size used.
> 
> AFAIK I don't define any absolute font size, so you are seeing the font 
> size defined in your browser.
Aha! I didn't know that some firefox update had set the default font sizes to 
something smaller than "useful". Thanks for that, it has improved a lot of 
sites.

> 
> -- 
> Benoît Minisini
> 

regards
Bruce

-- 
B Bruen 

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


Re: [Gambas-user] [Gambas-devel-svn] SF.net SVN: gambas:[6632] gambas/trunk/app/src/gambas-wiki

2014-11-11 Thread B Bruen
On Tue, 11 Nov 2014 16:52:13 +0100
Tobias Boege  wrote:

> On Tue, 11 Nov 2014, gam...@users.sourceforge.net wrote:
> > Revision: 6632
> >   http://sourceforge.net/p/gambas/code/6632
> > Author:   gambas
> > Date: 2014-11-11 01:51:23 + (Tue, 11 Nov 2014)
> > Log Message:
> > ---
> > [WIKI CGI SCRIPT]
> > * NEW: New look for the documentation wiki.
> > 
> 
> Holy cow, this _is_ new! The more tabular layout on the main page
> (gambaswiki.org/wiki) is really nice. There was once such a tabular
> layout in the language index page. Do you want to also put that back
> in place? I liked the multiple columns better than the single column
> we current have there (looks a bit loveless).
> 
> Also the inherited symbols from a class are now more easily distinguishable
> from the non-inherited ones, IMHO, which is a plus. If you ask me, the
> underlining could even be a bit darker.
> 
> I like the softer font colours. The only thing I miss is the presence
> of the orange colour here and there but I'll get used to it :-)
> 
> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk


Yes, it is a nice look.

Two comments though:
1) the doc/richtext page doesn't look quite right.
2) code examples are a bit too hard to read at the smaller font size used.

regards
Bruce


-- 
B Bruen 

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


[Gambas-user] SwitchButton keyboard actions

2014-11-10 Thread B Bruen
It appears that there is no way to change a SwitchButton value using the 
keyboard?

Comments? 

regards
-- 
B Bruen 

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


Re: [Gambas-user] Resolve error compiling Gambas 3.6.x . gb.pdf -> File: PDFDoc.h not found

2014-11-08 Thread B Bruen
On Sun, 9 Nov 2014 07:02:02 +0100
"ePost"  wrote:

> Hello Gambas users,
> 
> How to resolve error compiling Gambas 3.6.x . gb.pdf -> File: PDFDoc.h not
> found.
> 
> Just install package: libpoppler-private-dev.
> This package is only included if compiling Gambas 3 (version <= 3.4.2)
> Please add this package to compiling Gambas 3 (version >= 3.6 or /trunk
> version)
> (http://gambas.sourceforge.net/en/main.html)
> 
> I checked out from /trunk and now I have Gambas 3.6.90.?
> Regarding to my postings before: I solved my problems myself.
> 
> I am senior software developer and I am working with VB in Microsoft Visual
> Studio.
> What I most miss is, that the value of the variable is not displayed
> (Tooltip) in debug mode when the mouse cursor is over it.
> 
> Best regards
> SIMON KELLNER
> 
> 
> SIMON,
This is very confusing post.
1) "How to resolve error compiling Gambas 3.6.x . gb.pdf -> File: PDFDoc.h not
> found." 
a) What exactly were you trying to compile? As far as I know there is no such 
file as "Gambas 3.6.xgb.pdf" let alone some reference to 
some C header file that given the mixed case no one in the galaxy knows what 
the heck you are talking about.
b) Just what the (excuse the Australian slang here) "ducking hell" does "I am 
senior software developer and I am working with VB in Microsoft Visual Studio". 
have anything to do with prawns?
Please try and rephrase your post in something that makes the least bit of 
sense to this audience.
Calm down and ask a sensible question.
 
B Bruen 

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


[Gambas-user] Silly IDE problem

2014-11-08 Thread B Bruen
I have a DateBox with Group="data" and a "data_Change() method:
  Public Sub data_Change()

$dirty = True
btnExit.Text = "&Save"

  End

I set a breakpoint on the End statement.

When running in the IDE, and the datebox calendar is shown execution stops on 
the End statement but I cannot enter anything in the Watch tab, nor can I 
resize any existing debug window. Further the calendar popup now appears on all 
desktops and is "modal" in the sense that I cannot ... enter text into this 
post for example.


Confirm? Bug? Feature? 
Desktop=LXDE

Bruce
-- 
B Bruen 

--
___
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-06 Thread B Bruen
On Thu, 6 Nov 2014 16:04:33 -0500
"Martin McGlensey"  wrote:

> Hello,
(snipo)

> Now further down in a sub login.Filter = "User = " & txtLogin.Text, where
> txtLogin.Text = "Marty",  I get "query failed, unknown column 'Marty' in
> where clause"
> 
The error ypu are reciving is correct. You need to delimit the string in the 
filter:
login.Filter = db.Subst("User = &1", txtLogin.Text)
otherwise your filter string will look like "User = Marty".

gb.db.Subst will wrap the Marty string in the proper delimiters for the 
database being used eg for postgresql the filter would result in:
"User = $$Marty$$".


hth
Bruce

-- 
B Bruen 

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


Re: [Gambas-user] Conflict discovered in file....

2014-10-30 Thread B Bruen
On Thu, 30 Oct 2014 23:41:09 +0100
Benoît Minisini  wrote:

> Le 30/10/2014 23:20, Tobias Boege a écrit :
> > On Thu, 30 Oct 2014, Ru Vuott wrote:
> >> Hello,
> >>
> >> updating Gambas with  rev. #6593, I have this message:
> >>
> >>
> >> Conflict discovered in file 'trunk/comp/src/gb.eval.highlight/.startup'.
> >> Select: (p) postpone, (df) show diff, (e) edit file, (m) merge,
> >>  (mc) my side of conflict, (tc) their side of conflict,
> >>  (s) show all options: s
> >>
> >>
> >> What choose do you suggest ?
> >>
> >
> > I'm not a svn expert but if you didn't change the file, you should be fine
> > with "tc".
> >
> > In any case, it shouldn't matter because .startup is a generated file,
> > created by the compiler. It carries no new information and you can just go
> > and regenerate it. This begs the question why it is versioned in the first
> > place...
> >
> > Regards,
> > Tobi
> >
> 
> It's a bug, that file should not be in the repository. I will fix that...
> 
> -- 
> Benoît Minisini
> 
> ------
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

The .startup file is in quite a few of the components...
-- 
B Bruen 

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


[Gambas-user] A real big enhancement request

2014-10-30 Thread B Bruen
This request is based on some of the stuff we do and also on quite a few other 
threads over the past while.

It seems that quite a few advanced Gambas users would like/need to access files 
in the executable archives for various reasons.  This includes Kevin, who wants 
to include static music files (?); ourselves, who want to access sqlite 
database(in read only mode, of course) and another the details I can't recall.  
Another example, (specifically for us) is accessing the Gambas files, for 
example .project and .info and etc.

While accessing images and text files in the executable archive using relative 
pathing is quite good the above examples are a bit of a PITA involving shelling 
"gba -x commands" and/or pipes etc.

My request, Benoît, is that you consider something that would make using files 
in the executable archive, both the data files and the Gambas infrastructure 
files a bit easier

best regards
Bruce
-- 
B Bruen 

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


[Gambas-user] A sad event

2014-10-16 Thread B Bruen
Dear Gambas friends,

My apologies for writing this, but I just have to "get it off my chest".

We at Paddys-Hill have been deeply shocked this week by the tragic death of a 
young 19 year old jockey due to injuries received after a fall in a local race. 
 

http://www.abc.net.au/news/2014-10-16/jockey-killed-after-fall-at-murray-bridge-race/5817266

Although not associated with paddys-hill, Caitlin Forrest was a known and well 
respected young rider to our small community of customers.   Further, Caitlin 
was a child of this small town where we are located. The local township 
community and the local thoroughbred racing community have been shaken to the 
core by  this event.

Again my apologies for having troubled you with this.

regards
Bruce

-- 
B Bruen 

--
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] (Custom) virtual controls

2014-10-11 Thread B Bruen
On Sun, 12 Oct 2014 01:45:26 +0200
Benoît Minisini  wrote:

> Le 12/10/2014 00:52, B Bruen a écrit :
> > A couple of oddities have emerged from my work in the "A Good Idea?"
> > thread:
> >
> > 1) the _IsVirtual constant - this appears now to be a function? Is
> > the help documentation correct or is this constant/function something
> > I am not understanding?
> 
> _IsVirtual is a constant boolean. Where do you see it is a function?
In the Form_Open() for the application form Print VSysInfos._IsVirtual
outputs
(Function vSysInfos:12)

For what it's worth line 12 of the vSysInfos class is a comment
' Public Const _Properties As String = "*"

QT4?

> 
> >
> > 2) a bit more complex - I have an ancestral class, VMenuItem, that
> > exposes some properties. In the popup wrapper class that inherits
> > VMenuItem I set the values of these properties in the constructor.
> > When I drag the popup virtual control onto a form in the IDE these
> > properties show on the control properties panel, but the values are
> > not shown.  Any clues?
> >
> > regards Bruce
> >
> 
> Putting a custom control on a from in the IDE has nothing to do with 
> instanciating it at runtime.
> 
> In other words, you must tell the default values of your properties 
> (i.e. the value they have once your control is instanciated) in the 
> _Properties constant, otherwise you won't see them. No magic there!
> 
> This is normally explained in the wiki.
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
Ah, rats.  I see now why this doesn't work. Dammit.

I don't suppose I could use a Subst() in the constant declaration could I. 
(Just joking.)

regards
Bruce
-- 
B Bruen 

--
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] (Custom) virtual controls

2014-10-11 Thread B Bruen
A couple of oddities have emerged from my work in the "A Good Idea?" thread:

1) the _IsVirtual constant - this appears now to be a function? Is the help 
documentation correct or is this constant/function something I am not 
understanding?

2) a bit more complex - I have an ancestral class, VMenuItem, that exposes some 
properties. In the popup wrapper class that inherits VMenuItem I set the values 
of these properties in the constructor. When I drag the popup virtual control 
onto a form in the IDE these properties show on the control properties panel, 
but the values are not shown.  Any clues?

regards
Bruce
-- 
B Bruen 

--
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] A good idea?

2014-10-11 Thread B Bruen
Just an update.

This works really well.  Thanks Tobi for help in crystallising where I was 
trying to go with this.
So far (I am only working on this part-time - it's a non-income earner but it 
will save so much time and effort in the future) I have a robust solution for 
fully-autonomous pop-ups (ones that are fully independent of the application 
project e.g. "System Information") and quasi-autonomous popups (ones that get 
information on the application project out of the executable archive e.g. 
"About Me"). Converting our existing popup components into virtual menu items 
now takes only a few minutes per component - add a wrapper class that inherits 
the VMenuItem class, set a few properties, compile and install.
I am now working on the best way to handle popup forms that rely on or interact 
with the dynamic data in the application project. Say a general "EditClient" 
popup that would be made available in "OrderEntry" or "Invoice" application 
projects where I want to pass the current Client object to the editor popup and 
have the application client's object automatically update and refresh when the 
popup is "Saved".  I have a couple of prototypes of different ways to handle 
this and a few more ideas.  Will decide on the best way after a bit more work.
Should this work (or when it works) opens up this concept to a wider approach 
that not only handles what I am now calling "virtual menu items" but also 
"virtual toolbuttons", and other virtual controls (in the above examplpe, think 
of a client name buttonbox that handles the entire edit processing within 
itself, no code needed in the application project).

Another idea is to use this approach to provide entire "standard" menus by 
dragging a virtual control onto a form.  This would include, say, 
File|Edit|View|Tools|Help and all the associated submenus. Just drag the 
VStandardMenu virtual control onto the form - no need to build these menus via 
the IDE each time

rgrds
Bruce


-- 
B Bruen 

--
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] ICal parser

2014-10-07 Thread B Bruen
On Tue, 7 Oct 2014 19:45:10 +0200
Fabien Bodard  wrote:

> ... what is iCal :-P ?
> 
> 2014-10-07 4:25 GMT+02:00 B Bruen :
> > I don't suppose that anyone has an iCal parser utility that they would care 
> > to share do they?
> >
> > --
> > B Bruen 
> >

Further research by moi reveals that I should have called it "vCalendar" or 
more commonly "iCalendar". It is the unofficial interchange "standard" (and I 
use that term with the looseness it deserves) for  calendaring events, todos, 
journal entries and free-busy schedules.  More at 
http://en.wikipedia.org/wiki/ICalendar#Technical_specifications  etc.

I have begun developing a parser - I need it to get scheduled Australian public 
holidays from google. (Much as I despise using that source, but unfortunately 
it seems to be the best available :-(  )
B
-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] help generation for local classes

2014-10-06 Thread B Bruen
I am not sure where this crept in but...

The IDE help browser now deems local classes to be non-creatable if they do not 
contain a _new() method.
pic attached

-- 
B Bruen 
--
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=154622311&iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] ICal parser

2014-10-06 Thread B Bruen
I don't suppose that anyone has an iCal parser utility that they would care to 
share do they?

-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] IDE Feature request

2014-10-03 Thread B Bruen
When an untrapped error occurs running a project within the IDE the program 
pauses and the error message appears in the code editor as a popup at the 
significant line.

Would it be possible for the IDE to somehow copy that message to the clipboard?

regards
Bruce

-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea Pop-up Menu on right click

2014-10-02 Thread B Bruen
On Thu, 02 Oct 2014 16:27:44 +0200
Benoît Minisini  wrote:

> Le 02/10/2014 15:36, Rolf-Werner Eilert a écrit :
> >
> >
> > Am 30.09.2014 15:29, schrieb Benoît Minisini:
> >> Le 30/09/2014 10:59, Rolf-Werner Eilert a écrit :
> >>> Hi,
> >>>
> >>> TextArea produces a pop-up menu when right-clicking on it. What can I do
> >>> to get rid of this behavious, i. e. when I do not want the user to be
> >>> able to manipulate the text via the pop-up menu?
> >>>
> >>> Thanks for your ideas!
> >>>
> >>> Rolf
> >>>
> >>
> >> Either set the "PopupMenu" property, or implement the "Menu" event handler.
> >>
> >> Regards,
> >>
> >
> > Hi Benoit, I tried both but to no avail. Even if I give an existing
> > menu, the standard menu (with Paste and Copy) will pop up. And it is
> > this menu I would like to avoid (because the students use it to fleece
> > the teacher) ;)
> >
> > Rolf
> >
> 
> Sorry, I told you what I wanted to achieve with the 'Menu' event 
> handler. But by looking at the code, I see that it does not behave 
> correctly, and it does not even behave the same between gb.qt4 and gb.gtk.
> 
> I will fix that for 3.6.
> 
> As for PopupMenu, it works for me provided that you don't implement the 
> Menu event handler!
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

Hi Benoît,

I'd just like to confirm your intentions here.

As far as I know, under QT4, I have used that "non-existent menu" trick quite 
few times.

I confirm (again under QT4) that 
a) setting the control popup-menu name to a non-existent menu kills the 
standard popup, unless
b) I implement a MyControl_Menu method with STOP EVENT. In which case 
c) the standard menu appears. (even if the control has a popup menu name ???)

To me there is three options:
1) status quo, if the menu does not exist, nothing happens
2) fix the STOP EVENT issue
3) make the "standard menu" visible in the IDE somehow.

Of these, I'd obviously prefer 1.  But presumably this would mean fixing QTx?? 
(But I dont care about that)
2 would require a fair bit of work on my part.
3 I dont even want to think about.

So, which way? (or is there other ways?)

regards
Bruce 


-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea Pop-up Menu on right click

2014-10-02 Thread B Bruen
On Thu, 02 Oct 2014 10:22:21 +0200
Rolf-Werner Eilert  wrote:

> 
> 
> Am 30.09.2014 15:10, schrieb B Bruen:
> > On Tue, 30 Sep 2014 10:59:36 +0200
> > Rolf-Werner Eilert  wrote:
> >
> >> Hi,
> >>
> >> TextArea produces a pop-up menu when right-clicking on it. What can I do
> >> to get rid of this behavious, i. e. when I do not want the user to be
> >> able to manipulate the text via the pop-up menu?
> >>
> >> Thanks for your ideas!
> >>
> >> Rolf
> >>
> >>
> > Something like
> >
> > Public Sub Form_Open()
> >
> >TextArea1.PopupMenu = "mnuDummy"
> >
> > End
> >
> > (where mnuDummy does not exist) seems to work
> >
> > hth
> > B
> >
> 
> Unfortunately, not here. When you point to a menu that does not exist, 
> the standard popup (Insert, Copy, Paste etc.) appears.
> 
> Rolf
> 

hmmm, how odd?
I tried Benoit's suggestion of using the Menu event* and in that case here the 
standard popup menu still occurs???

*Public Sub TextArea1_Menu()

  Stop Event

End

I am using gb.qt4, what gui are you using?
B
-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Relative paths

2014-10-01 Thread B Bruen
On Wed, 01 Oct 2014 08:26:26 +0200
Benoît Minisini  wrote:

> Le 01/10/2014 06:40, B Bruen a écrit :
> > (and I thought I knew it all! )
> >
> > In a component I want to refer to a path in the client project
> > executable. To be precise in the client project I have a relative
> > path to an image file "./img/logo.png"  where that file is the
> > project logo.  In a component that is used by that client project, I
> > want to refer to that image.
> >
> > But using both "./img/logo.png" and "img/logo.png" in a Picture
> > reference returns the image in the component executable not the
> > client project executable.  The component in question is a popup form
> > that displays the ubiquitous "About Me" info and I want to show the
> > client project logo in it.
> >
> > The salient point is that I want to get at an image file in the
> > client executable.
> >
> > Any clues?
> >
> > B
> >
> 
> There is a special syntax for that: "../img/logo.png" is the
> "img/logo.png" file of the main project.
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

Ah! That works.
Thanks
B

-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Relative paths

2014-09-30 Thread B Bruen
(and I thought I knew it all! )

In a component I want to refer to a path in the client project executable. To 
be precise in the client project I have a relative path to an image file 
"./img/logo.png"  where that file is the project logo.  In a component that is 
used by that client project, I want to refer to that image.

But using both "./img/logo.png" and "img/logo.png" in a Picture reference 
returns the image in the component executable not the client project 
executable.  The component in question is a popup form that displays the 
ubiquitous "About Me" info and I want to show the client project logo in it.  

The salient point is that I want to get at an image file in the client 
executable.

Any clues?

B

-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TextArea Pop-up Menu on right click

2014-09-30 Thread B Bruen
On Tue, 30 Sep 2014 10:59:36 +0200
Rolf-Werner Eilert  wrote:

> Hi,
> 
> TextArea produces a pop-up menu when right-clicking on it. What can I do 
> to get rid of this behavious, i. e. when I do not want the user to be 
> able to manipulate the text via the pop-up menu?
> 
> Thanks for your ideas!
> 
> Rolf
> 
> 
Something like 

Public Sub Form_Open()

  TextArea1.PopupMenu = "mnuDummy"
  
End

(where mnuDummy does not exist) seems to work

hth
B
-- 
B Bruen 

--
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=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A good idea?

2014-09-20 Thread B Bruen
On Sun, 21 Sep 2014 00:57:55 +0200
Tobias Boege  wrote:

> On Sun, 21 Sep 2014, B Bruen wrote:
> > As some will know, we use a lot of third-party (i.e. developed by us) 
> > components and libraries in our projects.
> >  Some of these are re-usable pop-up forms to provide common features across 
> > our gui apps. Things like  "AboutMe" and "SysInfos" forms that we need to 
> > place in all our client applications.
> > 
> > Each of these requires that we include the component in the project 
> > properties, create a menu item in the relevant form and an event handler 
> > for that menu item.  All these handlers essentially do is create an 
> > instance of the pop-up and ShowModal it.
> > 
> > The other day I had an idea.  I created a virtual control "wrapper" class 
> > that takes care of the above by itself. All the coder need do is to place 
> > the virtual control on the relevant form in form design mode.
> > 
> > Anyway, this seems to work!  I cant see any problems and I am now looking 
> > at more complex uses of this approach.  Perhaps it might be a way to 
> > implement the IDE add-ins mentioned recently?
> > 
> > Here is a project that mocks up this approach in that it is totally self 
> > contained (i.e. doesn't use components or libraries). If you would take a 
> > look you'll see that the main form, i.e. the "client", has no code at all 
> > for managing the pop-up (but does have a handler for an event raised by the 
> > pop-up).
> > 
> > What do you think?
> > 
> 
> Vry nice idea! It looks a bit like an hack, though, because it's not
> obvious (from the IDE form editor or otherwise) what the virtual control
> does. I like it anyway.
> 
Very much a hack at the moment!  In fact more of a proof of concept at this 
stage.

> I think you could even have a "MenuMaker" class which is your VControl.class
> minus the menu-specific things. You would derive "HelpMaker" from that class
> which provides the necessary names, like "mnuHelp", etc. and a real MakeMenu
> method (or event handler?).
>
Yes, that's what I was alluding to as the "more complex" matters.
  
> For the others: there is an error "Component not found: genutil". You can
> either fix this yourselves or apply the attached patch. It seemed to be safe
> to just remove that component (?).
> 
> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk

Oops! I just stuck that GenUtil reference in to get at the help for it while 
responding to another thread. It is immaterial to this thread - so yes just 
remove it.

Thanks for the feedback.
B
-- 
B Bruen 

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


Re: [Gambas-user] Alternate language generation.

2014-09-20 Thread B Bruen
On Sat, 20 Sep 2014 23:17:03 +0100
John Leake  wrote:

> When did you arrive and what period do you refer to ?
> 
> On 20/09/14 22:34, Tobias Boege wrote:
> > On Sat, 20 Sep 2014, John Leake wrote:
> >> Hi All,
> >> Do any of you old-timers to gambas recall any questions/interest in
> >> using the IDE to generate source for other languages ?
> >>
> > 
> > I do not but I have seen in the archives that *many* people where around
> > Gambas before I arrived which aren't here anymore.
> > 

I thought Tobi had been around since the pre-mesozoic era (i.e. Gambas 1.0) :-)

-- 
B Bruen 

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


[Gambas-user] A good idea?

2014-09-20 Thread B Bruen
As some will know, we use a lot of third-party (i.e. developed by us) 
components and libraries in our projects.
 Some of these are re-usable pop-up forms to provide common features across our 
gui apps. Things like  "AboutMe" and "SysInfos" forms that we need to place in 
all our client applications.

Each of these requires that we include the component in the project properties, 
create a menu item in the relevant form and an event handler for that menu 
item.  All these handlers essentially do is create an instance of the pop-up 
and ShowModal it.

The other day I had an idea.  I created a virtual control "wrapper" class that 
takes care of the above by itself. All the coder need do is to place the 
virtual control on the relevant form in form design mode.

Anyway, this seems to work!  I cant see any problems and I am now looking at 
more complex uses of this approach.  Perhaps it might be a way to implement the 
IDE add-ins mentioned recently?

Here is a project that mocks up this approach in that it is totally self 
contained (i.e. doesn't use components or libraries). If you would take a look 
you'll see that the main form, i.e. the "client", has no code at all for 
managing the pop-up (but does have a handler for an event raised by the pop-up).

What do you think?

regards
Bruce
-- 
B Bruen 


virtctls-0.0.5.tar.gz
Description: Binary data
--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Static Classes and Modules

2014-09-20 Thread B Bruen
Another thing just popped into mind:

Consider an inheritance chain where at some level a class only defines static 
features (but inherits dynamic features from ancestral classes).

If "only static feautures" presumed "non-instantiable class"  then this would 
break subsequent inheritance.

regards
Bruce

p.s. I have had a bit of a look around the web and this concept of "static" = 
"non-instantiable" seems to be an idea of a certain North American software 
company whose products are of limited appeal to the majority of Linux users :-) 
 I might have to see if my old Bertram Meyer text book is in the attic as I am 
getting more and more sure that "static" means allocated at class level rather 
than at instance level and nothing more.
-- 
B Bruen 

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


Re: [Gambas-user] Static Classes and Modules

2014-09-20 Thread B Bruen
On Sat, 20 Sep 2014 20:24:46 +0200
Benoît Minisini  wrote:

> Le 20/09/2014 11:55, John Leake a écrit :
> > Thanks Tobi,
> >>> So could someone tell me if a class without any dynamic variable ie a
> >>> static class, can or cannot be created ?
> >>>
> >>
> >> Or you can try it out.
> >>
> >> What I did was creating a module and making objects from it with New -- it
> >> works, but those objects are even more limited than I had expected. In 
> >> their
> >> code, there seems to be no way to even see that they are any different from
> >> the automatic instance (singleton). The module's code was:
> >>
> >> --8<--[ Module1.module 
> >> ]
> >> ' Gambas module file
> >>
> >> Public Sub Print()
> >>Print Me
> >> End
> >> --8<
> >>
> >> and the program:
> >>
> >> --8<--[ MMain.module 
> >> ]--
> >> ' Gambas module file
> >>
> >> Public Sub Main()
> >>Dim h As New Module1, g As New Module1
> >>
> >>Print Module1
> >>Module1.Print()
> >>Print "---"
> >>Print h
> >>h.Print()
> >>Print "---"
> >>Print g
> >>g.Print()
> >> End
> >> --8<
> >>
> >> with the output:
> >>
> >>(Class Module1)
> >>(Class Module1)
> >>---
> >>(Module 0x...b8)
> >>(Class Module1)
> >>---
> >>(Module 0x...e8)
> >>(Class Module1)
> >>
> >> So indeed, there are different objects (especially, it's possible to
> >> instantiate modules) but "Me" inside the module code always refers to
> >> the singleton.
> >>
> > This is where I have a problem h and g are different.
> >
> 
> Static classes should not be instanciable. So don't do that even if the 
> interpreter allows it. It's there from the beginning, and it's probably 
> a mistake.
> 
> I must investigate before doing anything, because it may be a 
> backward-compatibility problem: I sometimes have to keep bugs for that 
> reason, and I must wait for a major release to fix it.
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

One small argument in favour of allowing instantiation of modules and "static" 
classes.

We have a component called "GenUtil" that contains some utility functions and 
data that we use in lots and lots of our projects. Originally (some time back 
in Gambas2) it contained a class "StrUtil" that was coded as a class and thus 
needed instantiation in all the client projects that used it. Some time ago 
while modifying the library code I decided that, since the StrUtil methods were 
essentially static in nature and as the class had no dynamic data, I could 
change it to a module.  Newer projects now access those methods via the module 
name as they should.  But the older projects, that instantiate the module as an 
object and refer to the methods via the object name still work.  I just checked 
and we have over 80 projects that reference that component.  I have no idea how 
many of them use which means of referencing the StrUtil methods.  So I would 
prefer that status quo remains.

In fact I would prefer that only those classes coded as CREATE PRIVATE would 
exclude instantiation as even though a class bereft of dynamic data or methods 
today may have some dynamics tomorrow and vice versa.  In short the decision 
that a class should prevent instantiation should be explicit i.e. via the 
CREATE PRIVATE command.


regards
Bruce
-- 
B Bruen 

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


Re: [Gambas-user] Static Classes and Modules

2014-09-20 Thread B Bruen
On Sat, 20 Sep 2014 10:55:06 +0100
John Leake  wrote:

> Thanks Tobi,
> >> So could someone tell me if a class without any dynamic variable ie a
> >> static class, can or cannot be created ?
> >>
> > 
> > Or you can try it out.
> > 
> > What I did was creating a module and making objects from it with New -- it
> > works, but those objects are even more limited than I had expected. In their
> > code, there seems to be no way to even see that they are any different from
> > the automatic instance (singleton). The module's code was:
> > 
> > --8<--[ Module1.module ]
> > ' Gambas module file
> > 
> > Public Sub Print()
> >   Print Me
> > End
> > --8<
> > 
> > and the program:
> > 
> > --8<--[ MMain.module ]--
> > ' Gambas module file
> > 
> > Public Sub Main()
> >   Dim h As New Module1, g As New Module1
> > 
> >   Print Module1
> >   Module1.Print()
> >   Print "---"
> >   Print h
> >   h.Print()
> >   Print "---"
> >   Print g
> >   g.Print()
> > End
> > --8<
> > 
> > with the output:
> > 
> >   (Class Module1)
> >   (Class Module1)
> >   ---
> >   (Module 0x...b8)
> >   (Class Module1)
> >   ---
> >   (Module 0x...e8)
> >   (Class Module1)
> > 
> > So indeed, there are different objects (especially, it's possible to
> > instantiate modules) but "Me" inside the module code always refers to
> > the singleton.
> > 
> This is where I have a problem h and g are different.
> 
(Caveat: without knowing how Benoit did it.)
Because h and g are different. They are pointers to the heap entries for each 
of those objects. Even if those objects do not have any memory allocated for 
dynamic variable data (and are therefore "useless" in the sense that they are 
empty objects not useless in the sense of "incapable of doing anything useful").
In a class Me will refer to the object address in the "dynamic" heap but in a 
module Me will refer to the address in the "static" heap. Similarly, anything 
declared as static in a class will be allocated space in the "static" heap and 
each of that classes objects will have reference entries for those items that 
point to the same addresses in the "static" heap.
Anything declared in a module is assumed to be static, so your  Public Sub 
Print() is in reality equivalent to Static Public Sub Print() and thus returns 
the address in the "static" heap.

BTW this is slightly different to a singleton, in theory at least.  According 
to my memory, the singleton "pattern" is used to restrict creation only one 
instance of a certain class.  That is, there will be only one instance 
"allowed" in the "dynamic" heap.  The intent was to provide a way to control 
allocation of resources for the object.  For example, if the program needed a 
large resource hungry chunk of data, but that data was only used in certain 
cases of execution, then rather than "always" allocating space for it in the 
"global" memory area, a singleton class was used which was only instantiated 
when required (and presumably destroyed when no longer required). So, to my way 
of thinking, a Gambas module is not the same as a singleton. It will always 
occupy space when it is loaded, whether or not it is referenced anywhere else 
in the project.  

Anyway...
regards

-- 
B Bruen 

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


Re: [Gambas-user] Modules

2014-09-15 Thread B Bruen
On Tue, 16 Sep 2014 00:03:22 +0200
Benoît Minisini  wrote:

> Le 15/09/2014 23:52, John Leake a écrit :
> >>
> >> Private by default. It's like a class, except everything is static.
> >>
> > So if I have a module containing some general purpose functions that I
> > wish to share across all the forms in a project,  can simply declare
> > these functions as Public within the module ?
> >
> 
> Yes.
> 
> -- 
> Benoît Minisini
> 

Also, if you need to share objects around the various parts of the project you 
can declare them in the module as either public variables or (if you want to 
add some shareable features) as properties of the module.

However, remember this: As you are accessing static features you need to 
explicitly use the module name qualifier when you reference them in other code.

So for example:

in module "MyUtil"

Public CurrentCustomer As CCustomer

Public Sub Execute_Current_Customer(PrejudiceLevel As Integer)
  CurrentCustomer = Null
End

in, say, "FMain"

Public Sub Load(CustID)

  MyUtil.CurrentCustomer.Load(CustID)
  If MyUtil.CurrentCustomer.IsLatePayer then
MyUtil.Execute_Current_Customer(iExtreme)
  EndIf

etc


hth
Bruce


-- 
B Bruen 
Note: temporary change to email address

--
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=157508191&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] The new IDE opening screen

2014-09-09 Thread B Bruen
Simple question: What does the search function actually search? Obviously by 
project name but what else?
I would have thought it also searched the project description but I am getting 
results that don't match that expectation.

tia

-- 
B Bruen 

--
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=157508191&iu=/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 reset a toolbar config?

2014-08-31 Thread B Bruen
On Mon, 01 Sep 2014 01:29:43 +0200
Benoît Minisini  wrote:

> Le 01/09/2014 01:06, B Bruen a écrit :
> > I have this recurring problem with the gb.form.mdi Toolbar.  For some 
> > reason, unknown, I occasionally lose the project config file contents that 
> > describe the customised toolbar or those lines get "corrupted".
> >
> > The original config lines are:
> > [gb.form.mdi/Toolbars/tbrTasks]
> > Layout=["$lblFilter","taskfilter0","taskfilter.1","taskfilter.2","taskfilter.3","$lblSort","tasksort.0","$lblSearch","tasksearch.0","task.refresh"]
> >
> > The corrupted lines are:
> > [gb.form.mdi/Toolbars/tbrTasks]
> > Layout=["$lblFilter","taskfilter.1","$lblSort","$lblSearch","tasksearch.0"]
> >
> > My problem is that there appears to be no way to "reset" the toolbar in the 
> > IDE to get the original lines back. I have to manually edit the config file 
> > in an external editor.
> >
> > Is there a way to reset it in the IDE and I just can't find it?
> >
> >
> > tia
> > Bruce
> >
> 
> There must be a bug somewhere in the IDE.
> 
> Do you more information about when exactly the toolbar configuration is 
> corrupted?
> 
> Can you send the project?
> 
> -- 
> Benoît Minisini
> 

I don't think it's the IDE that corrupts it (as I don't think the IDE creates 
those config entries?)  A couple of theories: maybe running the project through 
the IDE with debug and setting a custom toolbar layout? or maybe if the 
executable crashes after (and not related to) setting the custom layout?  But I 
have not found a true cause as I don't notice the toolbar change until some 
time later.

The project is too big. I'll try to mock up something that shows it over the 
next week (I'll be away for a few days).

Other information:
1. The toolbar contains labels, menubuttons, toolbuttons, and a buttonbox. All 
have actions (except the labels of course) and it is interesting that the 
labels are always left in the config entry after the corruption happens and I 
always get one actioned item included and visible in the toolbar, but it has 
moved to the right hand end of the Layout line (as in the example above).
2. I am fairly sure that it only happens after I have "Configure"d the toolbar 
while the project is running.  When does the runtime write that config out, 
when the configure popup is closed or after the project exits?
3. The actions are named by group and default position , e.g. "taskfilter.0" 
etc.  This does not seem to be an issue though?
4. The Configure popup "Reset" button does not correct the layout after the 
corruption occurs.  This, I suppose after thinking this through, is the real 
issue.  How and where does the "Reset" button get its' layout information from? 
I would have thought that it goes back to the .form file?

B

   


-- 
B Bruen 

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


[Gambas-user] How to reset a toolbar config?

2014-08-31 Thread B Bruen
I have this recurring problem with the gb.form.mdi Toolbar.  For some reason, 
unknown, I occasionally lose the project config file contents that describe the 
customised toolbar or those lines get "corrupted".

The original config lines are:
[gb.form.mdi/Toolbars/tbrTasks]
Layout=["$lblFilter","taskfilter0","taskfilter.1","taskfilter.2","taskfilter.3","$lblSort","tasksort.0","$lblSearch","tasksearch.0","task.refresh"]

The corrupted lines are:
[gb.form.mdi/Toolbars/tbrTasks]
Layout=["$lblFilter","taskfilter.1","$lblSort","$lblSearch","tasksearch.0"]

My problem is that there appears to be no way to "reset" the toolbar in the IDE 
to get the original lines back. I have to manually edit the config file in an 
external editor.

Is there a way to reset it in the IDE and I just can't find it?


tia
Bruce
-- 
B Bruen 

--
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] Add new command to: Copy directories recursively

2014-08-25 Thread B Bruen
On Mon, 25 Aug 2014 22:28:29 +0200
Julio Sanchez  wrote:

> Hi, could you add a new order within gambas3 to copy directories
> recursively.
> 
(snippped)

Here's my version, slightly different to Tobi's.  I find that it is better to 
provide an array of all the paths in the source tree and then iterate through 
it as you have more control over what is and is not copied. For example, in the 
following code I ignore all the svn control files. 

' Gambas module file

''' This module provides some generalised methods for handling files.

Export

Public Function MoveFile(source As String, dest As String, Optional overwrite 
As Boolean = False) As Boolean  '' Move a file specified by the source path to 
the dest dir.  If overwrite is specified and is true

  '' then an existing file of the same name in the 
dest dir will be overwritten (read deleted and replaced).

  Dim sourcedir As String
  Dim sourcefile As String

  sourcefile = File.Name(source)
  sourcedir = File.Dir(source)
  If sourcedir = dest Then Error.Raise("Source and destination directories are 
the same")

  'First check if file exists
  If Exist(source) Then
'Now check if copyto directory exists
If Not (Exist(dest)) Then
  Mkdir dest
Endif
'Now check if file exists
If Exist(dest &/ sourcefile) Then 
  If overwrite Then 
Kill dest &/ sourcefile
  Else
Error.Raise("File already exists in destination dir")
  Endif
Endif
Move source To dest &/ sourcefile
  Else
Error.Raise("Source file for move does not exist")
  Endif
  Return True

Catch
   Print Subst$("Err (&2) occurred at &4 : &1.", Error.Text, Error.Code, 
Error.Backtrace.Join("\n"), Error.Where)
  Return False

End

Public Function CopyFile(source As String, dest As String, Optional overwrite 
As Boolean = False) As Boolean  '' Copies a file specified by the source path 
to the dest dir
  
  Dim sourcedir As String
  Dim sourcefile As String

  sourcefile = File.Name(source)
  sourcedir = File.Dir(source)
  If sourcedir = dest Then Error.Raise("Source and destination directories are 
the same")

  'First check if file exists
  If Exist(source) Then
'Now check if copyto directory exists
If Not (Exist(dest)) Then
  Mkdir dest
Endif
'Now check if file exists
If Exist(dest &/ sourcefile) Then 
  If overwrite Then 
Kill dest &/ sourcefile
  Else
Error.Raise("File already exists in destination dir")
  Endif
Endif
Copy source To dest &/ sourcefile
  Else
Error.Raise("Source file for copy does not exist")
  Endif
  Return True

Catch
  Print Subst$("Err (&2) occurred at &4 : &1.", Error.Text, Error.Code, 
Error.Backtrace.Join("\n"), Error.Where)
  Return False

  
End

Public Function RecDir(root As String, rootext As String, pattern As String, 
filter As Integer) As String[]
  Dim wkrtn As New String[]
  Dim sdirs As New String[]
  Dim sd As String
  Dim item As String
  
  wkrtn = Dir(root &/ rootext, pattern, filter)
  sdirs = Dir(root &/ rootext, "*", gb.Directory)
  For Each sd In sdirs
If sd = ".svn" Then Continue' ignore 
subversion dirs
For Each item In (RecDir(root &/ rootext, sd, pattern, filter))
  wkrtn.Add(sd &/ item)
Next
  Next
  Return wkrtn.Sort()

Catch
  Error Subst("&1\nERR: &2 (&3)\n&4\n&1\n", String$(40, "-"), Error.Text, 
Error.Code, Error.Backtrace.Join("\n"))
  Error sd, root, rootext, pattern, filter
  
End

hth

-- 
B Bruen 

--
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] Using command line arguments in GUI applications

2014-08-21 Thread B Bruen
Here's a slightly modified version of Tobi's demo showing most (?) of the 
features of the Args processor with comments.

hth

Bruce
On Thu, 21 Aug 2014 01:07:28 +0200
Tobias Boege  wrote:

> On Wed, 20 Aug 2014, Geoffrey De Belie wrote:
> > 
> > Op 19-08-14 om 21:28 schreef Tobias Boege:
> > >On Tue, 19 Aug 2014, Geoffrey De Belie wrote:
> > >>Hi,
> > >>
> > >>After reading the documentation at 
> > >>http://gambasdoc.org/help/comp/gb.args/args/has?v3 I'm not sure how to 
> > >>use command line arguments in Gambas. Can you explain it to me?
> > >>
> > >>1) Is it possible to pass command line arguments to my GUI application? 
> > >>If so, how?
> > >>2) How can I define command line arguments (options) like --execute, -e 
> > >>or --replace, -r?
> > >>
> > >Does the attached project help you?
> > >
> > >Note that you call the Gambas interpreter to start your Gambas program. The
> > >interpreter takes arguments of its own so you have to take the canonical
> > >measures (i.e. the sole double dash) to make gbx3 leave your argument to
> > >gb.args:
> > >
> > >   $ gbc3 && gbx3 -- --replace ABC
> > >
> > >in your project directory will compile and call the program.
> > >
> > >Also, you wrote this message to the gambas-devel mailing list which is for
> > >people who contribute to Gambas. To ask Gambas user/usage questions like
> > >yours, there is the gambas-user mailing list (which I'm CC'ing now). You
> > >will likely get an even quicker response there :-)
> > >
> > >Regards,
> > >Tobi
> > >
> > Hi,
> > 
> > Thanks for the project. Just what I needed. One last question: how can I add
> > the parameter to the --help text?
> > 
> > I read at http://gambasdoc.org/help/comp/gb.args/args/getinteger?v3
> > "_ArgName_ is the name of the option argument used by the --help option."
> > 
> > Almost what I need, I just don't know how to define an option that takes an
> > argument, like --replace sometext does.
> > 
> 
> Args.Get() is for options which accept some data (in string form). There are
> GetInteger() and GetFloat() which convert the argument to Integer or Float
> for you. For argument-less options, you have the Has() method.
> 
> You specify the help text and stuff in the call to Args.Get()/GetInteger()/
> GetFloat()/Has(), like so (adapting the project I sent):
> 
>   $sReplace = Args.Get("r", "replace", "Specify the replacement text", "rep")
> 
> Then
> 
>   $ gbc3 && gbx3 -- --help
>   Usage: gui-args  
> 
>   Options:
>-r --replace  Specify the replacement text
>-V --version   Display version
>-h --help  Display this help
> 
> I first thought it was some non-deterministic black magic which makes the
> arguments to some method call appear in that help text but if you experiment
> a bit with gb.args (place Args.Begin(), ..., Args.End() blocks into different
> sections of your program or look into its source code), you'll see that it is
> still limited to the traditional idea of action before reaction.
> 
> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
> 
> --
> 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


-- 
B Bruen 


gui-args-0.0.12.tar.gz
Description: Binary data
--
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


[Gambas-user] Using WITH on non-objects

2014-07-30 Thread B Bruen
TRY:
Often I find that I have to do multiple actions on a non-object variable, for 
instance I might be working with a large string where I need to replace 
multiple sub-strings, sometimes on a conditional basis. For example, suppose I 
have a string  S which is a pattern and contains something like "aaa bbb ccc 
eee".  (Note1 : this is NOT a Subst pattern string!)

Currently I need to write a lot of code like:
  wkS=IIf(somecondition, Replace$(S,"aaa","Somebody"),"")
  wks=IIf(someothercondition, Replace$(wkS,"bbb","something","else")
  ...
  If instr(wkS,"ddd")>0 then Replace$(wkS,"ddd","Tuesday fortnight)
  ...
  etc

Would it be possible to provide within gambas a "shortcut" method for such 
whereby I could write
 wkS=S
 With wkS
IIf(somecondition, Replace$("aaa","Somebody","")
   ...
   etc
End With

where wkS is a String variable, i.e. not an object.

It's just an idea, I was wondering if it is possible.  I have written quite a 
lot of sed calls to achieve the things I need to do but they are a royal PITA 
to develop in the first place and an extremely royal PITA to maintain.

CATCH:
Another example might illuminate further.  Again I'll talk about string 
variables as they are easiest to convey the idea.
Since 3.5 I can do the following sorts of things:
  Dim MyWeather As String ="Tuesday -32C"
  Dim MyWeatherComment As String[] = Scan(MyWeather, "* *C")

  With MyWeatherComment
.[0]=Replace( .[0], "Tuesday", "Tomorrow the maximum temp will be" )
.[1]=IIf ( Val ( .[1] ) < 19, .[1] & " Br!", .[1] & " Phew!")
etc
  End With
  Print MySArray.Join(" ")

which results in "Tomorrow the maximum temp will be -32 Br!"

What I would like to do is 
  Dim MyWeather As String = "Tuesday 1st August 2014. Exp Max:-32C Hum:2%"
  Dim MyComment As String="Today the maximum temp will be &1 &2"
  With Scan(MyWeather,"* *. Exp Max:*C *)[2]
Print Subst(MyComment, ., IIf( Val(.)<19,"Brrr!", "Phew")
  End With

FINALLY:
In the above pretend code of mine it might be hard to see but on that Print 
line I'm just using dot, (.) to represent the current With target.  I don't 
know how the compiler works with WITH but given the above array constructs we 
now have, it looks like it expands:
WITH 
  .something  .something .
END WITH
to:
WITH 
  .something  .something .
END WITH

So what I am asking for is an extension such that "." (i.e. " . ") means the 
current WITH target in any context, or in other words it refers to the WITH 
target regardless of whether that target is an object or a native datatype. So 
a lone . would refer to the WITH target itself.

regards
Bruce
-- 
B Bruen 

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


Re: [Gambas-user] Settings

2014-07-27 Thread B Bruen
On Mon, 28 Jul 2014 14:56:38 +0930
B Bruen  wrote:

> On Mon, 28 Jul 2014 07:18:47 +0200
> Benoît Minisini  wrote:
> 

> > Maybe not clicking the "stop on each error" button in the IDE would 
> > solve the problem? :-)
> > 
> > -- 
> > Benoît Minisini
> > 
> 
> "Stop on each error" is not clicked here and I can reproduce the reported 
> error.
> B
> 
> -- 
> B Bruen 
> 


Now this is truly weird!

I just had a power fail here and when the UPS cut in I suddenly had two copies 
of every task running.  Not only the 8 gambas projects I had open but 
everything, and I mean everything ... including X.

Not weird enough?
One copy of Shane's project has "Stop on each error" unclicked and the other, 
guessing by the task id, is clicked.  Both reproduced the same error.

Too much weirdness! Reboot.

Yep, now his project (first one opened) comes up with "Stop on each error" 
clicked. and fails.  But as you say... unclicking it and the error goes away. 

Problem solved. But this really indicates a need for a strongly worded help 
page for that "Stop on each error" option. (I have been caught before on this 
too!)  Suggested help may include "Don't use this - you will forget you set 
it!!! "

best regards
Bruce


p.s. Why use that Try instead of If Not Exists() in that loop, in fact why not 
start the loop at User.Home instead of / ?



-- 
B Bruen 

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


Re: [Gambas-user] Settings

2014-07-27 Thread B Bruen
On Mon, 28 Jul 2014 07:18:47 +0200
Benoît Minisini  wrote:

> Le 28/07/2014 06:59, B Bruen a écrit :
> > On Sun, 27 Jul 2014 20:35:53 -0600
> > Randall Morgan  wrote:
> >
> >> Must be too big on your end. I know I and others have sent larger files...
> >> But the link works also. I'll look at your code and get back to you.
> >>
> >
> > I have had a bit of a look at this.  To me, it appears that sdl is doing 
> > something nasty to the Try.. If Error construct.
> > The failure occurs in the Settings class when it is creating the directory 
> > chain for the user's .config/gambas3 directory.
> > It fails on the first iteration through the path, i.e.
> >Try Mkdir "/" & sPath
> > when sPath = "" i.e. the root directory (strangely enough!) already exists.
> >
> > That line should not fail i.e. the Try should ignore the error silently. 
> > But with sdl it appears not too?
> >
> > Definitely a bug within Gambas itself.
> >
> > Over to Benoit...
> >
> > regards
> > Bruce
> >
> 
> Maybe not clicking the "stop on each error" button in the IDE would 
> solve the problem? :-)
> 
> -- 
> Benoît Minisini
> 

"Stop on each error" is not clicked here and I can reproduce the reported error.
B

-- 
B Bruen 

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


Re: [Gambas-user] Settings

2014-07-27 Thread B Bruen
On Mon, 28 Jul 2014 14:29:43 +0930
B Bruen  wrote:

> On Sun, 27 Jul 2014 20:35:53 -0600
> Randall Morgan  wrote:
> 
> > Must be too big on your end. I know I and others have sent larger files...
> > But the link works also. I'll look at your code and get back to you.
> > 
> 
> I have had a bit of a look at this.  To me, it appears that sdl is doing 
> something nasty to the Try.. If Error construct.
> The failure occurs in the Settings class when it is creating the directory 
> chain for the user's .config/gambas3 directory.
> It fails on the first iteration through the path, i.e. 
>   Try Mkdir "/" & sPath 
> when sPath = "" i.e. the root directory (strangely enough!) already exists.
> 
> That line should not fail i.e. the Try should ignore the error silently. But 
> with sdl it appears not too?
> 
> Definitely a bug within Gambas itself.
> 
> Over to Benoit...
> 
> regards
> Bruce
> 
> -- 
> B Bruen 
> 
> --
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls. 
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

oops
P.S. the fail occurs in the Settings class at line 96

It can be patched if you are using the Gambas source by changing line 96 to:
  If Not Exists("/" & sPath) Then MkDir "/" & sPath

but you will still get fails later when another Try... is executed in the 
Settings class.

regards
Bruce
-- 
B Bruen 

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


Re: [Gambas-user] Settings

2014-07-27 Thread B Bruen
One other strange thing. You have a FMain form in the project. It doesn't 
appear in the project browser.  Why not is a mystery to me. 
But I just deleted it and the project runs OK.  You might like to use your file 
manager to delete it as well.
(It has nothing to do with the Settings fail, though)

regards
Bruce

-- 
B Bruen 

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


Re: [Gambas-user] Settings

2014-07-27 Thread B Bruen
On Sun, 27 Jul 2014 20:35:53 -0600
Randall Morgan  wrote:

> Must be too big on your end. I know I and others have sent larger files...
> But the link works also. I'll look at your code and get back to you.
> 

I have had a bit of a look at this.  To me, it appears that sdl is doing 
something nasty to the Try.. If Error construct.
The failure occurs in the Settings class when it is creating the directory 
chain for the user's .config/gambas3 directory.
It fails on the first iteration through the path, i.e. 
  Try Mkdir "/" & sPath 
when sPath = "" i.e. the root directory (strangely enough!) already exists.

That line should not fail i.e. the Try should ignore the error silently. But 
with sdl it appears not too?

Definitely a bug within Gambas itself.

Over to Benoit...

regards
Bruce

-- 
B Bruen 

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


Re: [Gambas-user] IDE crash on autocomplete

2014-07-18 Thread B Bruen
On Sat, 19 Jul 2014 02:12:16 +0200
Benoît Minisini  wrote:

> Le 19/07/2014 00:59, B Bruen a écrit :
> > I keep getting an IDE crash when typing Colo (see attached pic).
> > Clues: I have a class, Color, within this project. Its' purpose is to 
> > override the native gb.qt4 Color class (so I can't rename it).
> >
> > Any clues?
> >
> > tia
> > Bruce
> >
> 
> I need the stack backtrace printed on the error output (run the IDE from 
> a terminal to get it).
> 
> Apparently the crash is a not-catched error while interpreting an help 
> comment.
> 
> -- 
> Benoît Minisini
> 
[bb@localhost gambas3]$ gambas3 
phControls3: LabelDateBox.ForceUppercase declared but not implemented
phControls3: LabelMaskBox.Alignment declared but not implemented
phControls3: LabelMaskBox.Maxlength declared but not implemented
phControls3: LabelMaskBox.Password declared but not implemented
phControls3: LabelRadioButton.TriState declared but not implemented
phControls3: LabelSpinBox.ForceUppercase declared but not implemented
phControls3: LabelValueSlider.ForceUppercase declared but not implemented
gambas3: warning: cannot set XDirChooser.Background property: 
CControl.GetRealValue.467: Unknown symbol 'DarkBackground' in class 'Color'
gambas3: warning: cannot set property: XDirChooser.Background = 
Color.DarkBackground
gambas3: warning: cannot set TextBox.Background property: 
CControl.GetRealValue.467: Unknown symbol 'DarkBackground' in class 'Color'
gambas3: warning: cannot set property: TextBox.Background = Color.DarkBackground
gambas3: warning: cannot set TextBox.Background property: 
CControl.GetRealValue.467: Unknown symbol 'DarkBackground' in class 'Color'
gambas3: warning: cannot set property: TextBox.Background = Color.DarkBackground
gambas3: warning: cannot set TextBox.Foreground property: 
CControl.GetRealValue.467: Unknown symbol 'DarkForeground' in class 'Color'
gambas3: warning: cannot set property: TextBox.Foreground = Color.DarkForeground
gambas3: warning: cannot set TextBox.Background property: 
CControl.GetRealValue.467: Unknown symbol 'DarkBackground' in class 'Color'
gambas3: warning: cannot set property: TextBox.Background = Color.DarkBackground
gambas3: warning: cannot set TextBox.Background property: 
CControl.GetRealValue.467: Unknown symbol 'DarkBackground' in class 'Color'
gambas3: warning: cannot set property: TextBox.Background = Color.DarkBackground
gambas3: warning: cannot set TextBox.Background property: 
CControl.GetRealValue.467: Unknown symbol 'DarkBackground' in class 'Color'
gambas3: warning: cannot set property: TextBox.Background = Color.DarkBackground
gambas3: warning: cannot set TextArea.Foreground property: 
CControl.GetRealValue.467: Unknown symbol 'DarkForeground' in class 'Color'
gambas3: warning: cannot set property: TextArea.Foreground = 
Color.DarkForeground
( Everything above occurs before any text is typed )
( Regardless of the above and even using a class that does not use the 
missing color, I still get the crash as soon as I type Colo )
Markup.ConvertLine.421: Unexpected end of line
( This is the only backtrace line in the console output when I type Colo 
)

and ignore the phControls3 output, they are for an unrelated form that is using 
some of our custom controls.

I'll stick a couple of debug lines into Markup.ConvertLine and get back to you.
 
rgrds
Bruce

-- 
B Bruen 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Color

2014-07-17 Thread B Bruen
On Tue, 15 Jul 2014 15:07:40 +0200
Benoît Minisini  wrote:

> Le 15/07/2014 00:52, B Bruen a écrit :
...
> > 4) Some controls, e.g. DirChooser, don't set the background color
> > according to the Background property. It seems to set the background
> > color of the bar at the top of the chooser.  Is there any reason for
> > this?
> 
> Yes, DirChooser is a compound control, so if I do nothing, the 
> background color is not taken by the inner controls that uses the system 
> TextBackground color (for example).
> 
> I have to fix the controls case by case (i.e. decide which part of the 
> compound control should take the global background color).
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

In this specific case, but probably influenced by our local needs, I think that 
the background of a compound control should be the "bulkiest area" of the 
control.  But then again, a design rule could be : the area that the user's eye 
is/should be naturally drawn towards in the majority of uses.

But, whatever.  Since the majority of controls that we use here are very 
stable, I will probably take the line of creating our own custom versions. 
(Just another fight with SVN conflicts... :-( ) .

regards
Bruce

-- 
B Bruen 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Color

2014-07-17 Thread B Bruen
On Tue, 15 Jul 2014 15:07:40 +0200
Benoît Minisini  wrote:

> Le 15/07/2014 00:52, B Bruen a écrit :
...
> > 1) I'd like to define some new color names (e.g. DarkBackground) as
> > there is just not enough standard color names to do all I need. This
> > is not a problem with the Color override as I can define as many
> > different names as I like. My problem is the IDE.  It wont let me
> > type a color name in the Background field on the properties panel,
> > the only way to set a color name is via the button and the "Select a
> > Color" popup which, of course, has never heard of my "DarkBackground"
> > color.  So, is the textbox part of the Background property control
> > really read only or have I done something silly to our local version
> > of the IDE?
> >
> 
> You should not expect the IDE to be modified by your single own personal 
> program.
> 
> The pre-defined system colors are a common subset of system colors 
> defined by QT4 and GTK+. Some of them, like Color.LightBackground and 
> Color.LightForeground are actually a mix of two system colors.
> 
> 
> ...
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

No I didn't expect the IDE to cope with "my single own personal program". 
What I was looking at was a way to define "custom color names" that the IDE 
could cope with somehow. But 
having stepped through the IDE code and how it handles property "realValue"s I 
see the difficulties involved.  It seems a bit of a shame actually as I think 
custom color names could add value to the IDE. I'm thinking color-names like 
ErrorBackground or ErrorForeground  could be used by someone who wants to 
highlight all controls that failed validation on an update action on a form and 
things like that.  Or whatever other name a developer would want to use to 
highlight multiple controls on a form.

Nevertheless, I will work on how this could be done using our local version of 
the IDE in my spare time (haha!). Which means I may have to come back to you on 
some specific issues with the code. :-)

regards
Bruce
-- 
B Bruen 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Color

2014-07-14 Thread B Bruen
I am working on a project where the colors used on the forms need to be 
adjusted for different ambient light situations, "low light" and "daylight".  
(The application is used outdoors at dawn and during the day. So at dawn we 
need to have a fairly dull and low contrast set of colors so the user does not 
have to adjust their vision between a very "bright" screen and the low light 
view of the racehorse in training. Alternatively, during the day we need a 
higher contrast set of colors so the screen is readable.)

Up to now we have used two copies of the application to achieve the desired 
result. So I want instead to use gb.settings to hold the two color sets and 
load the selected set from a toggle button on the main form. I have overridden 
the Color class to make the gb.qt4 color names (e.g. SelectedBackground) 
read/write.  This seems to work perfectly, but I have the following problems:

1) I'd like to define some new color names (e.g. DarkBackground) as there is 
just not enough standard color names to do all I need. This is not a problem 
with the Color override as I can define as many different names as I like. My 
problem is the IDE.  It wont let me type a color name in the Background field 
on the properties panel, the only way to set a color name is via the button and 
the "Select a Color" popup which, of course, has never heard of my 
"DarkBackground" color.  So, is the textbox part of the Background property 
control really read only or have I done something silly to our local version of 
the IDE?

2) I can't work out how the background/foreground colors are set when they are 
"default". Any clues?

3) Is there some way to change the highlight color used for the selected row in 
list type controls, e.g. a gridview.  The standard dark color is close to our 
lowlight background, so the selected row is impossible to discern. Id like to 
use a lighter version of the selected highlight.  In fact it would be nice to 
change the entire style of the selected row, e.g. bold,+1 font but I don't 
think that is possible.

4) Some controls, e.g. DirChooser, don't set the background color according to 
the Background property. It seems to set the background color of the bar at the 
top of the chooser.  Is there any reason for this?

tia
Bruce

-- 
B Bruen 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More IDE wish list items

2014-07-10 Thread B Bruen
On Thu, 10 Jul 2014 23:32:37 +0200
Benoît Minisini  wrote:

> Le 10/07/2014 23:24, Benoît Minisini a écrit :
> >  > 2) In the form designer context menu as well as
> >> "Select All" could we also have "Select Parent" to get the container
> >> for the currently selected control.
> >
> > That's possible.
> >
> 
> Done in revision #6369.
> 
> -- 
> Benoît Minisini
> 

Thanks Benoît
That is much easier!  Particularly when I've just used the Embed into a 
Container menu

regards
B


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] More IDE wish list items

2014-07-10 Thread B Bruen
On Thu, 10 Jul 2014 23:24:50 +0200
Benoît Minisini  wrote:

> Le 10/07/2014 02:50, B Bruen a écrit :
> > 1) In the form designer context menu "Select" item controls popup
> > list, the form itself is not listed.  It would be nice to be able to
> > use this when there is little or no space on the form to quickly get
> > to the form itself.
> 
> Just hit ESC.
Well, you have successfully kept that secret (from me) for years now! :-)

> 
>  > 2) In the form designer context menu as well as
> > "Select All" could we also have "Select Parent" to get the container
> > for the currently selected control.
> 
> That's possible.
> 
> -- 
> Benoît Minisini
> 
> --
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MTHeme error...

2014-07-10 Thread B Bruen
On Thu, 10 Jul 2014 14:46:20 +0200
Tobias Boege  wrote:

> On Thu, 10 Jul 2014, Stephen wrote:
> >Thank you Tobias.
> > 
> >H... it (MTheme.ReadFile) is looking for a subdir off /tmp with 
> > the name of gambas. I created the subdir manually and gambas3-3.5.4 now 
> > starts up as it should.
> >Perhaps a change to the MTheme.module is warranted, check for the 
> > existence of the directories referenced in sPath, create them if need 
> > be, then copy sPath to sTemp. Just a thought.
> > 
> 
> Hmm, interesting. From _init(), ReadFile("gambas") gets called, which
> constructs a path "theme/gambas" to load the default theme which is then
> copied to a temporary location, which is the famous line 59.
> 
> But the path to copy the theme file to is obtained from Temp$() so if this
> directory doesn't exist, some node in the path /tmp/gambas.UID/PID/ does not
> exist (which would be strange) or Temp$() is broken...
> 
Guessing ...
>some node in the path /tmp/gambas.UID/PID/ does not
> exist (which would be strange) 
but then wouldn't the fail occur earlier when tmp/gambas.UID/PID was created?
> Temp$() is broken...
again wouldn't that imply an earlier failure?

So something else is awry.

rgrds
Bruce

> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
> 


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] More IDE wish list items

2014-07-09 Thread B Bruen
1) In the form designer context menu "Select" item controls popup list, the 
form itself is not listed.  It would be nice to be able to use this when there 
is little or no space on the form to quickly get to the form itself.
2) In the form designer context menu as well as "Select All" could we also have 
"Select Parent" to get the container for the currently selected control.

regards
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] IDE Wish list: Stock popup to select an image for code insertion

2014-07-08 Thread B Bruen
I come up against this occasionally, so this is an "only if it's easy" wish.

When working with class code and I want to insert a color value, it is very 
easy to do so using the "Insert Color" button on the class editor toolbar.  
Occasionally, again when working with the code, I want to insert a stock image. 
 Now I realise that the auto-complete for Picture["icon:/... will provide a 
fairly easy way to achieve that. However, it sort of needs me to know 
beforehand the name of the icon that I want.

So, my wish is for a class editor toolbutton (like "Insert Color") to insert 
the entire code (yes, I can usually manage not to remember that "icon:/ starter 
bit) that would popup a form like the form designer stock image selector and 
let me select the icon I want visually.

As an example, today the icon I was looking for was 
Picture["icon:/22/sort-descent'].  I did find it after a couple of up and down 
scrolls through the auto-completion listview. It did not occur to me that the 
name began with sort- :-(   and it would have been much easier just to have 
that form designer stock image form showing the matrix of icons.

Whatever you think.

 regards
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Discourse?

2014-07-06 Thread B Bruen
Yes, me as well.  It looks more like using a pantechnicon to go to the corner 
shop for a loaf of bread and a bottle of milk. :-)

regards
Bruce
-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] RFC: How to identify vertices and edges in a Graph class?

2014-07-06 Thread B Bruen
On Sun, 6 Jul 2014 16:48:47 +0200
Tobias Boege  wrote:

> On Sun, 06 Jul 2014, B Bruen wrote:
> > On Fri, 4 Jul 2014 13:23:41 +0200
> > Tobias Boege  wrote:
> > 
> > > Hi list,
> > > 
> > > I'm currently (well, I'll try to continue with it tomorrow) implementing 
> > > an
> > > abstract Graph class in gb.data. And by "abstract", I mean that I will 
> > > just
> > > specify the interface of Graph classes, so that concrete implementations, 
> > > of
> > > which there are plenty possibilities, are varible behind that consistent
> > > interface. (Of course, after the interface is there, you get at least two
> > > concrete implementations delivered for free along with gb.data.) This 
> > > should
> > > encourage you to model your problems as your own customised Graph classes
> > > and maybe you can then already solve them with a standard algorithm, like
> > > Dijkstra.
> > > ...
> > 
> > Hi Tobi,
> > Some thoughts.
> > 
> > A directed graph is more fundamental than an undirected graph.  Consider 
> > the simplest directed graph, an ordered list of two Vertices and one Edge.  
> > (I'll avoid integer idenitifcations for ease of explanation,) We have nodes 
> > "A" and "B" which are Vertices and node "ab" which is the edge. Node "ab" 
> > allows a traversal from "A" to "B", there is no traversal permissable from 
> > "B" to "A".  In an undirected graph, the "ab" edge would somehow have to 
> > permit both the A->B traversal and the B->A traversal.  However, this could 
> > be implemented as a graph type property where creating the "ab" edge also 
> > creates the reverse "ba" edge.
> > 
> 
> That's what I was going to do. The Graph constructor will take an Optional
> Directed As Boolean. The implementation will need to worry about what this
> property effects.
Indeed, my thoughts exactly.
> 
> > The second point is somewhat more interesting.  In the above I used the 
> > term "node" deliberately.  Some of the more arcane bits of graph theory 
> > suggest or even require that Vertices and Edges are interchangeable.  That 
> > is, any Vertice can be considered as an Edge and any Edge can be considered 
> > as a Vertice.  To allow this, I think that there needs to be a "fundamental 
> > particle" approach to building a library such as yours.  This is based on:
> > "A graph is a set of Vertices each of which is connected to some number of 
> > other Vertices by a set of Edges"
> > "A graph is a set of Edges, each of which is connected to some number of 
> > other Edges by a set of Vertices"
> > Note, generally we think of an edge as something with a maximum of two 
> > connections, i.e. ends. But in fact mathematically and Edge could have any 
> > number of ends. That's hard to visualise using the normal "ball and string" 
> > image, but if you consider the edge "abc" as a ball with three 
> > (unterminated) strings "A","B" and "C" then it starts to become easier to 
> > imagine.
> 
> That's interesting! Can you put your definition mathematically? Or suggest a
> book which develops graph theory this way? I fear otherwise I won't get the
> idea.
It comes from the hypergraph ideas.  See 
http://en.wikipedia.org/wiki/Hypergraph especially the second and third 
paragraphs.
> 
> What I call a graph is a pair of sets (V, E) where V are the vertices and E
> is a subset of V times V. So in fact, an edge has exactly one end. It cannot
> have zero ends nor two (like your edges could). (How many beginnings do your
> edges support anyway?)
Bit unsure of what you mean here?  I was using "end" to mean both the origin 
association(s) and the destination association(s). So to me an edge can only 
have >= 2 ends.  However, any "end" could be "unfilled" i.e. there is no 
vertice on it.
> 
> Vertices and edges are well distinguished in the above definition. Could you
> give me a pointer on where one needs to have vertices and edges to be
> interchangeable? At this point, interpreting a vertex as an edge doesn't
> make any sense to me (whereas an edge as a vertex seems ok).
Some information at http://en.wikipedia.org/wiki/Edge_graph

> 
> Wikipedia calls an extension of a graph where edges can connect any number
> of vertices (apparently any *positive* number) a "hypergraph" and I would
> personally stick to that naming, i.e. implement 

Re: [Gambas-user] RFC: How to identify vertices and edges in a Graph class?

2014-07-05 Thread B Bruen
clean" the graph that would remove dangling edges.  

So ...

Class g-node' attempts to 
generalise any Vertice or Edge in a directed graph
  Property Key,Identifier as String
  Property Type As String     ' validated "In 
["V","E"]
  Property OriginatingAssociations As Array' holds the list of g-nodes 
where this g-node is the origin
  Property TerminatingAssociations As Array  ' holds the list of g-nodes where 
this g-node is the destination

Class graph
  Property Nodes as Array  ' holds the set of nodes 
in the graph
  Function Remove(Key as String) As graph  ' remove a node and leave all 
associations dangling
  Function RemoveWithSnap(Key as String) as graph
  Function Clean() as graph
  etc

Is this type of thinking consistent with yours?

regards
Bruce
-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] The Class keyword

2014-07-05 Thread B Bruen
Ah, now I get it!
Thanks Tobi

B


On Fri, 27 Jun 2014 11:42:06 +0200
Tobias Boege  wrote:

> On Fri, 27 Jun 2014, B Bruen wrote:
> > As in :
> > CLASS Identifier
> >Declares to the compiler that Identifier can be used as a class name.
> > 
> > I am unsure of what this keyword really achieves.  Specifically, I am 
> > having trouble understanding the help paragraph:
> > "This keyword can be useful if you want to write some optional code in a 
> > component that needs a class from a component that is not necessarily 
> > loaded by the main project using this component."
> > 
> 
> Suppose you implement a Graph class in gb.data which uses an adjacency
> matrix. So you have the normal graph stuff in the interface but also maybe
> a Matrix property that is specific to the Graph implementation via an
> adjacency matrix - and this property returns that matrix.
> 
> This is actually useful because you may want to do arithmetic on this matrix
> to find connected components, the number of triangles in the graph, etc..
> 
> However, you would want the datatype of the Matrix property to be the Matrix
> class of gb.gsl or the like so that users can readily operate on it. But you
> may also notice that some users don't really care about the matrix - they
> just want *some* graph or adjacency matrices scale well in their application
> - and are bothered by the dependency of gb.gsl you have just imposed.
> 
> Therefore, leave gb.gsl out and use "Class Matrix" in your Graph class.
> Those users who want to use the Matrix property will have to load gb.gsl
> themselves and everyone is happy.
> 
> Regards,
> Tobi
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
> 
> --
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sorting gridviews

2014-07-05 Thread B Bruen
Hi Tobi,

I too have implemented a similar approach to yours, but it is not what I was 
looking for.  I am trying to implement a sort over multiple columns, like 
"ORDER BY ColA ASC, ColC DESC, ColB ASC" in an sql query.  I just cannot get it 
right.  In fact, I have now decided that the easiest way is to create a 
temporary Sqllite db, fill it with the columns of the array and let it do the 
sorting.  Not an optimal solution but at least it works for the data sets we 
will be using it for.

regards
Bruce

On Wed, 25 Jun 2014 13:51:42 +0200
Tobias Boege  wrote:

> On Wed, 25 Jun 2014, B Bruen wrote:
> > Someone, recently, was discussing sorting gridviews over multiple columns. 
> > Tobi?
> > 
> > Was any progress made on this?
> > 
> 
> The project was finished some time ago. But likely the results will not
> please you because the code is not very integrative.
> 
> Basically, we model the GridView as an array of Record objects (the array is
> the rows, a Record describes the columns in the GridView). By a special
> RecordArray class which Inherits Record[] and a special _compare() method in
> Record, we can sort that RecordArray by any property of the Record objects.
> 
> So you must write a Record class for your specific purpose and have an array
> of them behind the scenes to populate the GridView with. Maybe you can tweak
> the code to be a bit more general... if you get it much more general, please
> tell me :-) [ IIRC, we have a SortField property in each Record object which
> we need to set for each object in the array before we sort. I think you can
> replace that with a static property if you never sort multiple arrays at the
> same time... ]
> 
> The code for the GridView is here[0] and also here[1] in the more abstract
> context of sorting multidimensional arrays. (The project archives are at the
> end of the article.)
> 
> Regards,
> Tobi
> 
> [0] http://www.gambas-buch.de/dw/doku.php?id=k17:k17.7:k17.7.4:start
> [1] http://www.gambas-buch.de/dw/doku.php?id=k7:k7.4:k7.4.9:k7.4.9.4:start
> 
> PS: I would prefer [1] over [0]. The code used in [0] was actually an early
> try from me and it uses the officially not supported possibility to override
> Variant[]. (Variant[] acts as both, a Record object and also as an array
> class for Variant[] objects there!)
> 
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
> 
> --
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IDE Feature Request

2014-07-05 Thread B Bruen
On Mon, 16 Jun 2014 17:36:43 +0200
Benoît Minisini  wrote:

> Le 16/06/2014 00:52, B Bruen a écrit :
> > ( Don't see why I shouldn't join in :-)  )
> >
> > Would it be possible to lock source files the same as for forms? This
> > would prevent me from changing the wrong class in a set of very
> > similar classes.
> >
> > Oh,and while you're there - the reload button on the form toolbar
> > seems to unlock a locked form!
> >
> > regards Bruce
> >
> 
> I didn't know that feature was used...
I often have 3 or more projects open, either copying some code from one to 
another or refactoring one based on the newer or bettter code in another.  
Invariably, if I don't pay proper attention, I end up changing the wrong 
project's code.  So locking class code would stop me making that mistake.

> 
> I will change the way it works, so that every file can be locked. I will 
> simply use the file read authorization.
Benoît,
Was this done yet?  Not bumping, just wondering.

> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

regards
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] creating gb.qt4.webkit pages using gb.markdown etc (quick question)

2014-07-05 Thread B Bruen
On Fri, 27 Jun 2014 23:15:14 -0600
Randall Morgan  wrote:

> I am not quit sure I understand what you mean the best way to build the how
> to form.
> 
> I use a web editor like Dreamweaver, Aptana Studio, etc. to create template
> pages. These pages are stored in the project folder. I then load the data
> needed to complete the page from a database, text or xml file. An entire
> page of content can be loaded this way.
> 
> I hope this helps
> 
Yes, thanks Randall. I was probably just too close to the problem to see the 
obvious solution.
(Talk about over-complicating things.)

Bruce

> 
> On Fri, Jun 27, 2014 at 10:02 PM, B Bruen  wrote:
> 
> > On Sat, 28 Jun 2014 09:44:00 +0930
> > B Bruen  wrote:
> >
> > > some stuff that was probably not well expressed.
> >
> > So I will try again.  What we have is:
> > * some text files in many of our projects that describe "how to" do
> > something in that application
> >  - by "how to" I mean stepwise descriptions of what actions need to be
> > done to complete a "business" level activity that is supported by the
> > application.  These activities are not capable of, say, being driven by a
> > wizard control or similar as they involve external parties and may take
> > hours, days, ... to complete.  The text files are there to provide (and
> > this is really the best description I can give them) an aide-mémoire for
> > the user's to go through the entire business activity.
> > * up till now we have used these doc files internally to reply to user
> > queries on these things, i.e. we reply by phone, fax or email with a "these
> > are the things that have to be done" message.
> >
> > What I want to do is provide a do-it-yourself solution so the users can
> > access the aide-mémoire files themselves. So it's sort of like a gambas
> > help browser thing I am trying to build.  The aide-mémoire "pages" are
> > fairly simple. A topic, a title and a list of the steps needed. As an
> > example, to change the ownership of a registered racing thoroughbred, which
> > is required by the "rules" here in Australia, the registered trainer must
> > submit a paper or fax form of up to 20 pages length to the national
> > registry organisation.  To prepare this paperwork could take the trainer an
> > hour or so.  Our gambas application does this in a few seconds. The steps
> > (manual) are:
> > 1) prepare the ownership change form
> > 2) submit the form to the registry
> > 3) wait ...  ... until the registry confirms that the change has been
> > approved and registered, or denied, or queried ...
> > 4) file the ownership papers appropriately.
> > Our application takes care of 1,2 and 4.  But looks more like:
> > 1) use menu item blah to prepare and submit ownership change documents to
> > registry
> >* the horse owners records will be updated, but marked as "pending"
> > 2) when the change confirmation is received, use menu item blah2 to update
> > owner records
> >   * the pending status will be removed and emails to the (changed) owners
> > will be sent automatically.
> >   * the new ownership schedule will be printed so you can file it
> > appropriately.
> > 3) if the change is denied or queried by the registry see the following
> > how-tos:
> >   * etc
> >
> >  And this is one of the simplest (haha) things one could imagine for the
> > arcane and bureaucratic ways things are run here. (You dont want to see
> > other examples.)
> >
> > So:
> > I want to build a how-to form in our trainer application that (simply) has
> > an index page and a set of dynamically generated pages (based) on some
> > simple text files. The index page will be static with just a set of links
> > that access the topic page.  I don't need or want anything fancier than
> > that... yet.
> > We are doing the following:
> > * these files are being actively converted to the gambas "markdown"
> > syntax.  Very simple, but time consuming due to the number of them (~300)
> > * trying to figure out the best way to build the "how-to" form.
> >
> > This last bit is what I am asking about.  I am "wishing" that there is a
> > really easy way to achieve the goals outlined above without having to
> > re-invent the wheel so to speak.
> >
> > Any input will be (really) gratefully recieved.
> >
> > tia
> > Bruce
> >
> > --
> > B Bruen 
> >
> >
> > ---

Re: [Gambas-user] Wishlist : gb.form.mdi ToolBar

2014-07-05 Thread B Bruen
On Sat, 05 Jul 2014 14:21:51 +0200
Benoît Minisini  wrote:

> Le 25/06/2014 04:32, B Bruen a écrit :
> > Is there any reason that the ToolBar control is constrained within 
> > gb.form.mdi?
> > I use it consistently, without needing the other controls in gb.form.mdi  
> > and would really like to see it just within gb.form as a general control.
> >
> > Maybe gb4?
> >
> > regards
> > Bruce
> >
> 
> Because the Toolbar is dependent on other internal features of gb.form.mdi.
> 
> But why is it a problem that you have to check "gb.form.mdi"?
> 
> -- 
> Benoît Minisini
> 
OK, no real problem (I just keep forgetting to add it and then my 
"train-of-thought" gets interupted.) 
B
-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.form.mdi : Attach/Detach

2014-07-01 Thread B Bruen
Yes, the gimp is probably a more common example.
B
On Tue, 1 Jul 2014 09:22:19 +0200
Fabien Bodard  wrote:

> So in a gimp way ?
> Le 1 juil. 2014 06:29, "B Bruen"  a écrit :
> 
> > I am doing some experiments with detachable tabs in the gb.form.mdi
> > component.  A couple of things have come to light that I would like to
> > suggest (as a basis for discussion, rather than a bug or whatever).
> >
> > 1) There is no way to completely detach a window from a workspace.
> > That is, for example: suppose I have two workspaces on a form (or to
> > abstract even further perhaps two workspaces on two concurrently active
> > forms) and I want to move the current tab from this workspace to that
> > workspace. I have proved I can do that almost successfully by, to put it at
> > its' simplest:
> >   Workspace1.Detach(hWindow)
> >   Workspace2.Add(hWindow)
> > but the association with Workspace1 remains and has some interesting side
> > effects.
> > So, it appears (to me) there is no way to completely dissociate hWindow
> > from its' original Workspace.
> >
> > 2) When a window is Attached to a Workspace it is not automatically made
> > the ActiveWindow.
> > This may be "by design" but if I want to make the ActiveWindow in code
> > then there does not seem to be anything like an "Attached" event in the
> > Workspace that I can catch to effectively make this automatic Activation
> > happen.
> > (I have found a reasonably simple workaround for this but it is not
> > "intuitively obvious".
> >
> > 3) Similar to 2) there is no "Detached" event available whereby I could
> > set some values in the Workspace concerned or even in the detached window
> > that would allow me to affect later processing.  That's obscure.  Suppose I
> > have, as above, two workspaces and when I detach a window from one I need
> > to know later "which workspace it was detached from", it would be nice to
> > say set the Tag property to the name of the "original workspace".  Either...
> >
> > 3a) Because I would like to implement a menuitem in the detached window
> > that would allow a "Re-attach" action.
> > 3b) Because  even when the window is detached I may like to Reparent it in
> > some other container  :-) tricky eh?
> >
> > 4) The Detach/Attach/Reparent methods are not exactly ... how can I say it
> >  developer friendly?
> > Suppose I want to move a window from a workspace to some other container.
> >  When the window is associated with a workspace, ReParent does not work -
> > and silently at that.  The window must first be detached and then
> > reparented.  Conversely, moving it from another container to a workspace
> > involves a (fake) reparent, then either a Workspace.Add or, given that
> > there is no completely detach method, a Workspace.Attach call.
> >
> > As I said, these things are not really bugs or complaints, rather a
> > "Request For Comment".  I have a demo project displaying some of these
> > things which I will post if there is some interest.
> >
> > But, imagine an IDE wherein you could have both the form design and the
> > form code visible at the same time in an hsplitter, or where you could have
> > two (or more) class codes visible at the same time, or the ability to move
> > one of the "bits" of the properties tab to the bottom "debug" panel of the
> > IDE, or even move the toolbox into a vsplitter under the project browser
> > instead of having it clutter the bottom of the properties sidepanel ... or
> > even for that matter moving the properties thing into the middle pane... or
> > or or. Get my drift?
> >
> > Anyone familiar with, for example, how the Modellio layouts can be
> > manipulated in this way will understand what could be achieved here for the
> > gambas IDE.
> >
> > regards and looking forward to comments
> > Bruce
> >
> > --
> > B Bruen 
> >
> >
> > --
> > Open source business process management suite built on Java and Eclipse
> > Turn processes into business applications with Bonita BPM Community Edition
> > Quickly connect people, data, and systems into organized workflows
> > Winner of BOSSIE, CODIE, OW2 and Gartner awards
> > http://p.sf.net/sfu/Bonitasoft
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lis

[Gambas-user] Two quick questions

2014-07-01 Thread B Bruen
1) "Run this form" seems to ignore the Margin and Spacing properties of 
containers within the form.  They work properly when the application main form 
is run.  Has anyone seen this - or have I done something odd?

2) Occasionally, when changing gb.form.mdi ToolBar properties, or the 
properties of toolbuttons therein, in the IDE suddenly when running the form 
containing the toolbar all the buttons are invisible - and not available in the 
Configure popup.  Further, when I look at the config file for the project the 
"Layout" slot for the toolbar has disappeared.  I have no idea what is causing 
this.  Has anyone else seen it?

rgrds
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gb.form.mdi : Attach/Detach

2014-06-30 Thread B Bruen
I am doing some experiments with detachable tabs in the gb.form.mdi component.  
A couple of things have come to light that I would like to suggest (as a basis 
for discussion, rather than a bug or whatever).

1) There is no way to completely detach a window from a workspace. 
That is, for example: suppose I have two workspaces on a form (or to abstract 
even further perhaps two workspaces on two concurrently active forms) and I 
want to move the current tab from this workspace to that workspace. I have 
proved I can do that almost successfully by, to put it at its' simplest:
  Workspace1.Detach(hWindow)
  Workspace2.Add(hWindow)
but the association with Workspace1 remains and has some interesting side 
effects.
So, it appears (to me) there is no way to completely dissociate hWindow from 
its' original Workspace.

2) When a window is Attached to a Workspace it is not automatically made the 
ActiveWindow.
This may be "by design" but if I want to make the ActiveWindow in code then 
there does not seem to be anything like an "Attached" event in the Workspace 
that I can catch to effectively make this automatic Activation happen.
(I have found a reasonably simple workaround for this but it is not 
"intuitively obvious".

3) Similar to 2) there is no "Detached" event available whereby I could set 
some values in the Workspace concerned or even in the detached window that 
would allow me to affect later processing.  That's obscure.  Suppose I have, as 
above, two workspaces and when I detach a window from one I need to know later 
"which workspace it was detached from", it would be nice to say set the Tag 
property to the name of the "original workspace".  Either...

3a) Because I would like to implement a menuitem in the detached window that 
would allow a "Re-attach" action.
3b) Because  even when the window is detached I may like to Reparent it in some 
other container  :-) tricky eh?

4) The Detach/Attach/Reparent methods are not exactly ... how can I say it  
developer friendly?
Suppose I want to move a window from a workspace to some other container.  When 
the window is associated with a workspace, ReParent does not work - and 
silently at that.  The window must first be detached and then reparented.  
Conversely, moving it from another container to a workspace involves a (fake) 
reparent, then either a Workspace.Add or, given that there is no completely 
detach method, a Workspace.Attach call.

As I said, these things are not really bugs or complaints, rather a "Request 
For Comment".  I have a demo project displaying some of these things which I 
will post if there is some interest.

But, imagine an IDE wherein you could have both the form design and the form 
code visible at the same time in an hsplitter, or where you could have two (or 
more) class codes visible at the same time, or the ability to move one of the 
"bits" of the properties tab to the bottom "debug" panel of the IDE, or even 
move the toolbox into a vsplitter under the project browser instead of having 
it clutter the bottom of the properties sidepanel ... or even for that matter 
moving the properties thing into the middle pane... or or or. Get my drift?

Anyone familiar with, for example, how the Modellio layouts can be manipulated 
in this way will understand what could be achieved here for the gambas IDE.

regards and looking forward to comments
Bruce 

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] making 6349

2014-06-29 Thread B Bruen
Interesting. It "just worked"  here.
Did you go though the entire "./reconf-all; ./configure -C; make" circus?

Bruce

On Mon, 30 Jun 2014 12:22:06 +1000
Shane  wrote:

> i get this error when trying to make version 6349
> 
> make[4]: Entering directory `/home/shane/trunk/gb.desktop.x11/src'
>CC gb_desktop_x11_la-main.lo
>CC gb_desktop_x11_la-x11.lo
>CC gb_desktop_x11_la-c_x11systray.lo
>CC systray/gb_desktop_x11_la-systray.lo
> rm: cannot remove 'systray/.libs/gb_desktop_x11_la-systray.o': 
> Permission denied
> Assembler messages:
> Fatal error: can't create systray/.libs/gb_desktop_x11_la-systray.o: 
> Permission denied
> make[4]: *** [systray/gb_desktop_x11_la-systray.lo] Error 1
> make[4]: Leaving directory `/home/shane/trunk/gb.desktop.x11/src'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/home/shane/trunk/gb.desktop.x11'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/shane/trunk/gb.desktop.x11'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/shane/trunk'
> make: *** [all] Error 2
> 
> 
> 
> --
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] creating gb.qt4.webkit pages using gb.markdown etc (quick question)

2014-06-27 Thread B Bruen
On Sat, 28 Jun 2014 09:44:00 +0930
B Bruen  wrote:

> some stuff that was probably not well expressed.

So I will try again.  What we have is:
* some text files in many of our projects that describe "how to" do something 
in that application
 - by "how to" I mean stepwise descriptions of what actions need to be done to 
complete a "business" level activity that is supported by the application.  
These activities are not capable of, say, being driven by a wizard control or 
similar as they involve external parties and may take hours, days, ... to 
complete.  The text files are there to provide (and this is really the best 
description I can give them) an aide-mémoire for the user's to go through the 
entire business activity.
* up till now we have used these doc files internally to reply to user queries 
on these things, i.e. we reply by phone, fax or email with a "these are the 
things that have to be done" message.

What I want to do is provide a do-it-yourself solution so the users can access 
the aide-mémoire files themselves. So it's sort of like a gambas help browser 
thing I am trying to build.  The aide-mémoire "pages" are fairly simple. A 
topic, a title and a list of the steps needed. As an example, to change the 
ownership of a registered racing thoroughbred, which is required by the "rules" 
here in Australia, the registered trainer must submit a paper or fax form of up 
to 20 pages length to the national registry organisation.  To prepare this 
paperwork could take the trainer an hour or so.  Our gambas application does 
this in a few seconds. The steps (manual) are:
1) prepare the ownership change form
2) submit the form to the registry
3) wait ...  ... until the registry confirms that the change has been 
approved and registered, or denied, or queried ...
4) file the ownership papers appropriately.
Our application takes care of 1,2 and 4.  But looks more like:
1) use menu item blah to prepare and submit ownership change documents to 
registry
   * the horse owners records will be updated, but marked as "pending"
2) when the change confirmation is received, use menu item blah2 to update 
owner records
  * the pending status will be removed and emails to the (changed) owners will 
be sent automatically.
  * the new ownership schedule will be printed so you can file it appropriately.
3) if the change is denied or queried by the registry see the following how-tos:
  * etc

 And this is one of the simplest (haha) things one could imagine for the arcane 
and bureaucratic ways things are run here. (You dont want to see other 
examples.)

So:
I want to build a how-to form in our trainer application that (simply) has an 
index page and a set of dynamically generated pages (based) on some simple text 
files. The index page will be static with just a set of links that access the 
topic page.  I don't need or want anything fancier than that... yet.
We are doing the following:
* these files are being actively converted to the gambas "markdown" syntax.  
Very simple, but time consuming due to the number of them (~300)
* trying to figure out the best way to build the "how-to" form.

This last bit is what I am asking about.  I am "wishing" that there is a really 
easy way to achieve the goals outlined above without having to re-invent the 
wheel so to speak.
 
Any input will be (really) gratefully recieved.

tia
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] creating gb.qt4.webkit pages using gb.markdown etc (quick question)

2014-06-27 Thread B Bruen
OK, I've got the markdown to html bit under control and can generate the inner 
html for  nicely for our "appinfo" text files. The next step is to 
generate the full html text for an entire web page, including the  
section with a css reference and applying some "class" attributes to parts of 
the html text.

Looking through the IDE code that makes the various help texts it looks like 
this is being done "manually" with a lot of literal strings being 
used?

My goal is to build a gb.qt4.webkit based project (component) that will display 
web pages with information about our applications from some text files we 
include in .hidden in the source project. (I can get these files out of the 
executable archive OK).  Sort of like the IDE help but a bit different.

My question is what is the best way for me to go next?
a) follow the IDE "hammer and chisel" method
b) look at the new wiki code,
or
c) is there something blatantly obvious that I am not seeing here?

tia
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] how to override opengl pkg-config requirements???

2014-06-27 Thread B Bruen
On Fri, 27 Jun 2014 10:04:26 -0430
PICCORO McKAY Lenz  wrote:

> Date: Fri, 27 Jun 2014 08:47:52 +0930
> From: B Bruen 
> 
> > Elsewhere I received advice to delete ALL the pkg-config files on the 
> > system in order to get a non-gambas
> >application to build properly.  Since I did that I have had no problems, 
> >neither with gambas3 nor other source builds.
> >There is information regarding the "pains" of pkg-config in various places 
> >on the internet, check first for some
> >related to your distro.
> that's not the case bruce, i used a older version of xorg that do not
> provide pkg-config files,
> 

This is, if I recall correctly, where the problem starts. The pkg-config files 
for other libraries are what causes the problem.  I can't say that I really 
understand what actually happens, but what I THINK is your gb.xyz configure (as 
built by the auto... tools) attempts to check via pkg-config for the direct 
requirements of your gb.xyz library and then cascades through each of the 
required libraries specified in that library's .pc (???) file and checks for 
them etc etc. But just because gb.xyz needs libabc (which resolves to 
libabc.so.1.2.3 or whatever, which is nicely installled and dynamically 
linkable) then in the libabc.pc file it says they require libOzarquon - which 
you dont have. So the build fails!  Also I THINK that the error gets 
"incorrectly" reported as can't find libabc.so which is actually there.

If you delete the libabc.pc file from your system, the cascasing checks don't 
get invoked. This gb.xyz builds properly ( and links to libabc properly as 
well).

So I suspect that somewhere on your system, there is a .pc file that thinks it 
requires some libXfordprefect library or something.

Now - how the toolchain works is dependant on your distro. So you need to find 
any help on this (known) pkg-config issue specific for your distro and go from 
there. I believe the pkg-config spec files are generally suffixed ".pc" and 
tend to live in /lib/pkg-config but again this maybe distro specific.

Here, I deleted all the .pc files and magically could make the non-gambas app 
successfully. When I next maked the gambas3 development version about 
n-thousand warnings disappeared and the overall build took about half the time 
(and the gb.sdl components all suddenly worked, which I could never get to 
happen before).



> so i must parse all linker and includes manually, how i can do that? i
> cannot see in configure script before run autopoint

That's my point, you would have to inspect all the .pc files for the entire 
dependency tree specified therein to find the anomaly (or anomalies!). 
Manually. i.e. not a good idea.
If deleting these files scares you (as it did me the first time) then just 
backup the pkg-config dir somewhere as they (the .pc files) are actually just 
text files containing the  specifications to "help" the dynamic linker.  Then 
delete all those files (leaving the /lib/pkg-config dir "almost" empty). Then 
try the gambas build again.  If the result is still failure then just copy all 
those .pc files back in and look elsewhere for the problem.


hth
Bruce

> 
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
> 

p.s. Oh and googling for "What are .pc files" is a BAD idea. You will get a LOT 
of disinformation. Better to start with something like " 
pkg-config fail" and got from there.

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] The Class keyword

2014-06-26 Thread B Bruen
As in :
CLASS Identifier
   Declares to the compiler that Identifier can be used as a class name.

I am unsure of what this keyword really achieves.  Specifically, I am having 
trouble understanding the help paragraph:
"This keyword can be useful if you want to write some optional code in a 
component that needs a class from a component that is not necessarily loaded by 
the main project using this component."


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] how to override opengl pkg-config requirements??? building gambas from trunk

2014-06-26 Thread B Bruen
On Thu, 26 Jun 2014 21:06:37 +0200
Benoît Minisini  wrote:

> Le 26/06/2014 20:53, PICCORO McKAY Lenz a écrit :
> > i already compiled gambas 3.2 opengl module for lenny xorg 7.4 in
> > past, but now in 3.5 trunk seems gambas need pkg-config files to find
> > opengl requirements..
> >
> > i mean, if i have opengl and xorg on a custom setup as example...
> >
> > how can i override configure script to supply the opengl requirements?
> > due i got this on debian lenny (venenux 0.8):
> >
> > configure: WARNING: Unable to met pkg-config requirement: gl
> > configure: WARNING: gb.opengl is disabled
> > no
> > configure: WARNING: Unable to met pkg-config requirement: gl
> > configure: WARNING: gb.opengl.glsl is disabled
> > no
> > configure: WARNING: Unable to met pkg-config requirement: glu
> > configure: WARNING: gb.opengl.glu is disabled
> > no
> > configure: WARNING: Unable to met pkg-config requirement: gl
> > configure: WARNING: gb.opengl.sge is disabled
> >
> > ||
> > || Unable to met pkg-config requirement: gl
> > || gb.opengl is disabled
> > || Unable to met pkg-config requirement: gl
> > || gb.opengl.glsl is disabled
> > || Unable to met pkg-config requirement: glu
> > || gb.opengl.glu is disabled
> > || Unable to met pkg-config requirement: gl
> > || gb.opengl.sge is disabled
> > ||
> >
> >
> >
> 
> Why don't you have the pkg-config files for the OpenGL library if you 
> have pkg-config?
> 
> -- 
> Benoît Minisini
> 

Elsewhere I received advice to delete ALL the pkg-config files on the system in 
order to get a non-gambas application to build properly.  Since I did that I 
have had no problems, neither with gambas3 nor other source builds. There is 
information regarding the "pains" of pkg-config in various places on the 
internet, check first for some related to your distro.

hth
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] constructor events

2014-06-25 Thread B Bruen
On Wed, 25 Jun 2014 09:15:01 +0200
Fabien Bodard  wrote:

> I really dont understand in what case it can be usefull
> 
> Your observer in all case will be created after the object so in this case
> just call a subroutine will do the same
> 
> If you need an info during the init you can give it as param
> 
> Please give more explanation of what you want to achieve
> 
> Regards
> 
> Fabien

It's to do with a class that handles a continuous XML feed for a set of similar 
feeds.  So we have a main form class that creates up to 15 or so instances of a 
"feed watcher" class, each looking at one specific thread.  We have certain 
handlers in the main class that respond to events raised in the feed-watcher 
class.  Once the feed-watcher object is fully instantiated these event handlers 
work fine and the set of feeds is managed fine.  However, some of these events 
can occur during the feed-watcher constructor execution.  Since we already have 
the code to handle them in the main form, I was hoping to not have to create 
special error conditions etc sent back from the feed-watcher._new method, but 
just to raise the relevant during the constructor.

The feeds are from a url like 
"www.xyz.com/auctions/lots.aspx?year=2014&month=6&day=26&lot=113#1".  Where 113 
is one of a set of lot numbers we are interested in.  These feed-watchers set 
up the download structure, get the initial xml result and parse it (read on), 
then wake up on a timer basis and re-request the same url, get the result (its 
an XML document), parse it and depending on some changes to the parsed 
information, raise events that signal to the main form that something has to be 
done, for example, the bidding on that lot has started, finished, etc .  As 
it's an internet based feed, there are some other things that can also happen 
that we need to handle - download errors, loss of connection etc. Further, 
depending on the auction house concerned, setting up the download structure and 
getting the initial packet is complex. So we have a set of these feed-watcher 
classes specialised to handle that initial work.
 
The problem is that some of the conditions that result in the raising of these 
events can also happen during the construction of the feed-watcher object, e.g. 
loss of connection, but also some of the information based events, e.g the 
requested lot has been "cancelled" etc.

As I said, once the feed is established,everything works fine.  It's just that 
initial phase.

The more I think about it, the more I am convinced that it cannot work the way 
we have designed and written it. And we will have to split the initial phase 
into a constructor and an "Initialise" method. So never mind.

(Well, you did ask :-) )

regards
Bruce 


-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Getting the "un-specialed" XMLElement.TextContent string

2014-06-25 Thread B Bruen
On Wed, 25 Jun 2014 09:21:30 +0200
Fabien Bodard  wrote:

> $title = xmlnode.deserialize(raceNode.Attributes["RaceName"])
> 
> No? B-)

Ah, OK. Thanks, the fact that it was a static function hadn't sunk in.

regards
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Form ALT+CLICK Not Move

2014-06-24 Thread B Bruen
On Wed, 25 Jun 2014 13:08:10 +0930
B Bruen  wrote:

> On Wed, 25 Jun 2014 12:53:41 +0930
> B Bruen  wrote:
> 
> > On Tue, 24 Jun 2014 20:34:09 -0600
> > herberth guzman  wrote:
> > 
> > > Fabien
> > > I think He want to disable the ability of x to move a windows with alt +
> > > mousedown
> > > 
> > > Benoit
> > > Fabien says what is right. What I need is to disable the ability of x to
> > > move a windows with alt + mousedown
> > > 
> > > 
> > > Thanks
> > > 
> > > Regards,
> > > 
> > > Herberth
> > 
> > Herbeth,
> > 
> > Be careful of what you wish for. Moving a window is a user decision.  I 
> > have a non-gambas application (a uml toolkit) that does this and it is an 
> > almighty pain in the ARS*!  In fact I avoid using it as much as possible. 
> > Consider a situation where a user has multiple monitors. Claiming the 
> > central or startup monitor as "MINE" could be considered rude at least 
> > 
> > Bruce
> > 
> > -- 
> > B Bruen 
> > 
> > 
> 
> And as a perfect example, we work in a situation where there is a W*ND*Ws  
> POS touchscreen system alongside our linux based screens. When their POS 
> collapses the error popup falls behind the screen-grabbing POS application, 
> which then appears totally locked.  On the other hand, if something terrible 
> happens to our screen app then Alt-Tab and Alt+mousemove lets us find the 
> error popup.
> 
> I wish I had a $ for each time the user has watched me drag the main window 
> aside, get the error and click the "FixThis" button ... and then said "Well 
> why cant you do that here too" 
> 
> best wishes, I suppose you have reasons.
> 
> B
> 

And here's my favourite example of linux gui stupidity. (not the uml modeller 
mentioned above by the way).  Modelio.  Modelio is a java UML tool. When you 
start it, which takes the standard 15 seconds or so, they display a  flash 
screen that occupies every virtual desktop.  Unmoveable and unhideable.  Great, 
I could answer 3 emails in that time ... if I could see them.  8 desktops and 
every one of them has a bloody great red box of meaningless artistic bulldust 
in the middle of it. User friendly rating - visceral. 
-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Form ALT+CLICK Not Move

2014-06-24 Thread B Bruen
On Wed, 25 Jun 2014 12:53:41 +0930
B Bruen  wrote:

> On Tue, 24 Jun 2014 20:34:09 -0600
> herberth guzman  wrote:
> 
> > Fabien
> > I think He want to disable the ability of x to move a windows with alt +
> > mousedown
> > 
> > Benoit
> > Fabien says what is right. What I need is to disable the ability of x to
> > move a windows with alt + mousedown
> > 
> > 
> > Thanks
> > 
> > Regards,
> > 
> > Herberth
> 
> Herbeth,
> 
> Be careful of what you wish for. Moving a window is a user decision.  I have 
> a non-gambas application (a uml toolkit) that does this and it is an almighty 
> pain in the ARS*!  In fact I avoid using it as much as possible. Consider a 
> situation where a user has multiple monitors. Claiming the central or startup 
> monitor as "MINE" could be considered rude at least 
> 
> Bruce
> 
> -- 
> B Bruen 
> 
> 

And as a perfect example, we work in a situation where there is a W*ND*Ws  POS 
touchscreen system alongside our linux based screens. When their POS collapses 
the error popup falls behind the screen-grabbing POS application, which then 
appears totally locked.  On the other hand, if something terrible happens to 
our screen app then Alt-Tab and Alt+mousemove lets us find the error popup.

I wish I had a $ for each time the user has watched me drag the main window 
aside, get the error and click the "FixThis" button ... and then said "Well why 
cant you do that here too" 

best wishes, I suppose you have reasons.

B

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Form ALT+CLICK Not Move

2014-06-24 Thread B Bruen
On Tue, 24 Jun 2014 20:34:09 -0600
herberth guzman  wrote:

> Fabien
> I think He want to disable the ability of x to move a windows with alt +
> mousedown
> 
> Benoit
> Fabien says what is right. What I need is to disable the ability of x to
> move a windows with alt + mousedown
> 
> 
> Thanks
> 
> Regards,
> 
> Herberth

Herbeth,

Be careful of what you wish for. Moving a window is a user decision.  I have a 
non-gambas application (a uml toolkit) that does this and it is an almighty 
pain in the ARS*!  In fact I avoid using it as much as possible. Consider a 
situation where a user has multiple monitors. Claiming the central or startup 
monitor as "MINE" could be considered rude at least 

Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Wishlist : gb.form.mdi ToolBar

2014-06-24 Thread B Bruen
Is there any reason that the ToolBar control is constrained within gb.form.mdi?
I use it consistently, without needing the other controls in gb.form.mdi  and 
would really like to see it just within gb.form as a general control.

Maybe gb4?

regards
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Sorting gridviews

2014-06-24 Thread B Bruen
Someone, recently, was discussing sorting gridviews over multiple columns. Tobi?

Was any progress made on this?

(Gee, I am having a busy day today, aren't I? :-) Actually, we are cleaning up 
a lot of old outstanding things.)

tia
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] markdown to html?

2014-06-24 Thread B Bruen
On Wed, 25 Jun 2014 10:04:41 +0930
B Bruen  wrote:

> On Wed, 25 Jun 2014 01:42:09 +0200
> Benoît Minisini  wrote:
> 
> > Le 25/06/2014 01:23, B Bruen a écrit :
> > > @Benoît
> > >
> > > Hi, could you tell me where (exactly) in the IDE code you convert
> > > markdown text to html please.  I would like to use that code for my
> > > own nefarious purposes :-)
> > >
> > > tia Bruce
> > >
> > 
> > In the gb.markdown component in the development version.
> > 
> > -- 
> > Benoît Minisini
> > 

In the Markdown.class you have the Create keyword appearing by itself (line 4). 
 This does not appear to be covered by the Help. What does that do?

tia 
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] modifying an enumerated set during the loop

2014-06-24 Thread B Bruen
On Wed, 25 Jun 2014 02:43:11 +0200
Benoît Minisini  wrote:

> Le 25/06/2014 02:30, B Bruen a écrit :
> > I realise that modifying the enumerated set during a For Each loop is
(Cut)
> 
> No. An array is an object, and aTest a variable that owns a *reference* 
> to the array. If you set aTest to NULL, you just remove the reference, 
> not the array by itself, which is referenced by the FOR EACH instruction 
> until it ends.
> 
> -- 
> Benoît Minisini
> 

Ah, OK. So using 
  If Not aTest Then Break
during the loop appears to resolve the situation.

thanks
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] markdown to html?

2014-06-24 Thread B Bruen
On Wed, 25 Jun 2014 01:42:09 +0200
Benoît Minisini  wrote:

> Le 25/06/2014 01:23, B Bruen a écrit :
> > @Benoît
> >
> > Hi, could you tell me where (exactly) in the IDE code you convert
> > markdown text to html please.  I would like to use that code for my
> > own nefarious purposes :-)
> >
> > tia Bruce
> >
> 
> In the gb.markdown component in the development version.
> 
> -- 
> Benoît Minisini
> 

Doh! :-\ I've been trying to find it in the IDE help code.

Thanks
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] modifying an enumerated set during the loop

2014-06-24 Thread B Bruen
I realise that modifying the enumerated set during a For Each loop is fraught 
with danger but I do have a situation where this is "necessary". The following 
is a very simplified mock up of an anomaly in gambas that I am seeing.  The 
real situation is complex, I'll explain it later in this post.

The following code shows several variants of changing the enumerated set during 
the loop.  (I could have also attached a source archive, but its probably 
quicker to just paste this in a new project main module.) The simulation is 
simply a "rocket launch count-down" .

Public Sub Main()

  Dim aTest As String[]
  Dim sItem As String
  
  ' Run 1: Simple enumeration (obviously works)
  aTest = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
  aTest.Reverse
  For Each sItem In aTest
Print sItem
  Next
  Print "Blast off"
  
  ' Run 2: Nullify the whole array during the enumeration (continues as if 
enumeration is working on a copy)
  aTest = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
  Debug aTest
  aTest.Reverse
  Debug aTest ' prove that this is not duping the`array
  For Each sItem In aTest
Debug aTest
Print sItem
If sitem = "8" Then aTest = Null ' but the enumeration continues???
  Next
  Print "Blast off"
  Print aTest = Null
  
  ' Delete (all) elements within the enumeration
  aTest = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
  aTest.Reverse
  For Each sItem In aTest
Print sItem
If sitem = "8" Then 
  aTest.Delete(0, aTest.Count) ' leaves a non-null but empty array, the 
loop exits once this has been executed
Endif
  Next
  Print "Blast off"

End

Run 1 is just a simple enumeration, no changes are made to the set during the 
loop (sanity check !).
In Run 2, when the count gets to 8 we nullify the entire array. However, the 
enumeration loop still continues and includes all the elements from the 
original array???
In Run 3, when the count gets to 8 we delete the entire array. Now the 
enumeration stops at that point. This is what I would expect in Run 2???

In our real situation, we receive a bunch of xml "packets" (a packet being a 
complete xml document) that are queued for processing in such an array. Quite 
often, the list of packets to  be processed includes duplicate, or earlier, 
versions of some information relevant to a specific entity identified within 
the packet. So once we have processed the latest version, hence the array 
reversal, all packets containing earlier information regarding that entity are 
irrelevant.

In the real code we don't actually delete or nullify the queue array, but use a 
separate routine to remove the elements in the array that are no longer 
relevant, sometimes this will empty the reversed array entirely (or at least 
the rest of it). Now, as the Run 3 example works as I expect, i.e. the loop is 
"truncated", generally everything is fine. But, there are uncommon, but not 
infrequent, situations where the entire array can be nullified, this is what 
scares me as the code that handles this entire mess is spread out over multiple 
tasks and such like.

So, shouldn't the Run 2 loop truncate like Run 3?

regards
Bruce 

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] constructor events

2014-06-24 Thread B Bruen
(I don't know whether I have already asked this.)

Is it possible to raise events in a class constructor and trap them in an 
observing class?
Looking at it, I don't think the object exists yet and so the answer appears to 
be no (and my experiments seem to bear this out) but I am asking anyway in case 
there is something I'm missing.

tia
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] markdown to html?

2014-06-24 Thread B Bruen
@Benoît

Hi, could you tell me where (exactly) in the IDE code you convert markdown text 
to html please.  I would like to use that code for my own nefarious purposes 
:-) 

tia
Bruce

-- 
B Bruen 

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


  1   2   >