[Gambas-user] Packaging - rpmbuild

2012-05-06 Thread Bruce Bruen
Me again! :-)

Houston , we have a problem!

I'm not too sure how to characterise this but, I'll start along these
lines:

1) I'm fairly sure that rpmbuild (and friends) depends on some pretty
stable autotools stuff in the source archive.  For this reason I have
been harping on about getting the autotools packager right.

2) Nasty and only diagnosed tonight !-(  rpmbuild looks in the
packager's home dir for a couple of nicely hidden and cryptic files
called .rpmrc and .rpmmacros.

  .rpmrc appears to contain the i-whatever architecture translates, viz:
buildarchtranslate: i386: i586
buildarchtranslate: i486: i586
buildarchtranslate: i586: i586
buildarchtranslate: i686: i586

  .rpmmacros on the other hand has some stuff that are important, viz
%_topdir/home/bb/src/rpm
%_tmppath   /home/bb/src/tmp
%packager   paddys-hill
%distribution phhorse
%distsuffix ph12
%vendor Paddys-Hill_dot_Net

3) I'm pretty sure that we are using a generic and reasonably stable
version of rpmbuild:
  [bb@bluecow ~]$ rpmbuild --version
  RPM version 4.8.1

asideI am aware that there are (ahem) later versions available, but
not on sourceforge. (Ahem! and the changelog IMHO looks a little like a
mad cow on steroids who has lost her Valium prescription.)/aside

4) We build rpm packages for our clients outside gambas.  Which work.
So I'm not too amendable to the idea of mucking around with these files
to suit the gambas packager.

5) The problem, as far as I am able to see with my limited knowledge of
rpm builds, is the (_topdir) and (_tmppath) macros. These tend to
override the places that the gambas rpm builder scripts are looking for
stuff, in particular the source archive.

If you are still reading by now, God bless you.  I've been trying to
track this down for 12 hours straight.  

E'en more. I really would appreciate it, if you do know a heck of a lot
about rpmbuild, that you let me know so we can fix this and add it back
to gambas.

Bruce







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


Re: [Gambas-user] Gambas 3 arrays usage

2012-05-06 Thread Bruce Bruen
Oops.
There was no racial slur intended there. 
B

In fact I'm particularly fond of the belle cuisine française
especially dishes like escargots grillés au beurre avec des
champignons, les échalotes, le piment, l'ail et du fromage de lait de
chèvre dans les cendres.

... damn I just knew that google would get it wrong again...

Forester escargots

B



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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-06 Thread Bruce Bruen
On Mon, 2012-05-07 at 01:20 +0200, Benoît Minisini wrote:
 The autotools packager should work anyway, even if a component with no 
 exported class seems to not be really useful. :-)
 
OK, (but I wouldn't really consider this worth fixing)

Source archive for a no exports component attached.

Here's the output from the ./configure|make|make install for an
autotools package made from the project:
[bb@bluecow noinfo-0.0.1]$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gambas3 binaries... Ok
checking for gambas3 components path... Ok
configure: creating ./config.status
config.status: creating Makefile
[bb@bluecow noinfo-0.0.1]$ make
Building noinfo component...
OK
[bb@bluecow noinfo-0.0.1]$ su
Password: 
[root@bluecow noinfo-0.0.1]# make install
make[1]: Entering directory `/home/bb/testpkg/noinfo-0.0.1'
Installing noinfo.gambas in /usr/local/lib/gambas3
Installing noinfo.component in /usr/local/lib/gambas3
Installing noinfo.info in /usr/local/share/gambas3/info
/usr/bin/install: omitting directory `.info'
chmod: cannot access
`//usr/local/share/gambas3/info/noinfo.info': No such file or
directory
Installing noinfo.list in /usr/local/share/gambas3/info
/usr/bin/install: cannot stat `.list': No such file or directory
chmod: cannot access
`//usr/local/share/gambas3/info/noinfo.list': No such file or
directory
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/bb/testpkg/noinfo-0.0.1'
[root@bluecow noinfo-0.0.1]# 




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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-05 Thread Bruce Bruen
(New sub-thread) .info has disappeared

If a project has its type set to Component now, when it is compiled
(or Make Executable) there is no .info file created in the project
directory any more.

Is this by design?

(Because the autotools  install  target is still looking for it and
fails.  I can help fix the autotools scripts but I need to know if .info
has disappeared on purpose.)

Bruce


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-04 Thread Bruce Bruen
Subtopic autotools

autotools now works like a dream.  We have been distributing stuff via
autotools for several days now and have only come across the following
problem.

make uninstall (as root) appears to work but in fact doesn't.  Given
that we have installed sysinfos-0.0.2.tar.gz via the usual 
  unpack/cd src dir/ config/make/(root)make install 
then we can see it quite well via:

[root@bluecow ~]# which sysinfos.gambas 
/usr/local/bin/sysinfos.gambas

However, when I try to use the uninstall target, I get:

[root@bluecow sysinfos-0.0.2]# make uninstall
Removing sysinfos.gambas file... rm /usr/local/bin/sysinfos.gambas
[root@bluecow sysinfos-0.0.2]# 

which appears to have worked at face value, but in actual
fact /usr/local/bin/sysinfos.gambas still exists!!

[root@bluecow sysinfos-0.0.2]# ll /usr/local/bin/sys*
-rwxr-xr-x 1 root root 6820 May  4
22:08 /usr/local/bin/sysinfos.gambas*

(I have also tried the make uninstall-am and make unistall-locall
with no better result, but I don't think that is an issue.)


Observations:
1) There doesn't seem to be an uninstall target in the makefiles that
I can see so I can't add any value here.
2) Although, obviously root could simply
rm /usr/local/bin/sysinfos.gambas, there really should be a working
target.

regards
Bruce

p.s. The source (and autotools) packages for sysinfos is in the
related post Distributing Libraries etc.


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-04 Thread Bruce Bruen
On Sat, 2012-05-05 at 02:45 +0200, Benoît Minisini wrote:
 Le 04/05/2012 23:34, Benoît Minisini a écrit :
 
  I don't like any of those solution at the moment.
 
  And if I define a compilation constant that will tell the compiler if we
  are making an executable or not? That way, you will just have to add a
  #If Executable (or something like that) to compile or not compile the
  startup function ?
 
 
 This is the solution I implemented in revision #4715. Tell me if it fits 
 your needs.
 
 Regards,
 
Benoît,

I'm trying it but I need a bit of help on usage.  (I'm using a library
that has a startup form not a module.  Is this a bad idea?)

Public Sub Form_Open()

#If Executable
  Me.Center
  LoadInfos
#Else
  Error This is a library.\nPlease do not run it directly
  Message.Title = Don't do that!
  Message.Error(This is a library.\nPlease do not run it directly,
OK)
  Quit
#Endif

End

If I compile the project and run it via gbx3, I get the expected Don't
do that messages, but if I run it in the IDE I get the same thing.

Bruce


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-04 Thread Bruce Bruen
On Fri, 2012-05-04 at 23:19 +0200, Benoît Minisini wrote:
 Le 04/05/2012 15:25, Bruce Bruen a écrit :
  Subtopic autotools
 
  autotools now works like a dream.  We have been distributing stuff via
  autotools for several days now and have only come across the following
  problem.
 
  make uninstall (as root) appears to work but in fact doesn't.  Given
  that we have installed sysinfos-0.0.2.tar.gz via the usual
 unpack/cd src dir/ config/make/(root)make install
  then we can see it quite well via:
 
   [root@bluecow ~]# which sysinfos.gambas
   /usr/local/bin/sysinfos.gambas
 
  However, when I try to use the uninstall target, I get:
 
   [root@bluecow sysinfos-0.0.2]# make uninstall
   Removing sysinfos.gambas file... rm /usr/local/bin/sysinfos.gambas
   [root@bluecow sysinfos-0.0.2]#
 
 
 I think a -f option is missing to the 'rm' command thre. I will add it 
 in the next revision, and you will tell me if it works.
 
 Regards,
 
Benoît,

Also missing a ; on the previous line!

Diff attached

Bruce
Index: Makefile.am
===
--- Makefile.am(revision 4715) 
+++ Makefile.am(working copy) 
@@ -48,7 +48,7 @@
  rm -f $(DESTDIR)/$(GBINFO_path)/$(PACKAGE).list; \
  rm -rf $(DESTDIR)/$(GBCONTROL_path)/$(PACKAGE); \
 else \
- echo Removing $(PACKAGE).gambas file... \ 
+ echo Removing $(PACKAGE).gambas file...; \ 
  rm -f $(DESTDIR)$(bindir)/$(PACKAGE).gambas; \
 fi)
 
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-04 Thread Bruce Bruen
Thanks,
Works fine now.
Bruce

On Fri, 2012-05-04 at 23:17 +0200, Benoît Minisini wrote:
 Le 02/05/2012 06:54, Bruce Bruen a écrit :
  Hi folks!
 
  (I'm getting pretty excited about the packager now.)
 
 
  Benoît,
 
  Please consider this little change for the autotools packager code in
  the IDE.
 
  We use a lot of common images in our projects.  Corporate identity etc
  etc blah blah...  Rather than have copies of all these in the projects
  we symbolic link them in.  (So we only have one set of images to manage
  not lots!)
 
  Unfortunately, the links created in the IDE are relative to the project
  directory,  e.g. PHlogo.png would be linked in referencing something
  like ../../common/images/logos/paddys-hill/PHlogo.png
 
  When the project is copied to the temporary build dir in the packaging
  process, these links are now incorrect.
 
  The following diff (also attached) corrects this by adding the L option
  to the cp command so that symbolic links are snapped.
 
  Index: Package.module
  ===
  --- Package.module(revision 4702)
  +++ Package.module(working copy)
  @@ -1383,7 +1383,7 @@
  Try sCmd = Scan(Project.GetCompileCommand(True, Not
  Project.KeepDebugInfo, False), */bin/gbc  System.Version   *)[1]
 
  'Mkdir sBuildDir/ Project.Name
  -  Shell cp -r   Shell$(Project.Dir) Shell$(sBuildDir/
  Project.Name) Wait
  +  Shell cp -rL   Shell$(Project.Dir) Shell$(sBuildDir/
  Project.Name) Wait
  sFile = Replace(File.Load(install/acinclude.m4), $(VERSION),
  CStr(System.Version))
  sFile = Replace(sFile, $(PACKAGE_VERSION), $sVersion)
  sFile = Replace(sFile, $(EXTRA_TEST), Project.ExtraAutoconfTest)
 
 
  regards
  Bruce
 
 
 OK, done.
 



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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-04 Thread Bruce Bruen
On Sat, 2012-05-05 at 03:59 +0200, Benoît Minisini wrote:
 Le 05/05/2012 03:42, Bruce Bruen a écrit :
  On Sat, 2012-05-05 at 02:45 +0200, Benoît Minisini wrote:
  Le 04/05/2012 23:34, Benoît Minisini a écrit :
 
  ...
 
  And if I define a compilation constant that will tell the compiler if we
  are making an executable or not? That way, you will just have to add a
  #If Executable (or something like that) to compile or not compile the
  startup function ?
 
 
  This is the solution I implemented in revision #4715. Tell me if it fits
  your needs.
 

 The constant is Exec. I try to use Gambas keywords, because it is 
 easier for the preprocessor (that is not entirely finished).
 
 Regards,
 


OK! I got it now, e.g.

Public Sub Main()

  Debug Application.Startup.Name
#If Exec
' This code is executed when running outside the IDE
  Debug I am the executable
  Error Please don't run this file!
#Else
' This code is only executed when running inside the IDE
  Debug Not an executable
  Print Executing some test code
' Test1
' Test2
' etc
#Endif

End


Yes, it looks as though this will fit our needs.  I feel that I need to
do some further testing on real example libraries, just to be sure.
(But I have some other things to do now, it's Saturday here. So I'll get
back to you in a few days.)

Bruce


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-01 Thread Bruce Bruen
On Tue, 2012-05-01 at 12:22 +0200, Benoît Minisini wrote:
  A lot of answers to a lot of stuff, so I'm going to break it up into several 
 posts.

 Le 29/04/2012 06:45, Bruce Bruen a écrit :
 
  SUGGESTION: Libraries should not need to have a startup class.  At
  the moment I must include a dummy module to prevent any
  test-harness code leaking into the user environment (which could
  cause damage if the library were to be run as a normal gambas
  executable.)  At the moment the IDE will not let a library be made
  into an executable or packaged unless it has a startup class.  It
  would be preferable that projects defined as libraries would not
  execute via the runtime, that way test harness code could be left in
  place.  Currently I have to check that the coders have left the
  startup class pointing to the following:-
 
  ' Gambas module file
 
  ' Null module to provide a fake startup point
 
  Public Sub Main()
 
  Error Please do not run this as a program. It is a gambas library.
 
  End
 
 
 Mmm. You are right, for libraries the IDE should let you not defined a
 startup class. I will see what I can do.
 
I think that (the IDE should let you not defined a startup class) is
an overkill.  What I need is a way to use a startup class in a library
when I'm developing it but when it is packaged the startup class should
be removeable.

To explain, during development/debug/support for a library, we need to
be able to run it as a normal project through the IDE.  This is what I
meant about test harnesses.  In general, we have a MMain module in the
library that may, or in fact usually, contains code that lets us enter
method parameter values manually.  This type of code if used by an
ill-advised user could cause great havoc on an underlying database or
the like.

What I would like is a way to manually disable or turn off the startup
class when the library project is made as an executable or is packaged.

I suppose that the alternative is to not allow startup classes in
libraries or components and keep changing the project type to Normal
when we are debugging/supporting but I can foresee a lot of mistakes if
that route is chosen.  

The way I see it is this.  (Hypothetically) I've just spent some time on
the phone to Mr Jones and it appears that there is, amazingly, a problem
in the xyzzzy library. I open the xyzzy project and using the test
harness code therein I find that we did in fact code a logic error when
some date parameter to a dual timezone function is exactly the date and
time that daylight savings changed in one of the timezones.  ( I kid you
not, this happened recently!)  So I give the problem to the wizkids, er
sorry, my brilliant development team, and they come up with a nicely
tested solution.  

So now all I want to do is turn off the startup class, compile and make
the distributable version and send it out. 

With a bit of thought... maybe what libraries/components need is a
startup class that only works within the IDE...

hmm!

Bruce


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-01 Thread Bruce Bruen
On Tue, 2012-05-01 at 12:22 +0200, Benoît Minisini wrote:

  In reply to my:

  Not sure about this as far as the autotools packager is concerned.
  The icon.png is certainly in the gzip file (but is this because
  autotools is a source level package?)
 

 autotools is not reliable at the moment as it didn't get the same recent
 modifications as the other package types.


Lately the autotools package has been very stable!  In fact that is how
we are currently distributing the apps to 28 customers (yes, I lost a
couple to a very feature poor windows web based app... but they'll be
back!)

I wrote a gambas app that runs the autotools extract / reconf /
configure / make series and that gets them updated with very few
problems.  If I could just find a way of running the su/sudo/whatever
make install bit across 28 different distros I'd be ecstatic!

My comment was only an observation regarding the inclusion of project
icons in packages.

rgrds
Bruce
 


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-01 Thread Bruce Bruen
On Tue, 2012-05-01 at 12:22 +0200, Benoît Minisini wrote:
in reply to my
  I tried using the Mandriva and Fedora RPM based packaging, which
  allowed me to create proper looking distribution packages, but ...
 
  When I tested the installation locally I run into the following
  problem. There is a dependency requirement on gambas-runtime
  version 3.blahblah ... This makes sense except that there is no
  gambas-runtime for my home made system, I build and install from
  the source archive. Also, this is how we have set it (gambas) up on
  all the client's machines. Is there a way to remove this dependency
  from being included in the RPM package build?
 

 A binary package system relies of being used totally. You cannot have 
 some of the dependencies outside of it (i.e. installed from sources), it 
 breaks the system.
 
 This is the reason why Gambas should be packaged eveywhere. :-/
 

This, of course, makes perfect sense in a binary distro world.  
All I can say is Such is life!. (Cest la vie? ??? I dunno, my high
school French memories seem to have faded.)

Sigh! I suppose that I, or one of the code-pixies, are going to learn
how to package Gambas itself.  :-)

rgrds
Bruce 
 



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


Re: [Gambas-user] Two problems, might be local

2012-05-01 Thread Bruce Bruen
On Tue, 2012-05-01 at 02:49 +0200, Benoît Minisini wrote:
 Le 01/05/2012 02:03, Bruce Bruen a écrit :
  Final comments for now.
 
 ...
 
  To check this out you'd need a project with a form with a DateChooser
  already in it.  But because of this issue, I cannot create one!  If you
  need more info I'll see if I can fudge one up out of an existing project
  by deleting extraneous stuff...
 
  Bruce
 
 
 Things should be OK in revision #4702.
 
 Regards,
 
Yep, looks much better now!

Thanks
Bruce


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-01 Thread Bruce Bruen
Oh I forgot!

A new problem.  Spaces in the vendor name cause fails in the rpm
builder.

This is not a high priority issue, but it would be nice if spaces in the
Vendor name field in the wizard were converted to underscores before
it was used in the rpm build.

But then again, it's probably only an issue to imbeciles like me that
register their company name as something like Paddys-Hill dot Net.


best regards
(I'm going to bed now)

Bruce

 



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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-05-01 Thread Bruce Bruen
Hi folks!

(I'm getting pretty excited about the packager now.)


Benoît,

Please consider this little change for the autotools packager code in
the IDE.

We use a lot of common images in our projects.  Corporate identity etc
etc blah blah...  Rather than have copies of all these in the projects
we symbolic link them in.  (So we only have one set of images to manage
not lots!)

Unfortunately, the links created in the IDE are relative to the project
directory,  e.g. PHlogo.png would be linked in referencing something
like ../../common/images/logos/paddys-hill/PHlogo.png

When the project is copied to the temporary build dir in the packaging
process, these links are now incorrect.

The following diff (also attached) corrects this by adding the L option
to the cp command so that symbolic links are snapped.

Index: Package.module
===
--- Package.module(revision 4702) 
+++ Package.module(working copy) 
@@ -1383,7 +1383,7 @@
   Try sCmd = Scan(Project.GetCompileCommand(True, Not
Project.KeepDebugInfo, False), */bin/gbc  System.Version   *)[1]
 
   'Mkdir sBuildDir / Project.Name
-  Shell cp -r   Shell$(Project.Dir) Shell$(sBuildDir /
Project.Name) Wait  
+  Shell cp -rL   Shell$(Project.Dir) Shell$(sBuildDir /
Project.Name) Wait  
   sFile = Replace(File.Load(install/acinclude.m4), $(VERSION),
CStr(System.Version))
   sFile = Replace(sFile, $(PACKAGE_VERSION), $sVersion)
   sFile = Replace(sFile, $(EXTRA_TEST), Project.ExtraAutoconfTest)


regards
Bruce
Index: Package.module
===
--- Package.module(revision 4702) 
+++ Package.module(working copy) 
@@ -1383,7 +1383,7 @@
   Try sCmd = Scan(Project.GetCompileCommand(True, Not Project.KeepDebugInfo, False), */bin/gbc  System.Version   *)[1]
 
   'Mkdir sBuildDir / Project.Name
-  Shell cp -r   Shell$(Project.Dir) Shell$(sBuildDir / Project.Name) Wait  
+  Shell cp -rL   Shell$(Project.Dir) Shell$(sBuildDir / Project.Name) Wait  
   sFile = Replace(File.Load(install/acinclude.m4), $(VERSION), CStr(System.Version))
   sFile = Replace(sFile, $(PACKAGE_VERSION), $sVersion)
   sFile = Replace(sFile, $(EXTRA_TEST), Project.ExtraAutoconfTest)--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Two problems, might be local

2012-04-30 Thread Bruce Bruen
Since today I have had the following happen - see the screenshot.

1) The first time I try to Make Executable in the IDE I get that blue
balloon.

2) Also, as soon as a change is made to a code line that pops up the
mini help, then strange things occur. For example, if I type App
then the help popup appears as it should but then the busy cursor
appears and never goes away, (as if Dec Application.Busy never happens
in the IDE?) But! I can keep doing things, in fact anything (so far) but
actually run the app from the IDE. You can see the busy cursor in the
screenshot.

I am asking because I am fairly sure that we have a local qt4 problem
that I haven't been able to convince the qt folks of:

It is seen as - 
symbol lookup error: /usr/lib/libQtSql.so.4: undefined symbol:
_ZN14QObjectPrivateD2Ev
on a gambas program exit, whether or not we are using the qt4 GUI or
gtk.

But has anyone else seen these?

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


Re: [Gambas-user] Two problems, might be local

2012-04-30 Thread Bruce Bruen
Aha!

Got the location of the Bad event handler (error message attached)

And it's the DateChooser control that does it.

Reproduce:
1 Create new graphical project
2 Open the main form
3 Drag a date chooser onto it.

Bruce





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


Re: [Gambas-user] Two problems, might be local

2012-04-30 Thread Bruce Bruen
Final comments for now.

1) Is the previous method I posted that causes the IDE crash
reproduceable?

2) in the IDE Project.module, in the LoadFile function, towards the
bottom of the function is the following code:

Files[sPath] = hForm
If hForm Then
  bError = hForm.LoadFile() ==HERE!
  If bError Then
Files[sPath] = Null
Try hForm.Delete
Dec Application.Busy
Return
  Endif
  hForm.Icon = GetFileIcon(sPath, 16)
Endif

If hForm Then FSearch.OnNewForm(hForm)

Dec Application.Busy

  Endif

  Return hForm

'Catch

  Dec Application.Busy
  Files[sPath] = Null
  FMain.ShowError((Cannot open file.)  \n\n  Error.Text  \n 
Error.Where, sPath)

End

The issue I'm seeing occurs at the bError = hForm.LoadFile() line
(line 1835 in my rev).
When this executes and the Bad Event handler error occurs, the
LoadFile function exits immediately, thus leaving Application.Busy
undecremented.

Should that Catch be commented??


To check this out you'd need a project with a form with a DateChooser
already in it.  But because of this issue, I cannot create one!  If you
need more info I'll see if I can fudge one up out of an existing project
by deleting extraneous stuff...

Bruce


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


Re: [Gambas-user] About library and component packaging in Gambas 3

2012-04-28 Thread Bruce Bruen
Hi Benoit,

A few comments inline...

regards
Bruce

On Sat, 2012-04-28 at 15:26 +0200, Benoît Minisini wrote:
 Hi,
 
 I'm continue in fixing problems in library and component packaging. Here 
 are the last news...
 
 Since revision #4687, there is now a project type option in the project 
 properties dialog, which allows to make the difference between a normal 
 project, a library and a component.
 
 What are the differences between the three types?
 
 1) LIBRARY

SUGGESTION: Libraries should not need to have a startup class.  At the 
moment I must include a dummy module to prevent any test-harness code
leaking into the user environment (which could cause damage if the
library were to be run as a normal gambas executable.)  At the moment
the IDE will not let a library be made into an executable or packaged
unless it has a startup class.  It would be preferable that projects
defined as libraries would not execute via the runtime, that way test
harness code could be left in place.  Currently I have to check that the
coders have left the startup class pointing to the following:-

' Gambas module file

' Null module to provide a fake startup point

Public Sub Main()
  
  Error Please do not run this as a program. It is a gambas library.
  
End
 

 
 - There is a library/component properties dialog.
 - No icon is packaged.
Not sure about this as far as the autotools packager is concerned.  The
icon.png is certainly in the gzip file (but is this because autotools is
a source level package?) 

 - No menu entry is defined in the package.
 - The package name is projectname-X.Y.Z where X.Y.Z is the version.
 - The vendor can be added as a prefix optionally.
Are there any pros and cons here?

 - The package has dependencies on other components and libraries checked 
 in the project properties dialog.
This is unclear.  I was under the assumption that the Project Properties
dialog Components and Libraries tabs indicated the items that are needed
when running the library within the IDE (i.e. in test mode) and the
Component Properties dialog defined the dependencies for the library
when it runs as a library i.e. in another application (whether that
application is running in the IDE or via gbx3).
We use a few private libraries to develop and test the libraries we
distribute to users and the approach I have been using is to include
them in the Project Properties dialog but not the Component
Properties dialog.  (Again, this relates back to including test harness
code in the library and perhaps Issue 123.) Could you clarify please.

Further, it is unclear what the Extra Dependencies step in the RPM
based packagers is for?  Perhaps a little note in the header, similar to
the Extra files step.

 
 2) COMPONENT
 
 - There is a library/component properties dialog.
 - No icon is packaged.
 - No menu entry is defined in the package.
 - If the project has control icons, they are packaged.
 - The package name is gambas-vendor-projectname-X.Y.Z where X.Y.Z is 
 the version.
 - The vendor prefix is mandatory, it is gb by default.
 - The package has no dependencies on other components and libraries. 
 This is supposed to be managed directly by the IDE. Components are a 
 special beast that should be included directly in Gambas sources.
Again,this last bit is unclear.  We use some custom control components
in our product.  Some of which have dependencies on native gb
components, e.g. gb.db and at least one of which is dependent on another
home grown component (i.e. our phDataControls component is dependent
on both gb.db and our phBaseControls component.  This has worked fine
until now.  I haven't checked this yet but does it mean that from 4687
on, that this will no longer work?

 
 3) NORMAL PROJECT
 
 - There is no library/component properties dialog.
 - The make executable dialog can create a desktop shortcut automatically.
 - The packager has an icon and a menu entry.
 - The package name is ProjectName-X.Y.Z where X.Y.Z is the version.
 - The vendor can be added as a prefix optionally.
 - The package has dependencies on other components and libraries checked 
 in the project properties dialog.
 
 Please try it and give your remarks!
 
 Regards,
 

I have checked the autotools packaging (which is how we have hitherto
been distributing our product to end users) and it works fine.

I tried using the Mandriva and Fedora RPM based packaging, which allowed
me to create proper looking distribution packages, but ...

When I tested the installation locally I run into the following problem.
There is a dependency requirement on gambas-runtime version
3.blahblah ... This makes sense except that there is no gambas-runtime
for my home made system, I build and install from the source archive.
Also, this is how we have set it (gambas) up on all the client's
machines.  
Is there a way to remove this dependency from being included in the RPM
package build?  

regards
Bruce



Re: [Gambas-user] Can't see array contents in the debugger any more?

2012-04-25 Thread Bruce Bruen
On Tue, 2012-04-24 at 14:15 +0200, Benoît Minisini wrote:
 Le 14/04/2012 11:58, Bruce Bruen a écrit :
  On Fri, 2012-04-13 at 18:17 +0930, Bruce Bruen wrote:
  Some days ago I updated to rev4607, since then I can't see the contents
  of arrays in the debugger.  It displays the array class instead.
 
  Any input please?
 
  regards
  Bruce
 
  Benoît,
  (Sorry about the out of line reply. I accidentally deleted your mail.)
 
  Here is a screen shot of what I get when I try to look at the statelist
  array.
 
 
  Bruce
 
 
 And if you click on the lamp icon in the debugger watch window?
 
Well, as of 4653 this problem has gone away.  Magic??

To answer your question, what I got was a very skinny (thin? emaciated?
narrow?) row underneath the Bounds row (about 1mm high) that was
selectable but didn't actually show anything.  

I think I'll just go with the flow and leave this one up to the
gremlins.  

cheers
Bruce

 


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


[Gambas-user] Rev 4651 compile error with gb.xml

2012-04-21 Thread Bruce Bruen
reconfig-all completed OK
configure -C completed OK
make went well until the xml components ...

Making all in gb.libxml
make[2]: Entering directory `/home/bb/trunk/gb.libxml'
make  all-recursive
make[3]: Entering directory `/home/bb/trunk/gb.libxml'
Making all in src
make[4]: Entering directory `/home/bb/trunk/gb.libxml/src'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I/usr/include/libxml2 -pipe -Wall -Wno-unused-value
-fsigned-char -fvisibility=hidden -g -Os  -MT main.lo -MD -MP
-MF .deps/main.Tpo -c -o main.lo main.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2
-pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os
-MT main.lo -MD -MP -MF .deps/main.Tpo -c main.c  -fPIC -DPIC
-o .libs/main.o
mv -f .deps/main.Tpo .deps/main.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I/usr/include/libxml2 -pipe -Wall -Wno-unused-value
-fsigned-char -fvisibility=hidden -g -Os  -MT CXMLNode.lo -MD -MP
-MF .deps/CXMLNode.Tpo -c -o CXMLNode.lo CXMLNode.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2
-pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os
-MT CXMLNode.lo -MD -MP -MF .deps/CXMLNode.Tpo -c CXMLNode.c  -fPIC
-DPIC -o .libs/CXMLNode.o
mv -f .deps/CXMLNode.Tpo .deps/CXMLNode.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I/usr/include/libxml2 -pipe -Wall -Wno-unused-value
-fsigned-char -fvisibility=hidden -g -Os  -MT CXMLReader.lo -MD -MP
-MF .deps/CXMLReader.Tpo -c -o CXMLReader.lo CXMLReader.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2
-pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os
-MT CXMLReader.lo -MD -MP -MF .deps/CXMLReader.Tpo -c CXMLReader.c
-fPIC -DPIC -o .libs/CXMLReader.o
mv -f .deps/CXMLReader.Tpo .deps/CXMLReader.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I/usr/include/libxml2 -pipe -Wall -Wno-unused-value
-fsigned-char -fvisibility=hidden -g -Os  -MT CXMLWriter.lo -MD -MP
-MF .deps/CXMLWriter.Tpo -c -o CXMLWriter.lo CXMLWriter.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2
-pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os
-MT CXMLWriter.lo -MD -MP -MF .deps/CXMLWriter.Tpo -c CXMLWriter.c
-fPIC -DPIC -o .libs/CXMLWriter.o
mv -f .deps/CXMLWriter.Tpo .deps/CXMLWriter.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -I/usr/include/libxml2 -pipe -Wall -Wno-unused-value
-fsigned-char -fvisibility=hidden -g -Os  -MT CXMLDocument.lo -MD -MP
-MF .deps/CXMLDocument.Tpo -c -o CXMLDocument.lo CXMLDocument.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2
-pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os
-MT CXMLDocument.lo -MD -MP -MF .deps/CXMLDocument.Tpo -c CXMLDocument.c
-fPIC -DPIC -o .libs/CXMLDocument.o
mv -f .deps/CXMLDocument.Tpo .deps/CXMLDocument.Plo
/bin/sh ../libtool --tag=CC   --mode=link gcc -pipe -Wall
-Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os  -module
-o gb.libxml.la -rpath /usr/local/lib/gambas3 main.lo CXMLNode.lo
CXMLReader.lo CXMLWriter.lo CXMLDocument.lo -lxml2   
libtool: link: gcc
-shared  .libs/main.o .libs/CXMLNode.o .libs/CXMLReader.o .libs/CXMLWriter.o 
.libs/CXMLDocument.o   /usr/lib/libxml2.so -ldl -lz -lm -Wl,-soname 
-Wl,gb.libxml.so.0 -o .libs/gb.libxml.so.0.0.0
libtool: link: (cd .libs  rm -f gb.libxml.so.0  ln -s
gb.libxml.so.0.0.0 gb.libxml.so.0)
libtool: link: (cd .libs  rm -f gb.libxml.so  ln -s
gb.libxml.so.0.0.0 gb.libxml.so)
libtool: link: ( cd .libs  rm -f gb.libxml.la  ln -s
../gb.libxml.la gb.libxml.la )
make[4]: Leaving directory `/home/bb/trunk/gb.libxml/src'
make[4]: Entering directory `/home/bb/trunk/gb.libxml'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/bb/trunk/gb.libxml'
make[3]: Leaving directory `/home/bb/trunk/gb.libxml'
make[2]: Leaving directory `/home/bb/trunk/gb.libxml'
Making all in gb.xml
make[2]: Entering directory `/home/bb/trunk/gb.xml'
make  all-recursive
make[3]: Entering directory `/home/bb/trunk/gb.xml'
Making all in src
make[4]: Entering directory `/home/bb/trunk/gb.xml/src'
Making all in .
make[5]: Entering directory `/home/bb/trunk/gb.xml/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-I..-Wall -fexceptions -pedantic -Wextra -Woverloaded-virtual
-Wfloat-equal -Wno-write-strings -Wpointer-arith -Wcast-qual
-Wcast-align -Wconversion -Wshadow -Wredundant-decls -Wdouble-promotion
-Winit-self -Wswitch-default -Wswitch-enum -Wundef -Wlogical-op -Winline
-Wno-missing-field-initializers -Wno-unused-parameter -g -ggdb -std=c
++0x -MT gb_xml_la-main.lo -MD -MP -MF .deps/gb_xml_la-main.Tpo -c -o
gb_xml_la-main.lo `test -f 'main.cpp' || echo './'`main.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -Wall -fexceptions
-pedantic -Wextra -Woverloaded-virtual 

[Gambas-user] Can't see array contents in the debugger any more?

2012-04-13 Thread Bruce Bruen
Some days ago I updated to rev4607, since then I can't see the contents
of arrays in the debugger.  It displays the array class instead.

Any input please?

regards
Bruce


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


Re: [Gambas-user] Gambas3 andLinux on WinXP

2012-04-12 Thread Bruce Bruen
On Thu, 2012-04-12 at 12:58 +0200, Rolf-Werner Eilert wrote:
 Am 09.04.2012 12:09, schrieb Randall Morgan:
  I've used virtualbox from Sun Micro for my Windows Vista and 7 laptops to
  run Linux. Makes it simple and takes up only a little more space.
 
 
 Though it's slightly off-topic here :-) I don't hesitate to ask back 
 here. In our environment in the firm with Win7 only running on one 
 machine in the account office for the accounting programs and the rest 
 running on a Linux server with LTSP and thin clients, it would be quite 
 useful to have one of the Gambas programs for the Win7 machine. Now I 
 have to write programs for Win and Linux if I want access to data on the 
 server from both places.
 
 So I tried to use Virtual Box as a thin client, and it runs quite nice, 
 but then it pauses (and seems to wait for something) every two minutes 
 or so. This pausing lasts for 15 - 50 seconds, so the solution proved 
 unusable.
 
Rolf,
I know a fair bit about running it the other way around (hereafter OWA),
i.e. using VBox to host a windows OS on a Linux base, but not much about
hosting a Linux OS on a Windows base.  But here goes.
The first things I would look at are:
1) Is the VBox Linux OS system drive (aka /) local to the Windows
machine or is it on the LAN?  I have seen something similar when I was
running a set of alternate distros in VBox where their disk images were
on a NFS server.  I couldn't understand why, now and then, disk
contention seemed to occur.
2) Another OWA issue seems to be the virtlan0 network connection (or
whatever it's called).  This seems to be an ongoing issue with VBox.
It, in my opinion contends too much with the real network I/F's and low
level things like arp. Unfortunately, I have not found a really solid
solution and usually resort to killing the virtlan0 IF.  (Your mileage
may vary.)
3) Make sure that the virtual machine has absolutely no swap.  In other
words it should be able to run without any swap contention (otherwise
you have it swapping into/outof it's pretend memory, then into/outof
the hosting memory/swap and then, dog forbid, in and out of Microsoft's
memory mismanagement system.


...

In fact, this is where I would really be looking.  Make sure that the
VBox is grabbing the maximum possible (I'll rephrase that, the MAXIMUM
POSSIBLE) memory space on the host machine.  If the users complain that
they cant VOIP their being-friend or can't google/face-tube/ubook etc
while the accounting system batches are being posted then that is a
problem that only they can solve.

...

 
 In my case, a virtual machine as a thin client is not the only way. 
 There is a samba drive on the Linux server which serves the Windows, so 
 I could as well start a whole Linux in Virtual Box and access that drive 
 to fetch the data, but the terminal server is surely the more efficient way.
 
 So, all I would like to know is if you have an idea what could cause 
 these pauses as I haven't found anything about it.
 
 Regards
 
 Rolf
 

hth
Bruce


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


Re: [Gambas-user] About Visual Studio Express

2012-04-03 Thread Bruce Bruen
On Tue, 2012-04-03 at 10:09 +0100, jm wrote:
 On Wed, 2012-03-28 at 15:40 +0300, Demosthenes Koptsis wrote:
  These days i started to test Visual Studio Express 2010 to compare it 
  with Gambas3.
  
  Does anyone have any experience with VB Studio Express ?
  
  Are there any characteristics that may be we wanted to see in Gambas3 ?
  
  Thank you !
 
 I don't do VB, but here is one feature I would sorely appreciate.
 
 [This may be too much to ask.]
 
 I do 'frenzied' amounts of Gambas programming when on a roll, and keep
 hitting one brick wall often.
 
 The most common problem is knowing what objects are what and their
 properties and methods in an easy way that doesn't interfere with
 'frenzied' programming and debugging flow.
 
 Take something like the object Application.Path which you might find
 in code.
 
 When I double click Application, it highlights that part of the text.
 When I then right click, I get a pop up menu to insert a break point,
 cut, paste, copy, etc. All nice. What I also want is an info menu
 option added to the pop up menu.
 

Try double clicking on Application and then hitting F2 ( or even just
click the cursor somewhere in Application and hit F2).  If you really
want it on the context menu, try Find Definition.

 The info menu will open a sub menu with first item titled help.
 If I click help, it launches a web browser of choice and a html file
 that documents that object.
 The remaining items in the sub menu is all the properties and methods of
 Application object can be set to, and if I click on any of those I get
 help on each of those sub properties.
 
 If I highlight the Path in Application.Path, and then right click,
 the info menu should change context to pull out help files
 relating to Path.
 

Not really sure  what you mean by help files relating to Path. but if
the cursor is positioned in the Path part of Application.Path, then F2
(or the context menu Find Definition) brings up the help on
Application.Path for me OK.

 The closest I can get to at the moment is to type Application.
 and as soon I enter the . a pop up displays all the properties and
 methods which allows one to guess the parameters of Application
 and effectively in an indirect way obtain limited help on Application
 object.
 
 The same scheme of info menu can be extended for all the other objects
 such as TextBox1.Text etc. The info menu will discover the object type
 that has been selected and populate the sub menus with all the
 correct values so that help can be obtained instantly on any object
 and property or method.
 
 In my opinion it will help a lot with rapid programming and debugging
 flow.
 
  aside ###
 
 As an aside, HTML documentation is becoming a lot easier to manage.
 If the HTML file is opened with konqueror, then install kompiz as well
 for editing the HTML file. After installing kompiz, right clicking a
 document in konqueror brings up a menu with option
 Open With . Clicking that opens a sub menu that lists kompiz. Click
 on the kompiz and hey presto, the HTML file is now opened for WYSIWYG
 editing!
 
 The edited files can be saved. So the next time you press for HTML based
 help through the info method, you got the most up to date help file that
 you personally updated with code fragments and helpful notes.
 Developers can contribute their personal help files back to the project.
 
 It would be good to offer the option to keep a duplicate copy of html
 directory as a personal html directory that does not get over written
 when new versions of gambas are installed.

On this, I have no idea.

Cheers
Bruce


--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] (no subject)

2012-03-20 Thread Bruce Bruen
On Tue, 2012-03-20 at 10:03 +0100, Mathias Maes wrote:
 Hello,
 
 Gambas is great, but there is one small thing why it isn't widly used. No
 cross-platform.
 Well, I know only a little bit of the inner workings of Gambas, but:
 
 I've been looking to a lot of event-driven Basic dialects, and the best
 one, that was most widely useable: RealBasic.
 Why? Just because it one-click compiles to Windows/Mac/Linux. Altough,
 porting everything to Windows/Mac is not realistic and not desirable.
 
 This is just my opinion, so any comments are most welcome. A short list:

I suppose that there exists, somewhere, in some uncharted galaxy,
lifeforms that would like to see their Linux applications  work on other
operating systems.  Me, nyah.  I'm more interested in converting other
operating system sufferers into Linux users and ultimately advocates.

Let me explain a bit of background.  I started seriously using Linux
whenever it was that XP2 SP3 came out, after having used Windows since
3.0 (yes!).  Until that (XP2.SP3) disaster was released I had been a
true believer that Microsoft would continue to improve and enhance what
appeared to be a reasonable platform for developing and deploying small
business and bespoke software applications.  By bespoke, I mean very
niche, very specific applications that suited a small customer audience.

I did some, what I consider to be nice applications using MSAccess and
VBA that until about 6 years ago netted me a liveable income.
When .net, asp, php, MSSQL server came out I tried porting the bases of
those applications. BLUH! All I ended up with was a need to employ
JUNIOR programmers to try to fix all the problems that arise from such a
wide, mismanaged, buggy and IMO useless set of platforms.

(Aside. These were not insignificant pieces of software, they include
apps that extract and match patient details from government pathology
databases and present the data for statistical analysis, apps that
review and correlate mining information from aerial surveys, and a few
others.  The point being, they were complex and of very little use to a
wide audience.)

Around about 4 years ago I met a man who had a very, very specific
problem.  There was no software available on commercial platforms that
could solve it .. in the manner that he wanted.  He was a trainer of
thoroughbred race horses and just wanted a program that would let him
manage his horses training schedules, trials, race entries etc etc
etc^99.   
 
In other words, he knew exzactly what he wanted and exzactly what he
didn't want.  He had been fighting to run a business for ten years,
paying a large amount of money to a bunch of spreadsheet pirates and
never getting that exzactly.

At that time I knew exactly zero about the horse racing industry.  (I
reckon I now know about 2% of it :-;  ) Also, co-incidentally I had just
discovered Gambas 2, which looked (from my point  view) like where VBA
should have gone in the first place.  So, I said (heroically as usual
when faced by a challenge), How about I come down and see what (those
exzactlies are ... and see if I can come up with a answer.

Short cut to end of story.  We, (private company with 4 employees) now
have 36 customers. All 36 are using Linux to run their training regimes.
This year, 2011-12 we are basically breaking even, and even hope ... X
fingers .. to make a little profit.  (Benoit, you'll be the second to
know!).  

A few technical details:
Base gambas deployment - gambas 2 (stability - around 97% (a few
outstanding gb2 features still exist, but mainly we have workarounds)
Code size - approx 23,000 lines. GASP! Relax, this includes comments,
design notes, TODO's etc. There is, at a guess maybe 7-8 thousand
executable lines, of code.
Underlying database - postgresql. Do not even think of attempting to
suggest something different starting with M.
The database is both segmented and distributed. Each trainer can see
their own data, but no-one elses. Each trainer has their own copy of
their own data. The central database exists mainly as a backup for the
trainers local db. It currently has over 14,000,000 rows.  We do provide
some views into the central db regarding public data like scheduling
for trials.  This includes my biggest nightmare regarding timezones, as
some trainers reside in one state (timezone) and trial in another.

Current projects:
1) Move EVERYTHING to gb3!
1.1) Move all clients to gb3

2) About 29 gazillion requested enhancements. Only one has priority, we
currently use nightmare code to parse trackwork details.  Let me
explain. The trackwork manager has an Android pad (I will not support
any other product!) At the moment all they can do is email in the
mornings trackwork data. It has to be in a specific format and THEY have
to make sure it is formatted correctly.  Now it would be kind of nice if
they had, say, something like a webpage to enter the details into ...
hmmm, haven't I heard talk about that somewhere around here?

Do I want to take on the 

Re: [Gambas-user] gambas and components

2012-03-19 Thread Bruce Bruen
On Mon, 2012-03-19 at 22:42 +1030, GMail wrote:
 On Mon, 2012-03-19 at 11:43 +0100, Karl Reinl wrote:
  Salut,
  
  my question is for gambas2 and later for gambas3 
  
  I have an app, which uses gambas (home made) components.
  
  What does these components know about the app.
  
  What I'm looking for is, how can I call a Function in the app, 
  out from the component, to report what has be done.
  
  If I try 'Form.Function()', I get 'unknown Symbol' error
  
  I know I can use the disk for passing something backwards, but I would
  first ask if there is a way.
 Karl, 
 I don't know whether this will help in your case but there is a way to
 do this ... for examples where the component class is inherited by an
 application class.
 
 Due to the virtual dispatch used by gambas, the actual method called
 will be the inherited method.
 
 So (for general readers) if you consider a component containing a base
 class Fred that is inherited by a class in the main application, say
 SonOfFred, then when some local call in Fred, for example
 Fred.Describe, if this method is also provided in SonOfFred then the
 actual method, SonOfFred.Describe is invoked.
 
 But in this case, there is a trick needed in gambas 3.  You need to
 provide a stub method in the base class, to stop the IDE/compiler
 complaining. Let me expand.  If SonOfFred has a method Decode that you
 wish to be able to be called (or in fact, invoked by the base class in
 some way,) then you need to create a stub method in Fred.  I see this as
 the base class defining a method that must be overridden, IOW a sort of
 virtual method.  Mainly I implement the stub to raise an error if it is
 invoked, i.e. in Fred we have:
 
   Public Sub Decode()
 Error.Raise(Decode not overridden correctly)
   End
 
 In your case though (assuming that by Form you mean the native gambas
 Form class), this will not work.  The only quick answer I can think of
 is to use an event in the component that is going to (hopefully) be
 handled adequately in the application.  Bit of a lottery though.
 
 Or perhaps I haven't quite got your central issue here?
 
 Bruce
 
On rereading what I just said, I think I wrote a when you have a
hammer, everything looks like a nail answer.

Send more details on what your problem/goal is.
B


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


Re: [Gambas-user] gb3: how to check if event is pending execution before it triggers

2012-03-17 Thread Bruce Bruen
On Sat, 2012-03-17 at 02:04 -0400, Kevin Fishburne wrote:
 Is there a way to check if an event is going to trigger in advance? 
Not in the known universe.  It would be nice though, Lotto numbers,
stock price changes etc etc :-)

 My startup procedure (GUI.Main) allows two event procedures to trigger, 
 Render.Screen_Draw (SDL) and Network.UDP_Read (UDP socket). When 
 Screen_Draw triggers I need to know if there are pending UDP packets so 
 I can avoid rendering the frame until those pending network events are 
 processed. The logic would look something like this:
 
 Public Sub Screen_Draw()
If [there is data in the socket] Then Return
[render a complete frame]
 End
 
 Basically I need to give processing incoming UDP packets priority over 
 rendering frames since processing the packets is quick but rendering a 
 frame is slow. I only want it to render a frame when there are no 
 incoming UDP packets needing attention. I've been thinking about logical 
 ways to do this, but if there is some inherent GAMBAS way that would be 
 more elegant.
 
Could you use some global counter to achieve this?
For every UDP packet received, inc the counter and dec it on UDP_Read
(or zero it?)
Then Screen_Draw need only check that the counter is zero.

I don't really know whether this will work for you but from your
description it does sound like a classic semaphore problem. ???

hth
Bruce


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


Re: [Gambas-user] IIf syntax

2012-03-16 Thread Bruce Bruen
On Fri, 2012-03-16 at 22:42 +0100, Benoît Minisini wrote:
 Le 16/03/2012 22:21, Emil Lenngren a écrit :
  Yeah, I alreadyd did that ^^
  It says a is an integer even though it should be a string...
  I think it is not really meant that you should be able to pass functions
  into IIf...
 
  /Emil
 
 
 In revision #4557, I have forbidden the use of Class or Function values 
 in IIf() and in the array constructor [ ... ].
 
 Regards,
 
I hope this means that the many hundreds of display code lines I have
like:

gvwHorse[r,c].Text = IIf(IsNull(CurrentHorse.Age),N/R,Format
$(CurrentHorse.Age,##))

are still going to work?

Bruce


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


[Gambas-user] Um, any reason for this?

2012-03-06 Thread Bruce Bruen
appname symbol lookup error: /usr/lib/libQtSql.so.4: undefined
symbol: _ZN14QObjectPrivateD2Ev

All new database using apps exit with code 127 and that message

Um, using postgresql in these apps.
Er, not using any gb.dbform libraries.


?

I'm on r4534

c file /usr/lib/libQtSql.so.4
/usr/lib/libQtSql.so.4: symbolic link to `libQtSql.so.4.7.3'

c file /usr/lib/libQtSql.so.4.7.3 
/usr/lib/libQtSql.so.4.7.3: ELF 32-bit LSB shared object, Intel 80386,
version 1 (SYSV), dynamically linked, stripped


Any clues??

bruce


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Um, any reason for this?

2012-03-06 Thread Bruce Bruen
On Tue, 2012-03-06 at 11:44 +0100, Benoît Minisini wrote:
 Le 06/03/2012 10:47, Bruce Bruen a écrit :
  appname symbol lookup error: /usr/lib/libQtSql.so.4: undefined
  symbol: _ZN14QObjectPrivateD2Ev
 
  All new database using apps exit with code 127 and that message
 
  Um, using postgresql in these apps.
  Er, not using any gb.dbform libraries.
 
 
  ?
 
  I'm on r4534
 
  c  file /usr/lib/libQtSql.so.4
  /usr/lib/libQtSql.so.4: symbolic link to `libQtSql.so.4.7.3'
 
  c  file /usr/lib/libQtSql.so.4.7.3
  /usr/lib/libQtSql.so.4.7.3: ELF 32-bit LSB shared object, Intel 80386,
  version 1 (SYSV), dynamically linked, stripped
 
 
  Any clues??
 
  bruce
 
 
 Mmm, no. There is a problem on your system apparently?
 
OK, will investigate .


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Bug? Gambas3

2012-03-05 Thread Bruce Bruen
h. Not that I can see.
Could you be a bit more informative.
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Expander control - two questions

2012-02-16 Thread Bruce Bruen
Hi folks,

1) Is it possible to change the height of the header of the expander,
i.e. the bit that remains visible when it is collapsed?
At the moment, it is too high for one line and too short for two.

2) Is it possible to change the height of the expanded view depending on
the size of its' contents, when the contents are a view control?

I would like to use the expander as a fancy combo box, with a tableview
inside it, listing selections in some detail and when a selection is
made, then showing a summary of the selected row in the tableview.

I have attached a mock-up of what I am trying to do.

regards
Bruce


formpagelayout-0.0.1.tar.gz
Description: application/compressed-tar
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Date to string MMddyyyyHHmmss

2012-02-07 Thread Bruce Bruen
On Tue, 2012-02-07 at 00:24 -0800, abbat wrote:
 How to get a Date without any separators, splash and dots?
 
 In VB.NET  I can get it by:
 Dim T = Now.ToString(MMddHHmmss)
 
 I get 02062012192533
 
 In HOW TO I could not find such exemple.
 
 Thanks
abbat,
The answers to many of you questions are in the gambas help files.
You could perhaps avail yourself of these before posting such basic
questions.
The first thing I would suggest is to try and stop thinking in terms of
VB.NET!  Gambas is not VB.NET nor is it a clone of VB.NET, please try
and think in gambas terms and not in VB.NET terms.  I say this because
a) we have all gone through the learning curve for gambas, again it's
all in the help files, and b) some of us can get a bit upset by the
constant reference to this works in VB.NET, why not in gambas
questions.
I will say one more thing, the gambas help files are very correct and
they are also VERY SUCCINCT. In other words, you need to read every word
on a help page and grasp its' meaning.
For example, if I look up the Now keyword in the language index I see
that it says that dTime = Now [ ( ) ] AS Date and it Returns the
current date and time. On that page there is also a link to the Date 
Time Functions. On that page I don't see anything that obviously
solves your problem, BUT! at the end of the page is a link to Intrinsic
Functions and behold, on that page is a link to Format$ which by it's
description ... Format a number or a date. looks like exactly the the
thing you are after.

Please don't take this the wrong way.  I just think you need to spend
more time reading the help pages (as we all have done).

cheers
Bruce


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: converting structures to classes

2012-02-07 Thread Bruce Bruen
On Tue, 2012-02-07 at 04:07 -0800, Randall Morgan wrote:
 Actually, a Structure is a methodless class.
zrr!

... and you can inherit from, override and make static attributes from a
struct too?

Please, lets keep things realistic here.




--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] web cam question

2012-01-29 Thread Bruce Bruen
On Mon, 2012-01-30 at 13:57 +1100, richard terry wrote:

 HI List,
 
 I'm using an Ipevo2 web cam in my app.
 
 on the barrel of this webcam is a little button which, in windows, if clicked 
  takes a shot  windows software.
 
 I wondered if anyone would now how to access clicking this button in linux.
 
 Regards
 
 richard



From here:
http://forums.opensuse.org/english/get-technical-help-here/hardware/430353-driver-ipevo-webcam.html

someone wrote:
IPVEO Point 2 View (aka P2V) works perfectly in linux using the uvc
drivers; the capture and focus buttons work without fault and I haven't
noticed any performance problems. On Debian/Ubuntu you can install it
and a useful webcam controlling program by doing the following:

sudo apt-get install guvcview

So failing any other result, I guess you might acquire the source for
guvcview from somewhere and analyse it.

B

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Re Issue 169 - a few comments

2011-12-27 Thread Bruce Bruen
Hi emil.len...@gmail.com

I have some thoughts on this.

Static Public Const c As Integer
Any (public) const could be defineable as being static by nature (all
instances share the same value).  The Static keyword for Const is not
required and is not in the systax defined in the help for Constant
Declaration. So a Static Const is the same as a nonstatic const.
If anything the compiler should complain about the word Static being
included in a Const declaration.

Static Public v As Integer
I don't see any reason why a dynamic reference to a static variable
should not be allowed.  It's just referencing the class level instance
of the variable.  From the help on Variable Declaration we get If the
STATIC keyword is specified, the same variable will be shared with every
object of this class.  The Static keyword implies that there will be
only one instance of that variable accessable by all instances of the
class.  There is no restriction of access being limited.

Static Public Sub f()
Now, here is where Static means something different to the above!
Static when applied to a method infers that it can only access the
static variables of the class.  In fact it has a larger meaning in that
it acts only on the class level instance (i.e. the instance created
when the class is loaded).  The reason for the restriction of access
referencing to only via the class reference is less clear.  I cannot
think of an example at present (sitting in an airport internet cafe) but
suffice to say that the meaning of the Static keyword here differs from
the above.

Static Property p As Integer
This is similar to the above.  A property really is one or two
accessor methods.  In that light, they are the same as the f method
above.

regards 
Bruce

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas-user Digest, Vol 67, Issue 16

2011-12-18 Thread Bruce Bruen
On Sun, 2011-12-18 at 17:20 -0600, Randy Millner wrote:

 I can't seem to locate Corba and a couple of others, perhaps there are
 some other naming convention
 in use?, or more likey the 64bit pclinuxos development team hasn't
 gotten around to packaging everything, yet.

Randy,

CORBA
==
The required CORBA libs are not in the PCLOS repos (neither 64 nor 32
bit) AFAIK never have been.
CORBA.h, can be sourced from omniORB at http://omniorb.sourceforge.net/
The two missing libraries can be built from the mandriva srpm at
http://rpm.pbone.net/index.php3/stat/26/dist/70/size/3092594/name/omniorb-4.1.4-3mdv2010.1.src.rpm
You will also have to convert these to 64bit and package them up as well
for PCLOS.
Also ,there may be other dependencies within these libraries.

There is no corba component in gambas3!

gb.qt.kde
===
This component provides the kde extensions for DBUS thingos
Your missing headers and libraries are:
kapplication.h libkdecore.so
I believe they may be in the kdevplatform libraries in the repo, but I
don't know (Thanks to Neal et al LXDE rulez here!)

This component does not exist in gambas3

gb.qte
=
You are missing libqte-mt.so
Now this is strange. It is certainly not on my system but gb2 compiles
fine with qte included.
I have no idea what this library is. It may be from qt3, a search for it
on rpmbone reveals nothing.
You will need to work though the gb.qte config logs to see what is
requiring this.



 any clues as to where to find packages to compile would be helpful.

See above


 I've used gambas for a couple of years, and never had to compile it
 from scratch.
 Trying to give back to the PcLinuxOS community.

gambas2 is in the pclos repo.  Here is a list of all its' requires.  

rpmlib(VersionedDependencies) = 3.0.3-1
glibc = 2.12.1
libstdc++6 = 4.5.2
/bin/sh  
/bin/sh  
rpmlib(PayloadFilesHavePrefix) = 4.0-1
rpmlib(CompressedFileNames) = 3.0.4-1
libaa.so.1  
libatk-1.0.so.0  
libbz2.so.1  
libcairo.so.2  
libcrypt.so.1  
libcrypt.so.1(GLIBC_2.0)  
libc.so.6  
libc.so.6(GLIBC_2.0)  
libc.so.6(GLIBC_2.1)  
libc.so.6(GLIBC_2.11)  
libc.so.6(GLIBC_2.1.3)  
libc.so.6(GLIBC_2.2)  
libc.so.6(GLIBC_2.3)  
libc.so.6(GLIBC_2.3.4)  
libc.so.6(GLIBC_2.7)  
libcurl.so.4  
libdirect-1.4.so.0  
libdirectfb-1.4.so.0  
libdl.so.2  
libdl.so.2(GLIBC_2.0)  
libdl.so.2(GLIBC_2.1)  
libfbclient.so.2  
libffi.so.5  
libfontconfig.so.1  
libfreetype.so.6  
libfusion-1.4.so.0  
libgcc_s.so.1  
libgcc_s.so.1(GCC_3.0)  
libgcc_s.so.1(GLIBC_2.0)  
libgdk_pixbuf-2.0.so.0  
libgdk-x11-2.0.so.0  
libggi.so.2  
libgg.so.1  
libgii.so.1  
libgio-2.0.so.0  
libglib-2.0.so.0  
libGL.so.1  
libGLU.so.1  
libgmodule-2.0.so.0  
libgobject-2.0.so.0  
libgpm.so.1  
libgthread-2.0.so.0  
libgtk-x11-2.0.so.0  
libICE.so.6  
libintl.so.8  
libjpeg.so.62  
liblcms.so.1  
libmng.so.1  
libm.so.6  
libm.so.6(GLIBC_2.0)  
libm.so.6(GLIBC_2.1)  
libmysqlclient.so.16  
libodbc.so.1  
libpango-1.0.so.0  
libpangocairo-1.0.so.0  
libpangoft2-1.0.so.0  
libpcre.so.0  
libpixman-1.so.0  
libpng12.so.0  
libpoppler.so.7  
libpq.so.5  
libpthread.so.0  
libpthread.so.0(GLIBC_2.0)  
libpthread.so.0(GLIBC_2.1)  
libpthread.so.0(GLIBC_2.2)  
libqt-mt.so.3  
libresolv.so.2  
librsvg-2.so.2  
librt.so.1  
libSDL-1.2.so.0  
libSDL_image-1.2.so.0  
libSDL_mixer-1.2.so.0  
libslang.so.2  
libSM.so.6  
libsqlite3.so.0  
libsqlite.so.0  
libstdc++.so.6  
libstdc++.so.6(GLIBCXX_3.4)  
libstdc++.so.6(GLIBCXX_3.4.11)  
libstdc++.so.6(GLIBCXX_3.4.14)  
libstdc++.so.6(GLIBCXX_3.4.9)  
libX11.so.6  
libXau.so.6  
libxcb.so.1  
libXcursor.so.1  
libXdmcp.so.6  
libXext.so.6  
libXfixes.so.3  
libXft.so.2  
libXinerama.so.1  
libxml2.so.2  
libXrandr.so.2  
libXrender.so.1  
libxslt.so.1  
libXtst.so.6  
libXxf86dga.so.1  
libz.so.1  

Suggest you check them all off and try another ./configure -C

By the way, your reconf-all seems OK so there is no need to re-run it
But until you can get all the gambas components requirements resolved to
configure's satisfaction, there is no
need to run the make.

Finally, these are all pclos problems, not gambas, so I suggest you
contact me off the list so we don't clutter it up further.
regards
Bruce

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Hopefully, an optimisation for gb.db.postgresql

2011-12-13 Thread Bruce Bruen
By the way, here is the log from my test harness for an Update cycle
(which changes a single column in a 46 column table and then undoes that
change).  
The relevant lines are those marked   Connection.Edit

Bruce

 Using repo gb.db.postgresql Main.c
Test.TestUpdate.188: 1) Load object
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0173 secs)
Load Succeeded for The Tiger/MORN110424 (0.0177 secs)
Comment={-}

Test.TestUpdate.197: 2) Saved changed object
GB .Begin (0.0008 secs)
GB .Edit (0.5042 secs)    Connection.Edit 
GB .Update (0.007 secs)
GB .Commit (0.0186 secs)
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0165 secs)
Save Succeeded for The Tiger/MORN110424 (0.548 secs)
Comment (changed)=Test Update

Test.TestUpdate.211: 3) Reload object
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0044 secs)
Load Succeeded for The Tiger/MORN110424 (0.0047 secs)
Comment=Test Update

Test.TestUpdate.219: 4) Reset to original value
GB .Begin (0.0007 secs)
GB .Edit (0.4917 secs)    Connection.Edit 
GB .Update (0.0045 secs)
GB .Commit (0.0177 secs)
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0168 secs)
Save Succeeded for The Tiger/MORN110424 (0.5322 secs)
Comment={-}

 Using modified Main.c
Test.TestUpdate.188: 1) Load object
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0172 secs)
Load Succeeded for The Tiger/MORN110424 (0.0176 secs)
Comment={-}

Test.TestUpdate.197: 2) Save changed object
GB .Begin (0.0007 secs)
GB .Edit (0.0705 secs)    Connection.Edit 
GB .Update (0.0069 secs)
GB .Commit (0.0493 secs)
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0213 secs)
Save Succeeded for The Tiger/MORN110424 (0.1496 secs)
Comment (changed)=Test Update

Test.TestUpdate.211: 3) Reload object
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0043 secs)
Load Succeeded for The Tiger/MORN110424 (0.0047 secs)
Comment=Test Update

Test.TestUpdate.219: 4) Reset to original value
GB .Begin (0.0008 secs)
GB .Edit (0.0715 secs)    Connection.Edit 
GB .Update (0.0046 secs)
GB .Commit (0.0234 secs)
Persistor.ReadDB.337: Query : MyObject.Mtgcode = MORN110424 AND
MyObject.Hname = The Tiger
GB .Exec (0.0166 secs)
Save Succeeded for The Tiger/MORN110424 (0.1179 secs)
Comment={-}


--
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Hopefully, an optimisation for gb.db.postgresql

2011-12-12 Thread Bruce Bruen
Hi Benoit,

I was tracing through the postgresql library trying to figure out why
some tables would add, update or delete single rows in milliseconds and
others took seconds.
I found that the table_init function in gb.db.postgresql Main.c is
calling the field_info function for each and every column in the table.
Which in turn is querying the database catalogue for each column.
Thus in a table with a large number of columns, calls to .Create
and .Edit in gambas were taking close on half a second each (with a test
table of 46 columns and the database on another server).

With my LIMITED C knowledge I have hacked the table_init queries so that
the required catalogue columns are returned in the intial query and
moved what I hope is the relevant code from field_info into
table_init.  

My limited testing shows that .Create and .Edit call timings have now
dropped to the order of .02 seconds, and the overall add, update and
delete times drop to around .05 seconds.  That is an order of 10 times
faster.

Would you please take a look at the code for table_init below and see if
it makes sense to go this way.  (The code copies and pastes OK into an
editor like geany, even though the mail may wrap lines ... so I hope you
can read it OK).

regards
Bruce

CODE:
/*

table_init()

Initialize an info structure from table fields.

db is the database handle.
table is the table name.
info points at the info structure.

This function must initialize the following info fields:
- info-nfield must contain the number of fields in the table.
- info-fields is a char*[] pointing at the name of each field.

This function returns TRUE if the command has failed, and FALSE if
everything was OK.

*/

static int field_info(DB_DATABASE *db, const char *table, const char
*field, DB_FIELD *info);

static int table_init(DB_DATABASE *db, const char *table, DB_INFO *info)
{

// Contains some changes (**BB**) to see where we can speed up the
Create method.

/*
char *qfield =
select pg_attribute.attname,
pg_attribute.atttypid::int,pg_attribute.atttypmod 
from pg_class, pg_attribute 
where pg_class.relname = '1' 
and (pg_class.relnamespace not in (select oid 
from pg_namespace
where nspname = 'information_schema')) 
and pg_attribute.attnum  0 and not 
pg_attribute.attisdropped 
and pg_attribute.attrelid = pg_class.oid ;

char *qfield_schema =
select pg_attribute.attname,
pg_attribute.atttypid::int,pg_attribute.atttypmod 
from pg_class, pg_attribute 
where pg_class.relname = '1' 
and (pg_class.relnamespace in (select oid from 
pg_namespace where
nspname = '2')) 
and pg_attribute.attnum  0 and not 
pg_attribute.attisdropped 
and pg_attribute.attrelid = pg_class.oid ;
*/
const char *qfield_all=
SELECT col.attname, col.atttypid::int, col.atttypmod, 
col.attnotnull, def.adsrc, col.atthasdef 
FROM pg_catalog.pg_class tbl, pg_catalog.pg_attribute col 
LEFT JOIN pg_catalog.pg_attrdef def ON (def.adnum =
col.attnum AND def.adrelid = col.attrelid) 
WHERE tbl.relname = '1' AND 
col.attrelid = tbl.oid AND 
col.attnum  0 AND 
not col.attisdropped 
ORDER BY col.attnum ASC;;

char *qfield_schema_all =
select pg_attribute.attname,
pg_attribute.atttypid::int,pg_attribute.atttypmod, 
pg_attribute.attnotnull, pg_attrdef.adsrc,
pg_attribute.atthasdef 
from pg_class, pg_attribute 
LEFT JOIN pg_catalog.pg_attrdef  ON (pg_attrdef.adnum =
pg_attribute.attnum AND pg_attrdef.adrelid = pg_attribute.attrelid) 
where pg_class.relname = '1' 
and (pg_class.relnamespace in (select oid from pg_namespace
where nspname = '2')) 
and pg_attribute.attnum  0 and not
pg_attribute.attisdropped 
and pg_attribute.attrelid = pg_class.oid ;

#if DEBUG_BB
fprintf(stderr, ==main.c table_init\n);
#endif

PGresult *res;
int i, n;
DB_FIELD *f;
char *schema;
// **BB**
Oid type;
GB_VARIANT def;
char *val;

/* Nom de la table */

info-table = GB.NewZeroString(table);

if (get_table_schema(table, schema))
{
fprintf(stderr,Method A\n);
if (do_query(db,Unable to get table fields: 1, res,
qfield_all, 1, table))
// WAS: if (do_query(db, Unable to 

Re: [Gambas-user] One control with Expand, one not (Gambas2)

2011-12-12 Thread Bruce Bruen
On Mon, 2011-12-12 at 12:29 +0100, Rolf-Werner Eilert wrote:

 Hope you can help here.
 
 I have a Tab control in my main Form. The Form is divided by an HSplit, 
 the Tab control sits on the right. In one of the tabs, there is a 
 GridView. This GridView shall expand with all the others. All this has 
 been running well, although I did not set the controls' 
 Expand-properties to True. Instead it was enough to set the 
 HSplit-Expand to True, the rest didn't matter.
 
 First question: why does it run like this? Why doesn't it need Expand to 
 be set in all controls which shall expand or at least for all containers?
 
 Now, for some reason I had the idea to set another container/control 
 pair over the GridView. If I do so, it is automatically expanded. This 
 is a bit tricky now, because this pair should not expand but keep a 
 fixed size. How do I tell not to expand this container or control?
 
 Do you understand what I mean?
 
 Regards
 
 Rolf

I think you need to look at what the various container Arrange
properties are (or at least tell us).

The Expand property should be read as can_Expand rather than
will_Expand and depends on the Arrangement property of it's parent
container.
In other words, controls can't Expand by themselves. Nor does Expand
in a container control what happens to its children, it just controls
whether the
container itself can Expand. 

Also note that the HSplit doesn't have an Arrangement property because
it is intrinsically set to Fill. As it wouldn't make sense otherwise.
hth
Bruce
--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Passing ... parameters

2011-12-09 Thread Bruce Bruen
Fabian and Jussi,

Thanks guys, this is now so close it hurts!

On Fri, 2011-12-09 at 20:04 +0200, Jussi Lahtinen wrote:

 Perhaps you need something like this:
 
 Public Function F1(...) As Integer
 
   Return F2(Param.All)
 
 End
 


That (Param.All) appears to be the big part of the solution.
However, it has a little problem in my particular situation that's way
down the bottom of this post.

On Fri, 2011-12-09 at 20:04 +0200, Jussi Lahtinen wrote:

 But even better if you can change the structure of your program so that you
 don't have to re-pass all the parameters.
 BTW. Do you know command TypeOf() ? It may be useful with this case.


On Fri, 2011-12-09 at 13:30 +0100, Fabien Bodard wrote: 

 to use ... it's really rare it's for polymorphe call via a hard
 coded function :
 
 F2(toto, tata, titi)
 F2(toto,tata)
 
 but it not seem to be your case


Here's the real situation, which explains what I'm trying to do.
I have 5 production systems in gambas 2 that are represented by over 80
gambas projects.  They
each use one of three gb2 components to do database access.  These 3
libraries are very similar 
functionally, they implement the Create, Read, Update and Delete actions
on the database and some 
other utility functions (like checking if a row exists for a primary key
value).
In moving these to gambas3, I am trying to merge the three gb2
components into a single gb3 library.
This has been 99% successful, everything but the Read functions have
been rationalised, merged and
now all these functions work using common function calls.
Read is the problem, one gb2 component's Read function uses an array of
primary key values, one uses a
pseudo query string and one uses a class that represents a query by
example structure.  There are 
hundreds, possibly thousands, of calls to the Read function spread
throughout all these gb2 projects.  The 
signatures look like this:
Public Function DBRead(oTarget as Object, vPKey as Variant[]) as
Boolean
Public Function DBRead(oTarget as Object,sQuery as String, Optional
sSort as String) as Boolean
Public Function DBRead(oQBE as QBE) as Boolean
where oTarget is the object that the data will be loaded into.
The functionality of the three Reads is the same - the rows read from
the database end up in the target 
object.  The only differences are the calling signature and how the
target is specified (in the QBE example it 
is inside the oQBE class).

So, here's my desire:
Rather then go through all the projects and fix all of the calls to a
common signature, I thought I could
make a wrapper function in the new library:
Public Function DBRead(...) as Boolean
that would look at the Params and call an appropriate internal function
to handle each type.  I think that would 
be a lot quicker.
As usual, I have complicated the problem by putting the wrapper function
in a class that inherits the base DBAccess
class.  The reason being that at some time in the future, the calls will
all be rationalised to a single signature.  For 
instance, I'll possibly retire the QBE method as it is overly complex.
The pseudo code for the public DBRead now looks like this:

Public Function DBRead(...) as Boolean

Dim localtarget as Object
Dim localquery as String
Dim localsort as String

If Param.Count = 1 and Param[0] is QBE then
decipher_QBE(Param[0],localtarget,localquery,localsort)
Return Super.DBRead(localobject,localquery,localsort)
else 
Return Super.DBRead(Param.All)
Endif

The base class DBRead(...) theortically can decipher which call type
it's got OK.

BUT~!

I can't debug it???  
When I try and display the Param class in the debugger or include things
like Debug Param[0] it shows an Out Of Bounds error.
Is this something I've done or a gb3 issue?

regards
Bruce
--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Passing ... parameters

2011-12-08 Thread Bruce Bruen
Hi folks,

I'm looking for a way to pass all the ... parameters in a function call
on to another function.

In other words, I have a situation where I want to pass all the extra
parameters, but I don't know/care how many there are, viz

Public Function F1(sType as String,...) as Boolean
If sType = Basic then
' process the call locally
Else
Return F2(???) ' where ??? is the set of Params received.
Endif
End

Public Function F2(...) as Boolean
If Param.Count=2 then
' process the call using method A
Else If Param.Count=3 then
' process the call using method B
Else
Error.Raise(Illegal parameter set)
EndIf
End

Is there a way to just pass all the extra params?

regards
Bruce
--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Question - how to just run part of ones larger program

2011-11-21 Thread Bruce Bruen
On Tue, 2011-11-22 at 08:13 +1100, richard terry wrote:

 Not sure I know how to phrase this question.
 
 My program is rather large.
 
 The secretarial staff wanted me to 'split off' the appointments module, so 
 they 
 can just run it side/by/side with the rest of the medical program, ie in 
 separate window, so they don't have to flick back to the appointments module 
 all the time when doing other things.
 
 Any ideas
 
 Thanks
 
 RIchard
 

Tell them to start the app twice and leave one open at the appointments
window???
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-13 Thread Bruce Bruen
Hi Fabien,

Thanks for your input, responses inline

regards
Bruce

On Sun, 2011-11-13 at 08:07 +0100, Fabien Bodard wrote:

 2011/11/13 Bruce Bruen bbr...@paddys-hill.net:
  On Sun, 2011-11-13 at 03:01 +0100, Benoît Minisini wrote:
 
  Hi Bruce,
 
  I took at a look at your code. You made a big mistake by making your
  controls inherit UserContainer, whereas they are not containers. Which
  makes the IDE mad when you want to use _DrawWith or some other properties.
 
 
  Yes, that makes sense.
 
 
  They must inherit UserControl.
 
 
  I used UserContainer in gb2 for some reason lost in the mists of time, I
  think it was to do with a handy property in the UserContainer that was
  not in UserControl.
 
  I thought that maybe the reason has gone away now so I retried the
  LabelTextBox inheriting UserControl.  However, I have struck a problem -
  I can't seem to restrict the Height value if my control is used inside a
  container that enforces it's own height.  For example, if the
  LabelTextBox is inside a HBox it's height will expand to the HBox
  height.  I realise that this is what is supposed to happen but it's
  not what I want to happen.
 
  I have attached two screen shots showing my problem.
 well it's not a problem from gambas :)
 
 you must add more containers to achieve what you want to do :
 
 HBox
 |__ VBox(expanded)
 |   |__ hBox
 |   |   |__ Label
 |   |   |__ SpecialTexBox(expanded)
 |   |__ Panel(expanded)
 |__ Picture
 
 
 this is how gambas containers works

:-) Yes, I know! and this is what I am trying to subvert.  I see what
you are saying about the expandable panel.  In fact the custom control
includes the hBox, Label and TextBox.  So the (failing) model is:
HBox
|___LabelTextBox
|___Picture

The desire is to constrain the height of the LabelTextBox so no matter
what the custom control parent's Arrangement is, the LabelTextBox.Height
is immutable.  That is the requirement, pure and simple.  

 
  I don't know why my intentions work when inheriting UserContainer and
  not when inheriting UserControl.  I'll look into this further this week
  to see if I can characterise it properly.
 your widget are usercontrol ... not containers ... that have no need
 to work like a panel or anything on this ype
 

Funny thing is, the requirement is met when LabelTextBox inherits from
UserContainer, but not when it inherits from UserControl.  This is what
I am trying to understand.

 
 
  Or maybe I didn't understand what you
  want to achieve at all!
 
 
  The intent is to give my two volunteer designers/coders with
  simplified controls that:
  - behave in terms of navigation the same way in both QT4 and GTK+
 that is the work of benoit and gambas

Not in this case! :-) I want it to work my way not the gambas way!  In
other discussions with Benoît, we have come to an understanding that
some of the ways that GTK+ and QT4 work are mutually exclusive as far as
Gambas is concerned,  this is not a problem for me.  I am working with a
captive set of users on a thoroughbred training management system and
the way that form navigation will work for this is around 90% my
problem and not Benoît's.

  - provide some extra properties (e.g. the label) that can be set in the
  IDE and thus reduce both design and coding time
 you have just to export it and setup the _properties constant

Yep, that's what I'm doing.

 
  - subsume the various native events (Activate, Click, Change etc) into a
  single Changed event that is only raised when the user has finished
  altering the value content of the controls
 ok
  - ( and at stage two), to build some data aware controls - like
  gb.db.form - but which will work with some standardised business
  object classes.
 ??? don't understand( that is already what gb.db.form do ... no ?)

Yes, it does for the native database objects (basically Result) but what
I am talking about are my own classes that provide much more extended
functionality than the simple table oriented native classes.  For
example, a horse may be entered into one or several events in a trials
meeting for some reason such as to check its' barrier manners, I have
a business class for its' behaviour over the whole day.  The database
tables involved are horse, meeting, event, performance.  These are all
combined into a single object that will have the horse detail, the
meeting detail and a collection of event+performance details.  These are
not simple table/row relationships but the whole view of the horse's
attitude on a particular day.

So the form using these objects will have say a bunch of textboxes and
say a gridview.  These controls will take their values from an object of
that class expressed in the same way that gb.db.form does, i.e instead
of a DataSource container there will be a DataObject container that uses
the class object instead of a native db object.  Is that clearer?

I have done this in gb2 and it works well.  But the code is extremely
messy and I would not care to share it with anyone

Re: [Gambas-user] GB3 Custom controls

2011-11-08 Thread Bruce Bruen
On Tue, 2011-11-08 at 15:41 -0800, Randall Morgan wrote:

 I think that should be an upper case C which may be why it is being
 ignored. *nix is case sensitive.
 

Oops, I wasn't being clear enough.



  Oh, by the way in install the -c option appears to be ignored these
  days. Maybe just a hangover from days-gone-by?
 
  regards
  Bruce

install in the above refers to the ELF /usr/bin/install which is
called by make (when you issue the make install command).  I was not
talking about ./configure -C
Bruce
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Setting a controls Font back to Normal in a frame

2011-11-08 Thread Bruce Bruen
Setting the font property in a Frame control changes the fonts of all
the contained controls.  ARRGH! I just want to make the frame title
bold.

However, try what I may, I can't find a way to set the contained
controls back to the Normal mode.  I can underline them, change the Font
itself, the size etc but as soon as I change the font name back to the
same as the frame they all go bold again.

Any clues?

Bruce
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:

  1) Declaring one of the hidden constants with the value set to the
  default causes problems, e.g. _IsContainer=False
 
 Mmm. What are you talking about exactly ? 

Sorry, my mistake.  It's _IsMultiContainer=False.

In the IDE using the previously attached sample:
1) ensure that LabelTextBox is the only open file.
2) uncomment the _IsMultiContainer declaration (line 41??)
3) make Executable.
4) open the FTest1 form
== should  get a Cannot open file error
5) exit the IDE (leaving the FTest1 form open) and then restart it and
open the sample project
== should get a Cannot open file error
Bruce

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:

  2) (Related) Don't use the _DrawWith constant without care as it
 will
  crash the IDE if the form is left open.
 
 _DrawWith works only if you specify a control used by the IDE project 
 (it must be in gb.qt4, gb.qt4.ext, gb.form or gb.form.mdi). 


In IDE, ensure only the LabelTextBox class is open

In my LabelTextBox class
1) Uncomment the _DrawWith declaration (line 40-something) - Note I am
using a native control i.e. textbox
2) Make executable
3) Open the FTest1 form
== should get a cannot open file error
4) Exit the IDE, leaving the form open
5) restart the IDE and open the project
== should get the must abort error

Bruce

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:

  4) It would be really, really nice if IsContainer was a RO property
  exposed by all controls
 
 To know if a control is a container, use the IS operator:
 
If MyControl Is Container Then ...
 
 The difference is when a control actually inherits UserControl. It is
 a 
 container, but it must be used as a control.
 
 So the test you need is:
 
If MyControl Is Container And If Not MyControl Is UserControl
 Then ... 


Ah! Thank you that.  Don't know why I didn't think of it.
B
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:

  5) It would be really, really, really nice if all controls had a
  AcceptFocus property (IDE visible) so things like Picture boxes can
 be
  skipped in custom navigation code
 
 Normally PictureBox is a read-only control, so it should not get the 
 focus

It's to do with the custom navigation code.  Demo by commenting out line
58 in MUtil.NextActiveControl and put a breakpoint at the end of
InnerText_KeyPress (line 439?) and then run the project.  In the Horse
Code box press Enter, debug Application.ActiveControl shows that
focus(?) is on the picture box.  Do this in QT4 first. In GTK the
behaviour is harder to catch.


  (do you use gb.qt or gb.gtk?).

Both :-)  in fact this whole affair started because I have remote users
with different guis and wanted to get both of them working the same so
phone support is easier.

 DrawingArea has a Focus property. I admit it may be useful to put
 that 
 property in every control, but I'm not sure it is a good idea at the
 moment. 

Cool.  Just a suggestion.

Bruce
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:

   b) the gb problem of having to reload the project if a new CC
 class
  is added still seems to exist.
 
 What are you talking about exactly? Please give some details. 


Sorry, I am wrong on this one. Make executable does reload the IDE
toolbox.
:-)
B
attachment: face-embarrassed.png--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:

 You must make a binary package of your component project. Normally
 this 
 package should install the component in the same place as the other 
 components located in the Gambas 3 source code, and should become as 
 usable as them.
 


OK I tried that using autotools.  After decompressing I ran the normal
install sequence.  Here's the output:

[bb@bluecow phCCDemo-0.0]$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gambas3 binaries... Ok
checking for gambas3 components path... Ok
checking for gb.image component... Ok
checking for gb.gui component... Ok
checking for gb.form component... Ok
checking for gb.desktop component... Ok
configure: creating ./config.status
config.status: creating Makefile
[bb@bluecow phCCDemo-0.0]$ make
Building phCCDemo component...
OK
[bb@bluecow phCCDemo-0.0]$ su
Password: 
[root@bluecow phCCDemo-0.0]# make install
make[1]: Entering directory `/home/bb/phCCDemo-0.0'
Installing phCCDemo.gambas in /usr/local/lib/gambas3
Installing phCCDemo.component in /usr/local/lib/gambas3
Installing phCCDemo.info in /usr/local/share/gambas3/info
/usr/bin/install: cannot create directory `.info': File exists
Installing phCCDemo.list in /usr/local/share/gambas3/info
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/home/bb/phCCDemo-0.0'
[root@bluecow phCCDemo-0.0]# 

That all looks good, so then :

[bb@bluecow gambas3]$ cd /usr/local/lib/gambas3/
[bb@bluecow gambas3]$ ls -a *ph*
ls: cannot access *ph*: No such file or directory
[bb@bluecow gambas3]$ cd /usr/local/share/gambas3/info/
[bb@bluecow info]$ ls -a *ph*
ls: cannot access *ph*: No such file or directory
[bb@bluecow info]$ 

So nothing got put into these targets?  (and the library (which if I
understand correctly is now a Component) is still not available in the
IDE)

Help!

Bruce
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Tue, 2011-11-08 at 10:27 +1030, Bruce Bruen wrote:

 On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:
 
  You must make a binary package of your component project. Normally
  this 
  package should install the component in the same place as the other 
  components located in the Gambas 3 source code, and should become as 
  usable as them.
  
 
 
 OK I tried that using autotools.  After decompressing I ran the normal
 install sequence.  Here's the output:
 
 [bb@bluecow phCCDemo-0.0]$ ./configure 
 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for a thread-safe mkdir -p... /bin/mkdir -p
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking for gambas3 binaries... Ok
 checking for gambas3 components path... Ok
 checking for gb.image component... Ok
 checking for gb.gui component... Ok
 checking for gb.form component... Ok
 checking for gb.desktop component... Ok
 configure: creating ./config.status
 config.status: creating Makefile
 [bb@bluecow phCCDemo-0.0]$ make
 Building phCCDemo component...
 OK
 [bb@bluecow phCCDemo-0.0]$ su
 Password: 
 [root@bluecow phCCDemo-0.0]# make install
 make[1]: Entering directory `/home/bb/phCCDemo-0.0'
 Installing phCCDemo.gambas in /usr/local/lib/gambas3
 Installing phCCDemo.component in /usr/local/lib/gambas3
 Installing phCCDemo.info in /usr/local/share/gambas3/info
 /usr/bin/install: cannot create directory `.info': File exists
 Installing phCCDemo.list in /usr/local/share/gambas3/info
 make[1]: Nothing to be done for `install-data-am'.
 make[1]: Leaving directory `/home/bb/phCCDemo-0.0'
 [root@bluecow phCCDemo-0.0]# 
 
 That all looks good, so then :
 
 [bb@bluecow gambas3]$ cd /usr/local/lib/gambas3/
 [bb@bluecow gambas3]$ ls -a *ph*
 ls: cannot access *ph*: No such file or directory
 [bb@bluecow gambas3]$ cd /usr/local/share/gambas3/info/
 [bb@bluecow info]$ ls -a *ph*
 ls: cannot access *ph*: No such file or directory
 [bb@bluecow info]$ 
 
 So nothing got put into these targets?  (and the library (which if I
 understand correctly is now a Component) is still not available in the
 IDE)
 
 Help!
 
 Bruce


FORGET THIS ONE! I found my problem - I had included phCCDemo as a
library in the project I was using to see if the new component was
available.

and thanks Benoît for your attention on all this.

regards
Bruce

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] GB3 Custom controls

2011-11-07 Thread Bruce Bruen
On Tue, 2011-11-08 at 10:35 +1030, Bruce Bruen wrote:

 FORGET THIS ONE! I found my problem - I had included phCCDemo as a
 library in the project I was using to see if the new component was
 available. 

No, I spoke too soon... :-(

Tried with a new project and the Paddys-Hill tab is definitely not in
the toolbox.

So, I manually copied the compiled project files as follows:
phCCDemo.gambas - /usr/local/lib/gambas3
.component - /usr/local/lib/phCCDemo.component
.info - /usr/local/share/gambas3/info/phCCDemo.info
.list - /usr/local/share/gambas3/info/phCCDemo.list
all the control icons into /usr/local/share/gambas3/control/phCCDemo

And TADA! everthing seems OK so far!


So it looks like the autotools scripts don't work (on my distro, that
is.)


The only outstanding item is getting the controls to look in the IDE
like how they will appear in the product.  I think I have to compile the
component into the IDE itself?  

Bruce

attachment: face-sad.png--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Virtuality of TextArea.Selection

2011-11-06 Thread Bruce Bruen
Damn and blast!

How do I devirtualize it?
The TextArea.Selection is exactly the structure that I want to pass off
to another class.
The other class needs to know the start (mandatory, I need to handle the
beginning of the string) , length (handy) and obviously the text.
Do I have to create a class of exactly the same structure, populate it
and on the update, repopulate the original virtual?

Foiled again!
Bruce


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] File date (and time) / Gambas2

2011-11-04 Thread Bruce Bruen
On Fri, 2011-11-04 at 12:03 +0100, Rolf-Werner Eilert wrote:

 Hi folks,
 
 I know I solved this somewhere in my projects a long time ago, but I 
 don't remember how... :-) So could you help me: How to find out a file's 
 date and time?
 
 I would expect a File.Date or something, but there isn't...
 
 Thanks for your hints!
 
 Rolf
 

Stat class in gb

Bruce



--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: changing the active font

2011-11-02 Thread Bruce Bruen
On Wed, 2011-11-02 at 01:47 -0400, Kevin Fishburne wrote:

 I'm using SDL and OpenGL. Normal routines for drawing fonts in a 
 DrawingArea work fine; I didn't have to change my code after
 switching 
 from GTK/Qt. This code works:
 
' Draw dialogue buffer.
Draw.Font.Size = sheight / 32
Draw.Foreground = Color.Black
Draw.Text(Client.Dialogue, 31, sheight - 15 - sheight / 32)
Draw.Foreground = Color.Yellow
Draw.Text(Client.Dialogue, 32, sheight - 16 - sheight / 32)
 
 So there is no control, just a draw event procedure Screen_Draw and 
 whatever procedures I call inside it. Maybe I should do Font = 
 Font[...] inside the procedure? 


You've still got me confused Kevin. DrawingArea is a control and has a
Font property.  I know little of OpenGL or SDL but it looks like the SDL
Draw class has an undocumented Font property so I'd still give the
previous a go and hope.
--
RSA#174; Conference 2012
Save $700 by Nov 18
Register now#33;
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: changing the active font

2011-11-01 Thread Bruce Bruen
On Wed, 2011-11-02 at 00:47 -0400, Kevin Fishburne wrote:

 I'm looking through the docs trying to find out how to change the active 
 font but am not having much luck. Anyone know how to do it? I can change 
 the size and color, but not the font being used.
 

The active font of a what?

To set the font via code for a text control in a form use the following
as examples

MyControl.Font = Font[Bitstream Vera Serif,Bold,10]
or even 
MyControl.Font=Font[Monospace,Bold,Italic,Underline,Strikeout,+4]


Bruce

--
RSA#174; Conference 2012
Save $700 by Nov 18
Register now#33;
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] User timezone - could I ask a favour?

2011-10-26 Thread Bruce Bruen
On Tue, 2011-10-25 at 21:51 +0300, Jussi Lahtinen wrote: 

 Next time please make it ready to run project!
 
 I'm not sure this is correct: Europe/Mariehamn.
 I don't live in Mariehamn, but there is only one timezone in Finland!
 Confusion... but then it should be Helsinki which is our capital..!?
 Gnome shows my location as Vantaa which is correct.
 
 Ubuntu 11.04 64bit also with gnome 2.
 
 Jussi


Thanks Jussi,

Hmmm.  Well that just about squashes that good idea.  My code just took
the first md5 matched file in /usr/share/zoneinfo, so in your case
Europe/Helsinki just happened to be the second one found.  Why Aaland
Islands (or Åland Islands) get their own zoneinfo file is unknown,
especially when I look at the zoneinfo database and see that the rule
for the data is just Link Europe/Helsinki.  

I've now taken another look at the zoneinfo files and there are a lot of
cases where the md5sums are equivalent.  So my current approach is
squashed and I'll have to find another generic way to get the user's
timezone.

(I sent the code as source because I didn't want anyone to fear that I
was going to compromise their time data somehow.)

Bruce 
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] integer array in struct ?

2011-10-26 Thread Bruce Bruen
On Tue, 2011-10-25 at 15:49 +0200, wally wrote:

 Bruce,
 
 may you explain theis please:
 
  Print testit.ia.Bounds
 
  output:
 (Integer[] 0x8161644)
 
 wally
 
 

It's the address of the bounds object (don't know why i put it in there
- must be getting senile too.)
Bruce
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] integer array in struct ?

2011-10-25 Thread Bruce Bruen
On Tue, 2011-10-25 at 08:25 +0200, wally wrote:

 Public Struct axis
   i As Integer 
   f  As Float
   ia As Integer[]
 End Struct 

etc

' Gambas module file

Public Struct axis
  i As Integer 
  f As Float
  ia As Integer[]
End Struct

Public Sub Main()

Dim testit As New Axis
Dim x As Integer

testit.ia = New Integer[]

testit.i = 212
testit.f = Pi()

Print testit.ia.Bounds

testit.ia.Add(1)
testit.ia.Add(2)
For x = 1 To 312654
  testit.ia.Add(x)
Next

End

seems to work.

Bruce
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] integer array in struct ?

2011-10-25 Thread Bruce Bruen
On the other hand, the following piece of garbage is also correct.
Better minds than I will have to tell you what's in the array.
' Gambas module file

Public Struct axis
  i As Integer 
  f As Float
  ia As Integer[]
End Struct

Public Sub Main()

Dim testit As New Axis
Dim x As Integer
Dim y As Integer

testit.ia = New Integer[][]

testit.i = 212
testit.f = Pi()


For x = 0 To 120
  If x Mod 2 = 0 Then
testit.ia.Add(x, 0)
Print Seagoon:\tYing ;
  Else If x Mod 5 = 0
testit.ia.Add(x, 1)
Print Tong\nBluebottle:\tTiddle-I-Po
  Else 
testit.ia.Add(x, 2)
Print Tong
  Endif
Next
Print  Tong\nBluebottle/Seagoon:\tTiidle-i-Po\nAll:\tTiddle-I-Po
Print Grippype-Thin:\tOh Min, that N-n-n-eddy, he'll be the death of us
yet!
End

Clue! All you have done in the struct is to declare ia to be an
integer array, it's not till you (or any other programmer) instantiates
it - any old way they like - that it's dimensionality and cardinality is
decided.  

Good luck!
Bruce
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] User timezone - could I ask a favour?

2011-10-25 Thread Bruce Bruen
On Tue, 2011-10-25 at 12:06 +0200, Johny Provoost wrote:


 OK, I get Europe/Brussels and that's correct
 Gambas 2.21
 Ubuntu 11.04 with gnome2
 
 Greetings,
 Johny Provoost
 

Thanks Johny!

Any other takers?  Especially where it doesn't work!

Bruce
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] User timezone - could I ask a favour?

2011-10-24 Thread Bruce Bruen
Hi all,

According to my web research the module below is the best way to
obtain the user's timezone name (or Olson name if you prefer).  This
is because distros implement timezoning in different ways.

It works fine for me using using the test harnesses I can devise for my
(non-standard) distro.  I was hoping that some of you would run it on
your distro and report that it works OK.  It should just print your
timezone name like Arctic/Longyearbyen 

Thanks in advance.
Bruce

' Gambas module file

Public Sub main()

  Print GetUserTimezone()

End

Private Function GetUserTimezone() As String

  Dim tzetc As String   ' Used to determine the type of
the /etc/localtime file
  Dim tzmd5 As String   ' The md5 sum for the /etc/localtime file
  Dim rtnval As String  ' Manipulated substring of tzraw that is finally
returned

  rtnval = Replace(Application.Env[TZ], /usr/share/zoneinfo/, )

  If Not rtnval Then
Shell file /etc/localtime To tzetc
If tzetc Like * symbolic link to * Then
  rtnval = Mid(tzetc, InStr(tzetc, `) + 1, -2)
  rtnval = Replace(rtnval, /usr/share/zoneinfo/, )
Endif
  Endif

  If Not rtnval Then
Shell md5sum /etc/localtime To tzmd5
tzmd5 = Left(tzmd5, InStr(tzmd5,  ) - 1)
Shell Subst(find /usr/share/zoneinfo -type f | xargs md5sum | grep
1, tzmd5) To rtnval
rtnval = Left(rtnval, InStr(rtnval, \n) - 1)
rtnval = Mid(rtnval, InStr(rtnval, info/) + 5)
  Endif

  Return Replace(rtnval, posix/, )

End
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] 2D-Array ?

2011-10-23 Thread Bruce Bruen
On Sun, 2011-10-23 at 05:27 +0200, wally wrote:

 Hi,
 
 more important as the following question itself, is where may i find the
 answer myself without this mailinglist ?
 I always have problems to find sufficient documentation on gambas :(
 Where to search for it ?
 How to search the mailinglist archive ? 
 
 How can i do the following C code in a Public Sub Button1_Click()
 in Gambas 3 ?
 
 int main() {
  int i;
 
  float arr[][2] = { {1.2, 3.4} , {4.5, 5.6} , {7.8 , 8.9} };   -- ???
 
  printf(%i \n, sizeof(arr)/sizeof(float)/2);
  for (i=0;i(sizeof(arr)/sizeof(float)/2);i++) {
   printf(%2.2f \t %2.2f \n,arr[i][0],arr[i][1]);
  }
 return 0;
 }


Public Sub Button1_Click()

  Dim i As Integer
  Dim arr As Float[][]= [[1.1, 2.23456], [2.27654, 3.3], [3.4,
4.50], [123456.789, 987654.321]]

  For i = 0 To arr.Max
Print Round(arr[i][0], -2), Round(arr[i][1], -2)
  Next

End

Apart from Round(float,int) accepting a -ve number which is well
explained in the help, I would have thought the rest was intuitively
obvious to even the most casual of observer :-)

I've said this before and no doubt I'll say it again, the gambas help is
very succinct.  Read every word in a help page and consider what it
means.
hth
Bruce
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Does gambas3 have the guts to make it?

2011-10-17 Thread Bruce Bruen
Well you may have noticed a little drop off in my bug reports lately.  I
have just finished a little ETL exercise of a reasonable sized database
(7.5million rows over 28 tables, heavily foreign-keyed, postgresql 8.3
backends on both sides).  It took me a few days longer than I thought it
would because I tried some major linux ETL tools first.

Of the three I tried, al were java based, two were free and open source
and one was commercial licence linux (30day non-crippled trial).  One
could not cope with any datatype stronger than an integer and insisted
that all floating point numeric types have a scale of 1245678?
(Guess which one).  Of the two free ones, one just gave up and pointed
it toes toward the sky on the first occurrence of more than 1000 rows in
the transform set, the other is still going on a test machine (6 days
now?).

 So. I gave up.

And did it myself.

I would have done it in gb2 but I thought I'd just see how gb3 went.
The job took 6 projects, 4 to build nice clean base tables (including
one of 1.1M rows) and two to clean, transform, recode and load the
dependent tables.  If we excuse the mistakes that I made in the DDL
for the new database, which meant two re-runs, the whole development
time was 14 hours and the elapsed time for the final run was 3hours and
12minutes.

Nett result, 7.43million rows in new database in 16 tables.  (How can 5
users create 70,000 junk records in a year? )

I have now run the 60 odd test queries to prove the data is correct (26
hours) with zero errors.  

So Benoît, I reckon gb3 definitely has got what it takes!  :-) :-) :-)

Thanks a million, or in fact thanks 7.4million!
regards
Bruce

p.s. No I don't use Ubuntu! :-)
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Does gambas3 have the guts to make it?

2011-10-17 Thread Bruce Bruen
On Mon, 2011-10-17 at 09:49 +0200, Benoît Minisini wrote:

 Anyway, I didn't understand everything: what is ETL? What are ETL 
 tools? What are their names?

E(xport),T(ransform),L(oad)  


A mystic art involving moving a truckload or two of data between a
source database and a nice clean new database. Oh and on the way put
some of the data into a Waring blender, add a few seasonings, sieve out
the crunchy bits, glaze lightly and bake in a slow oven until springs
back when pressed lightly in the middle.

Hey hey, am I very happy!
B 

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Collection key

2011-10-13 Thread Bruce Bruen
On Wed, 2011-10-12 at 23:03 +0300, Jussi Lahtinen wrote:

 Hmmm... OK so the change would be then:
 
 static int find_string(CARRAY *_object, int mode, const char *value, int
 len_value, int start)
 
 
 
 Still I think I'll give up this for today.
 
 Jussi

Sage advice Jussi, I think I may have to have a little lie down for a
couple of hours too!

I think it may have something to do with CERN neutrinos moving faster
than the speed of light. ???
Because I am sure that I have seen gambas objects actually raise an
event before they actually exist.  No, no, definitely need to lie down
now.


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gb3 database error handling

2011-10-10 Thread Bruce Bruen
Hi Benoît,

I don't raise these as bugs because they are only annoyances and don't
(specifically) stop things from working.

I have this code (which works fine when things are fine) but has a few
quirks when a database error occurs.  I made a simple test that just
calls this and tries to add the same record to the database twice.


Public Function AddDB() As Boolean

  Dim rwcursor As Result

  DBMod.Conn.Begin  ' DBMod.Conn is just the current open database 
connection
  rwcursor = DBMod.Conn.Create($tname)
  Marshall(rwcursor, $colmap)   ' This just moves the current values into the 
cursor
  Try rwcursor.Update
  If Error Then
Debug db.Error, Error.code, Error.Text, IsNull(Error.Backtrace)
Print Subst(1\n[phDB9_gb3: Base persistor database error (2)] 
3\n4\n1\n\n, String$(60, =), Error.Code, Error.Text, Error.Where)
DBMod.Conn.Rollback
Return False
  Endif

  DBMod.Conn.Commit
  Return True

Catch
  Print Subst(1\n[phDB9_gb3: Base persistor general error trap (2)] 3\n4, 
String$(60, =), Error.Code, Error.Text, Error.Backtrace.Join(\n))

End

As I said, when the insert works all is fine, but on the duplicate key
insert, I get the following output from the two trace lines in the If
Error block


Persistor.AddDB.404: 0  -1  Cannot create record: Duplicate entry '' for 
key 'PRIMARY'  True

[phDB9_gb3: Base persistor database error (-1)] Cannot create record: Duplicate 
entry '' for key 'PRIMARY'
Persistor.AddDB.402



In the first line we see that db.Error=0 instead of the driver error
code, I would have expected 1022 (mysql error: Error: 1022 SQLSTATE:
23000 (ER_DUP_KEY) Message: Can't write; duplicate key in table '%s'). 
 
Secondly, and this is more of an issue, the Error.Backtrace is null (as
evidenced by True at the end of the line).  So I can't get a full
backtrace to the caller that is trying the duplicate insert.

Thirdly, the gambas error code is -1?  I thought that code was for
errors raised within the project i.e. Error.Raise(Message) I have used
that code (-1) to discern local vs system errors previously, is this no
longer safe?

Finally, the error message itself seems to be not populated properly,
Duplicate entry '' for key..  In my test case the key is multicolumn,
so this may be the reason.  However, Cannot create record: Duplicate
key for 'actual key name' on table 'table name' would (IMO) be a
better message.

regards
Bruce

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3 database error handling

2011-10-10 Thread Bruce Bruen
On Tue, 2011-10-11 at 01:58 +0200, Benoît Minisini wrote:

 You have no Error.Backtrace because you are not inside an error
 handler, but 
 inside normal code. Use System.Backtrace instead. 


Aha!  Me=Duuumb!
Thanks
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3 database error handling

2011-10-10 Thread Bruce Bruen
On Tue, 2011-10-11 at 01:58 +0200, Benoît Minisini wrote:

  In the first line we see that db.Error=0 instead of the driver error
  code, I would have expected 1022 (mysql error: Error: 1022 SQLSTATE:
  23000 (ER_DUP_KEY) Message: Can't write; duplicate key in table '%s').
 
 I don't know why. The gb.db.mysql driver set the connection error code just 
 after the query has been run by using a specific API of the mysql library.
 

Hmm. Yes, I've retried using postgresql and the dbms error code is
correctly returned.  


  Secondly, ..

:-)


  Thirdly, the gambas error code is -1?  I thought that code was for
  errors raised within the project i.e. Error.Raise(Message) I have used
  that code (-1) to discern local vs system errors previously, is this no
  longer safe?
 
 Gambas has always used -1 error code for error raised by components and for 
 Error.Raise() method.

OK, never noticed that before.  Will have to adjust my practices.



  
  Finally, the error message itself seems to be not populated properly,
  Duplicate entry '' for key..  In my test case the key is multicolumn,
  so this may be the reason.  However, Cannot create record: Duplicate
  key for 'actual key name' on table 'table name' would (IMO) be a
  better message.
 
 This message comes from mysql. So I guess I can't fix it.

OK. (Just another reason for me to dislike the world's most popular Open Source 
bug-ridden rdbms)


regards
Bruce

attachment: face-embarrassed.png--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: unable to compile on Debian Wheezy (testing)

2011-10-06 Thread Bruce Bruen
On Thu, 2011-10-06 at 01:20 -0400, Kevin Fishburne wrote:

 On 10/05/2011 06:20 AM, doriano.bleng...@fastwebnet.it wrote:
  Bruce Bruen ha scritto:
  On Wed, 2011-10-05 at 01:19 -0400, Kevin Fishburne wrote:
  Hopefully the Debian or Mint team will get this mess sorted out so gb3
  can compile without hacks. Thanks for the help anyway, and for anyone
  else who sees GNOME as the walking dead, I highly recommend Kubuntu or
  any other well-supported KDE distribution. I should have done this a
  long time ago.
 
 
  I feel your pain but it has sparked my interest following both your and
  Demosthenes Koptsis posts. I think that there are a few issues here that
  I may be able to offer some helpful comments on.
 
  Hi Bruce,
 
  I liked your post, and your coloured english (especially those dinosaurs
  starting to feel chilly) :-)
 
 I'm Kevin, but that's okay. ;)

No, you're not. I am .  You're just a symbolic link
in /usr/lib/libfreetype.x73 that points to the real Bruce, 
which as we all know resides in /var/vague/dada/magritte/ceci_n
\'est_pas_une_pipe !  
:-) :-) :-)

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: unable to compile on Debian Wheezy (testing)

2011-10-06 Thread Bruce Bruen
On Thu, 2011-10-06 at 21:11 +1030, Bruce Bruen wrote:

 On Thu, 2011-10-06 at 01:20 -0400, Kevin Fishburne wrote:
 
  On 10/05/2011 06:20 AM, doriano.bleng...@fastwebnet.it wrote:
   Bruce Bruen ha scritto:
   On Wed, 2011-10-05 at 01:19 -0400, Kevin Fishburne wrote:
   Hopefully the Debian or Mint team will get this mess sorted out so gb3
   can compile without hacks. Thanks for the help anyway, and for anyone
   else who sees GNOME as the walking dead, I highly recommend Kubuntu or
   any other well-supported KDE distribution. I should have done this a
   long time ago.
  
  
   I feel your pain but it has sparked my interest following both your and
   Demosthenes Koptsis posts. I think that there are a few issues here that
   I may be able to offer some helpful comments on.
  
   Hi Bruce,
  
   I liked your post, and your coloured english (especially those dinosaurs
   starting to feel chilly) :-)
  
  I'm Kevin, but that's okay. ;)
 
 No, you're not. I am .  You're just a symbolic link
 in /usr/lib/libfreetype.x73 that points to the real Bruce, 
 which as we all know resides in /var/vague/dada/magritte/ceci_n
 \'est_pas_une_pipe !  
 :-) :-) :-)
 

Sorry, that was uncalled for.  
Bruce
(but I couldn't resist)

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: unable to compile on Debian Wheezy (testing)

2011-10-05 Thread Bruce Bruen
On Wed, 2011-10-05 at 01:19 -0400, Kevin Fishburne wrote:
 
 In the interest of getting work done and facing the future of desktop 
 environments, I came to a painful decision and have switched to Kubuntu 
 11.10. I decided that Debian Wheezy was insufficiently maintained for 
 stability and that GNOME had become a tragic dead end with the 
 abandonment of the 2.x branch and the pure crap that is the 3.x branch. 
 That left me with KDE and Xfce as my only options, and loving 
 customization and beauty I chose KDE.
 
 Hopefully the Debian or Mint team will get this mess sorted out so gb3 
 can compile without hacks. Thanks for the help anyway, and for anyone 
 else who sees GNOME as the walking dead, I highly recommend Kubuntu or 
 any other well-supported KDE distribution. I should have done this a 
 long time ago.
 
I feel your pain but it has sparked my interest following both your and
Demosthenes Koptsis posts. I think that there are a few issues here that
I may be able to offer some helpful comments on.

Firstly, I don't know if you know, but there are a couple of things that
you should know.  These are the Linux Standards Base (also known as LSB)
and the File System Heirarchy (also known as FSH). The latter, which is
incorporated in the LSB, defines where and how things should be
installed in linux so that other things2 know where to find them. One
of the important things2 in this case is the GNU toolchain.  That is,
the C(++) compiler and linker, etc (etc being a whole bunch of other
tools that are used to make creating a program executable simple and
straightforward) so that all developers everywhere can reasonably expect
to be able to provide a source tarball (or svn or git or whatever) that
will compile and link regardless of the target environment.

(Sadly, after the kernel.org hack much of this documentation is not
readily available at the moment.  But when it is back I encourage you to
find it, get a good red wine and relax and browse through it.  It is
very enlightening and very well thought out.)

Secondly, and this is probably emotive but here goes anyway, most
responsible distros adhere to the LSB to a very high degree.  There is
one though that follows the be reasonable, do it my way* approach.
(* my way being the one I** decide today)
(** I being any one of a multitude of undisciplined code whackers)
I won't name it, but let's just say that it might just rhyme with
voodoo.

According to the LSB (and the FSH) developers ought to expect that all
linkable libraries (static or dynamic) should reside in /lib
or /usr/lib. Nowhere else, not in /usr/lib/fred, nor /usr/lib/fredx64,
nor /usr/lib/fred_x_6pence_and_a_farthing. (There is a caveat here,
which is that the linker will allow you to override a library location
specifically during a single run by using special arguments.  This is so
that the library developer can link in experimental versions of a
library while they are testing it. This not meant for people trying to
link to published stable versions of the library.)

Now. (FANFARE!) There is a generally perceived problem with the
current hardware mix of 32bit and 64bit architectures.  I won't go in to
them here beyond saying there is at least 2 wasted blogger-years out
there on the internet and to say that it is perceived because it only
exists in the mind of the media.  It doesn't matter if the machine
architecture is 64 bit, 32 bit, 127bit or 6.02 times 10^23 bit, the
library that is compiled for the architecture should reside in /lib
or /usr/lib. (For dog's sake, even Windows went through this argument
somewhere back in the 14th century when they introduced .. can't
remember .. something that jammed a 16bit call into a 12bit stack .. or
something entirely useless like that anyway.)  

The point is, linkable libraries should be in /lib or /usr/lib.

Or at least referable in /lib or /usr/lib ...

Which brings me to links, symbolic or hard.  (I am going to presume that
you know about these things, what they are and why they work.)  The
reason I proposed to Demosthenes that he create the links
between /usr/lib and whatever the strange directory his libfree files
resided in was that it gets around the problem neatly and succinctly.
In fact it is a commonly used method to allow linking (toolchain linker
linking) to a specific version of a library.  If you look at /usr/lib
you will find many examples of this, such as /usr/lib/psylocibin.so is
actually a symbolic link to /usr/lib/psylocybin-a.3.6417.so (or
whatever, if you've followed me so far you'll know what I mean).
Similarly, the links to psylocibin.la and other things follow the same
pattern.

Now here is the bit that I don't understand. libfreetype has been around
since the dinosaurs started feeling a bit chilly.  It's about as stable
as granite. I have diffed the latest version, all the files (.la .a
and .so and the source) they are all the same, no matter whether they
are the 32 bit version or the 64 bit version.  So why some 

Re: [Gambas-user] Surrogate keys and database insertions

2011-10-04 Thread Bruce Bruen
On Mon, 2011-09-26 at 14:46 +0200, Benoît Minisini wrote:

  On Mon, 2011-09-26 at 14:03 +0200, Benoît Minisini wrote:
   This feature is missing, mainly because there is no standard way to do
   that in SQL, and I don't know if there is a function for that in all SQL
   DBMS.
  
  I was afraid of that. I'll do some research.  I know it is possible in
  postgresql and I think it can be made generic across all inserts.  As much
  as I hate delving in to the twisted entrails of mysql documentation I will
  endeavour...  I don't have much expertise with firebird but there is a
  learning opportunity, I suppose. With sqlite, a quick look seems there is
  some probability.  I doubt that it is possible with ODBC.
  
  I'll get back to you.
  Bruce
  
 
 Firebird being not GPL, it has been removed from Gambas. So don't worry with 
 it. But I'd like to have the information for the others!
 

Research results so far:
1) I expanded the frame of my original quest to see whether it is
possible to implement a with re-read option for both INSERT and UPDATE
queries.  This would allow an automatic synchronisation of the gambas
result with the true database row when the row has been updated with
serial, default or computed values at the database level.  The theory
being that it would work regardless of whether  the primary key columns
were affected or not.  
Given the beaut way gambas works with updateable results, I think that
the optimal approach would be to have an optional boolean parameter in
Result.Update (i.e. Result.Update([WithReread=FALSE]) that would provide
the feature but not break existing code.  Alas, my C skills are not up
to a point where I can try this out on my local trunk copy!  Any
guidance here would be appreciated.
2) Assuming the above, the internal workings of Result.Update would vary
according to the dbms.  Sometimes, returning the updated result is
available directly from the dbms, other times it would have to be
simulated via a subsequent SELECT.  Further notes below.
2.1) The problem breaks down into two cases a) where the primary key
columns are all provided (by the calling program) in the Result, and b)
where some or all of the primary key fields are serial,default or
computed. In the first case the solution is trivial, the subsequent
SELECT has all it needs to query the updated row and thus refresh the
Result object.  The second case is more complex.  However I believe it
can be accomplished depending on the dbms.
2.2) For postgresql (since 8.x) the solution apears trivial as
postgresql provides INSERT ... RETURNING and UPDATE ... RETURNING i.e.
it can return some or all of the columns after the insert or update has
completed.  Further, this appears to be well protected from any
concurrency or other side effects.
2.3) For MySQL (since ?.?) there is possibly a solution as there is a
protected SELECT LAST_INSERT_ID(); that will return the last
autoincrement for the most recently executed INSERT on a table
containing an autoincrement column.  By protected, I mean that it works
on a per connection basis, thus avoiding concurrency side effects.  Now
since MySQL will only allow one autoincrement column per table, if the
column is in the primary key then the above approach will work using a
subsequent select on the resultant fully populated key.  HOWEVER, there
is still an unresolved issue if the db supplied key columns are not an
autoincrement, say the key contains a db generated timestamp column.  I
am still looking into this.
2.4) For Sqlite the situation is similar to MySQL but simpler in some
ways. It provides SELECT last_insert_rowid() to retrieve serial pkeys.
I'm still looking at this as a) I'm not sure yet how far Sqlite goes in
terms of the other computed column value types and b) it appears from
some web pages that the version of this function in Sqlite2 has some
bugs that may never have been fixed.
2.5) For ODBC, I have doubts.  I'd have fewer doubts if I could actually
get an ODBC driver to work at all on this machine.
2.6) Interestingly, Firebird (since 2.0) does support INSERT ...
RETURNING and UPDATE ... RETURNING.

Research contnues, but I'd appreciate any thoughts.

Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Database manager - gambas2 vs gambas3 - questions

2011-10-01 Thread Bruce Bruen
On Sat, 2011-10-01 at 23:58 +0200, Benoît Minisini wrote:

  On Tue, 2011-09-27 at 12:37 +0930, Bruce Bruen wrote:
   1) In gambas2, I could get the database manager to Make gambas code
   which was very handy, I can't find this feature in gambas3.  Is it
   removed?
 
 More exactly, I had never enough time to make it again. And as I don't use 
 it... Maybe for Gambas 3.1 ?

OK, I'll wait.

 
   2) In the gambas2 database manager I can expand the height of a row in
   the data view,  I can't seem to do this in the gambas3 version.  Is this
   intentional?
 
 Yes, because I had a problem with automatic row height resizing and 
 performances. But I'm not 100% sure than preventing rows to be resized is 
 related to that.
 
 But normally, if the current selected row should automatically fits its 
 contents.

That works sometimes.  Other times I get the problem in the attached
picture.

 
   3) In the gambas3 version there is a button Copy field list, this does
   not appear to do anything (that I can see). What is it's purpose?
   regards
 
 It copied the list of fields into the clipboard.

Hmm.  Nothing gets put in the clipboard.  May be a LXDE thing.  I'll
investigate further.

 
  4) In gambas 3, I can only have one table or a single sql pane open at a
  time.  I gambas2, I could have lots.
  
 
 I agree, the Gambas 3 database manager may not be as practical as the Gambas 
 2 
 one in some places.
 
 I plan (later) to allow to save sql requests and they will appear inside the 
 the table list. Or something like that. So that we can deal with many SQL 
 requests at the same time easily.
 

OK, but I have more a need to browse related table data. No big problem
for postgres with pgadmin3, but the gambas2 database manager was more
handy than the mysql and sqlite utilities.


Bruce

attachment: Selection_029.png--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] ran in problems with gambas2 and rev 4131

2011-09-26 Thread Bruce Bruen
On Mon, 2011-09-26 at 12:21 +0200, Charlie Reinl wrote:

 Salut Benoît,
 
 updated my gambas2 by svn yesterday, and ran in that problem.
 see attachments, back to rev 4130 all is OK.
 
 
 --
 All the data continuously generated in your IT infrastructure contains a
 definitive record of customers, application performance, security
 threats, fraudulent activity and more. Splunk takes this data and makes
 sense of it. Business sense. IT sense. Common sense.
 http://p.sf.net/sfu/splunk-d2dcopy1
 ___ 

Don't know if this helps but there are a lot of missing header files in
the config.log:
@line 728 in configure.log
-
configure: WARNING: Unable to find file: sql.h
configure: WARNING: Unable to find file: sqlext.h
configure: WARNING: Unable to find file: sqltypes.h
checking for ODBC driver libraries... no
configure: WARNING: Unable to find file: libodbc.so
configure: WARNING: *** ODBC driver is disabled
-

@ line 1241 in configure.log
-
checking for firebird driver libraries... no
configure: WARNING: Unable to find file: libfbclient.so
configure: WARNING: *** firebird driver is disabled
--

@ line 2405 in configure.log
-
checking for QT/Embedded component libraries... no
configure: WARNING: Unable to find file: libqte-mt.so
configure: WARNING: *** QT/Embedded component is disabled
-

@ line 2453 in configure.log
-
checking for KDE 3.x component headers... no
configure: WARNING: Unable to find file: kapplication.h
checking for KDE 3.x component libraries... no
configure: WARNING: Unable to find file: libkdecore.so
configure: WARNING: *** KDE 3.x component is disabled
-

@ line 2816 in config.log
-
checking for SDL sound headers... no
configure: WARNING: Unable to find file: SDL_mixer.h
checking for SDL sound libraries... no
configure: WARNING: Unable to find file: libSDL_mixer.so
configure: WARNING: *** SDL sound is disabled
-

@ line 2816 in configure.log
checking for SDL sound headers... no
configure: WARNING: Unable to find file: SDL_mixer.h
checking for SDL sound libraries... no
configure: WARNING: Unable to find file: libSDL_mixer.so
configure: WARNING: *** SDL sound is disabled
-

@ line 3464 in configure.log
-
checking for CORBA component headers... no
configure: WARNING: Unable to find file: CORBA.h
checking for CORBA component libraries... no
configure: WARNING: Unable to find file: libomniORB4.so
configure: WARNING: Unable to find file: libomniDynamic4.so
configure: WARNING: *** CORBA component is disabled
--
cheers
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Surrogate keys and database insertions

2011-09-26 Thread Bruce Bruen
On Mon, 2011-09-26 at 14:03 +0200, Benoît Minisini wrote:
 This feature is missing, mainly because there is no standard way to do that 
 in 
 SQL, and I don't know if there is a function for that in all SQL DBMS.
I was afraid of that. I'll do some research.  I know it is possible in 
postgresql and I think it can be made 
generic across all inserts.  As much as I hate delving in to the twisted 
entrails of mysql documentation I 
will endeavour...  I don't have much expertise with firebird but there is a 
learning opportunity, I suppose. With sqlite, 
a quick look seems there is some probability.  I doubt that it is possible with 
ODBC.  

I'll get back to you.  
Bruce




--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Database manager - gambas2 vs gambas3 - questions

2011-09-26 Thread Bruce Bruen
1) In gambas2, I could get the database manager to Make gambas code
which was very handy, I can't find this feature in gambas3.  Is it
removed?
2) In the gambas2 database manager I can expand the height of a row in
the data view,  I can't seem to do this in the gambas3 version.  Is this
intentional?
3) In the gambas3 version there is a button Copy field list, this does
not appear to do anything (that I can see). What is it's purpose?
regards
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Database manager - gambas2 vs gambas3 - questions

2011-09-26 Thread Bruce Bruen
On Tue, 2011-09-27 at 12:37 +0930, Bruce Bruen wrote:

 1) In gambas2, I could get the database manager to Make gambas code
 which was very handy, I can't find this feature in gambas3.  Is it
 removed?
 2) In the gambas2 database manager I can expand the height of a row in
 the data view,  I can't seem to do this in the gambas3 version.  Is this
 intentional?
 3) In the gambas3 version there is a button Copy field list, this does
 not appear to do anything (that I can see). What is it's purpose?
 regards
 Bruce

p.s.
4) In gambas 3, I can only have one table or a single sql pane open at a
time.  I gambas2, I could have lots.

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] What replaces Desktop.Scale in gambas3?

2011-09-25 Thread Bruce Bruen
Thanks Fabian,
That (TextWidth) was what I didn't search for.
Got it working, but it is interesting that I have to bump the final
width value by an empirically determined amount to prevent the last
letter from being chopped.  The code if anyone is interested is :


Private Sub ReLoadList()
'' Reload the data in the gridview using the existing data set in
$cItems

  Dim wkItem As Todoitem' working copy of the object to be
displayed
  Dim idr, idc As Integer   ' row and column indexes
  Dim aItemValues As Variant[]  ' working array copy of the object
values that are displayed
  Dim aMaxW As Integer[]' max column width array

  ' Set up
  gvwList.Clear
  gvwList.Rows.Count = $cItems.Count
  aMaxW = New Integer[gvwList.Columns.Count]

  ' Initially set the max column width array values to the size of the
column titles
  For idc = 0 To gvwList.Columns.count - 1
aMaxW[idc] = gvwList.Font.TextWidth(gvwList.Columns[idc].Title)
  Next

  ' Load the items from the source collection into the rows
  idr = 0
  For Each wkItem In $cItems
With wkItem
  aItemValues =
[.ID, .Project, .Affects, .Title, .Type, .Status, .Priority]
End With
For idc = 0 To gvwList.Columns.Count - 1
  gvwList[idr, idc].Text = aItemValues[idc]
  ' and check to see if the max width value needs changing
  If (gvwList.Font.TextWidth(gvwList[idr, idc].Text)  aMaxW[idc])
Then aMaxW[idc] = gvwList.Font.TextWidth(gvwList[idr, idc].Text)
Next
Inc idr
  Next

  ' Finally set all the column widths according the the values in the
max column widths array
  For idc = 0 To gvwList.Columns.Count - 1
gvwList.Columns[idc].Width = aMaxW[idc] + 7
  Next

End


See the last bit. I had to bump the computed value by 7 (for both gtk
and qt4) to stop the last letter being chopped.

regards
Bruce

On Sun, 2011-09-25 at 18:53 +0200, Fabien Bodard wrote:

 2011/9/25 Bruce Bruen bbr...@paddys-hill.net:
  I'm trying to set a gridview column width to the maximum length of the
  strings in the column.  I can find the maximum width in terms of the
  length of the string easily but what do I multiply that by to get the
  desired cloumn width?
  I have searched through the wiki but I just cant seem to find what
  replaces Desktop.Scale?
 why don't you use fontsize ?
 
 iWidth = GridView1.Font.TextWidth(iMaxLetters)
 
  tia
  Bruce
  --
  All of the data generated in your IT infrastructure is seriously valuable.
  Why? It contains a definitive record of application performance, security
  threats, fraudulent activity, and more. Splunk takes this data and makes
  sense of it. IT sense. And common sense.
  http://p.sf.net/sfu/splunk-d2dcopy2
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] code normaliser

2011-09-25 Thread Bruce Bruen
On Sun, 2011-09-25 at 23:58 +0200, tobias wrote:

 hi,
 
 i just finished a little project (finished means working, not secure. it 
 actually is a bit quick'n'dirty because i'm tired) called code 
 normaliser that takes a norms file and a source file/directory and 
 applies these norms to the sources.
 the norms file consists of lines of this scheme:
 start-of-block (regexp), end-of-block (regexp), indentation (integer)
 and describes how to indent parts of the source. (my personal one is 
 included)
 there are other formatting things directly in the code of the program 
 like eliminating unnecessary spaces, empty lines or adjusting comments 
 and adding empty lines after specific parts of the source.
 it is *very very* personalised because i wrote it for someone writing a 
 book about gambas, the source samples have to be standardised in a way 
 we together thought, it would look well.
 so if somebody - like a formatting nazi ;) - would like to have a look 
 at it or try it out, i'll attach the source archive.
 
 regards,
 tobi
 
 --
 All of the data generated in your IT infrastructure is seriously valuable.
 Why? It contains a definitive record of application performance, security
 threats, fraudulent activity, and more. Splunk takes this data and makes
 sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-d2dcopy2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

Hi Tobias,
(Even though I have no political associations) I'd like a look, please
fwd archive.
Bruce
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] What replaces Desktop.Scale in gambas3?

2011-09-24 Thread Bruce Bruen
I'm trying to set a gridview column width to the maximum length of the
strings in the column.  I can find the maximum width in terms of the
length of the string easily but what do I multiply that by to get the
desired cloumn width?
I have searched through the wiki but I just cant seem to find what
replaces Desktop.Scale?
tia
Bruce
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Surrogate keys and database insertions

2011-09-24 Thread Bruce Bruen
(This drove me bananas in gambas2.)  Is there now (in gambas 3) a way to
get the key of the row just inserted into the database when the key is a
surrogate key e.g. a SQLite serial?
For example, in the following, the items table has a surrogate key
called id which is a simple serial.

Private Sub CreateItem(item As Todoitem)
  
  Dim hRslt As Result
  
  hRslt = hConn.Create(items)
  If hRslt.Available Then
Marshall(item, hRslt) 'Moves the item data into the result fields
hRslt.Update

'So what's the value of the id field???  According to hRslt!id
it is still blank.

  Endif
  
End

I've tried several ways to read the table and try to determine which row
was just added, but there are too many problems like
a) someone else may have inserted another row between the update and the
re-read, so I cant just look at the highest id
b) I or someone else may be inserting copies of an existing row, i.e.
all the non-key fields now exist in more than one row.
c) In postgresql, it is possible to create a pseudo query function that
adds the new row and returns the key of it, but 
1) this is postgresql specific
2) it means I have to use hConn.Exec instead of the nice simple
gambas routines
3) it is messy code in the database and the function has to be
created and maintained for each table

Surely someone has come up with an answer to this?

Bruce
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help with RegExp

2011-09-23 Thread Bruce Bruen
On Sat, 2011-09-24 at 00:14 +0200, tobias wrote:

 hi,
 
 i have a problem with regular expressions: i'm not very good in using them.
 i want to determine the comment string in a gambas comment with gb.pcre 
 and been sitting down for 3 hours now, totally frustrated...
 i thought, i have to search for the first ' apostrophe from the left 
 which isn't between . i have experimented with the ugliest things but 
 nothing worked properly.
 i used these lines to test:
 
 Print ' ''
 Print text 'comment
 and the line of RegExp.Compile(???) itself
 
 of course, they should give
 '
 comment
 (nothing)
 
 i got a solution that matched the first two ones correctly but no chance 
 for the regexp itself in line 3 (i always got something after the 
 apostrophe in the regexp)...
 
 i didn't get very far without getting wrong results, so i think there's 
 no need to post my tries
 i would be very glad if someone more experienced could help me.
 
 regards,
 tobi
 

I'm not sure whether you are trying to learn regexp patterns or parse a
gambas sourcecode line, but if the second then this is how I do it.


' Gambas module file

Public Sub Main()
Dim sSourceCode As String ' The original source line
Dim sCode As String   ' The part of the source line that is code
Dim sComment As String' The part of the source line that is comment
Dim aComment As New String[]

sSourceCode =   While surname\O'Reilly\ or surname\O'Malley\ Or 
surname  \O'Reilly-O'Malley\  '' Loop around looking for the 
irishman called \O'Reilly\, \O'Malley\ or \O'Reilly-O'Malley\

Print Original===
Print sSourceCode

aComment = Split(sSourceCode, ', \, False, True)

Print Parsed===
Print aComment.Join(\n)

sCode = Trim(aComment[0])
aComment.Delete(0)
sComment = Trim(aComment.Join('))

Print Code part===
Print sCode
Print Comment part===
Print sComment

End


regards
Bruce

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help with RegExp

2011-09-23 Thread Bruce Bruen
On Sat, 2011-09-24 at 01:16 +0200, Benoît Minisini wrote:

 Otherwise there is a Gambas syntax analyzer in the gb.eval component if you 
 need...
 

What!!!??? You mean all this code I've written to reverse engineer a
class into an XMI file already .  :-)

Oh, wait. The eval stuff only works on a single line, doesn't it?

Bruce

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3 @ Mint LMDE

2011-09-21 Thread Bruce Bruen
On Wed, 2011-09-21 at 08:42 +0300, Demosthenes Koptsis wrote:

 
 /bin/sed: can't read /usr/lib/libfreetype.la: No such file or directory
 libtool: link: `/usr/lib/libfreetype.la' is not a valid libtool archive
 make[4]: *** [gb.sdl.la] Error 1
 make[4]: Leaving directory
 `/home/user/Downloads/Gambas/gambas3-2.99.3/gb.sdl/src'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory
 `/home/user/Downloads/Gambas/gambas3-2.99.3/gb.sdl'
 make[2]: *** [all] Error 2
 make[2]: Leaving directory
 `/home/user/Downloads/Gambas/gambas3-2.99.3/gb.sdl'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/home/user/Downloads/Gambas/gambas3-2.99.3'
 make: *** [all] Error 2
 
 Please help


in terminal enter (without quotes):

file /usr/lib/libfreetype.la

and post back the output.

Bruce


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3 @ Mint LMDE

2011-09-21 Thread Bruce Bruen
On Wed, 2011-09-21 at 08:42 +0300, Demosthenes Koptsis wrote:

 
 /bin/sed: can't read /usr/lib/libfreetype.la: No such file or directory
 libtool: link: `/usr/lib/libfreetype.la' is not a valid libtool archive
 make[4]: *** [gb.sdl.la] Error 1
 make[4]: Leaving directory
 `/home/user/Downloads/Gambas/gambas3-2.99.3/gb.sdl/src'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory
 `/home/user/Downloads/Gambas/gambas3-2.99.3/gb.sdl'
 make[2]: *** [all] Error 2
 make[2]: Leaving directory
 `/home/user/Downloads/Gambas/gambas3-2.99.3/gb.sdl'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/home/user/Downloads/Gambas/gambas3-2.99.3'
 make: *** [all] Error 2
 

Disregard that, I was looking at the wrong line in your make output.

Do you have any libfreetype installed?

ls -al /usr/lib/libfreetype*

Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3 @ Mint LMDE

2011-09-21 Thread Bruce Bruen
On Wed, 2011-09-21 at 11:21 +0300, Demosthenes Koptsis wrote:

 i did a 
 locate libfreetype
 
 and yes i think i ahve
 
 /usr/lib/vlc/plugins/misc/libfreetype_plugin.so
 /usr/lib/x86_64-linux-gnu/libfreetype.a
 /usr/lib/x86_64-linux-gnu/libfreetype.la
 /usr/lib/x86_64-linux-gnu/libfreetype.so
 /usr/lib/x86_64-linux-gnu/libfreetype.so.6
 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.6.2
 /usr/lib32/libfreetype.so.6
 /usr/lib32/libfreetype.so.6.6.0
 

Yes, but a) when did you last run updatedb and b) ls
-al /usr/lib/freetype* will tell me what the files are.
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3 @ Mint LMDE

2011-09-21 Thread Bruce Bruen
On Wed, 2011-09-21 at 12:19 +0300, Demosthenes Koptsis wrote:

 before i run locate i did an updatedb
 
 ok here is the ls
 
 ls -al /usr/lib/x86_64-linux-gnu/libfreetype*
 
 -rw-r--r-- 1 root root 862114 Jun 23
 00:58 /usr/lib/x86_64-linux-gnu/libfreetype.a
 
 -rw-r--r-- 1 root root892 Jun 23
 00:58 /usr/lib/x86_64-linux-gnu/libfreetype.la
 
 lrwxrwxrwx 1 root root 20 Jun 23
 00:58 /usr/lib/x86_64-linux-gnu/libfreetype.so - libfreetype.so.6.6.2
 
 lrwxrwxrwx 1 root root 20 Sep 20
 16:45 /usr/lib/x86_64-linux-gnu/libfreetype.so.6 - libfreetype.so.6.6.2
 
 -rw-r--r-- 1 root root 628440 Jun 23
 00:58 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.6.2
 
 
 
 On Wed, 2011-09-21 at 18:09 +0930, Bruce Bruen wrote: 
  On Wed, 2011-09-21 at 11:21 +0300, Demosthenes Koptsis wrote:
  
   i did a 
   locate libfreetype
   
   and yes i think i ahve
   
   /usr/lib/vlc/plugins/misc/libfreetype_plugin.so
   /usr/lib/x86_64-linux-gnu/libfreetype.a
   /usr/lib/x86_64-linux-gnu/libfreetype.la
   /usr/lib/x86_64-linux-gnu/libfreetype.so
   /usr/lib/x86_64-linux-gnu/libfreetype.so.6
   /usr/lib/x86_64-linux-gnu/libfreetype.so.6.6.2
   /usr/lib32/libfreetype.so.6
   /usr/lib32/libfreetype.so.6.6.0
   
  

(Takes deep breath)

OK, so I presume that there is no libfreetype files or links in /usr/lib
itself?  

But you do appear to have 
1) the full set of 64 bit library files and 
2) a different version of the library executable in /usr/lib32
(probably /usr/lib32/libfreetype.so.6 is a link
to /usr/lib/libfreetype.so.6.0)

Is this a 64bit machine?  If so you can add links in /usr/lib to
the /usr/lib/x86_64-linux-gnu files for libfreetype.so.6 and
libfreetype.la but if not then you are going to have to find the
correct .la file for the /usr/lib32 version and then link to them.  

I don't know where in debian to find the lib32 versions.

hth
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3 @ Mint LMDE

2011-09-21 Thread Bruce Bruen
On Wed, 2011-09-21 at 12:02 +0200, Benoît Minisini wrote:

  the errors i get are
  
  /bin/sed: can't read /usr/lib/libfreetype.la: No such file or directory
  libtool: link: `/usr/lib/libfreetype.la' is not a valid libtool archive
  make[4]: *** [gb.sdl.la] Error 1
  make[4]: Leaving directory
  `/home/user/Downloads/Gambas/gambas3-svn4143/gb.sdl/src'
  make[3]: *** [all-recursive] Error 1
  make[3]: Leaving directory
  `/home/user/Downloads/Gambas/gambas3-svn4143/gb.sdl'
  make[2]: *** [all] Error 2
  make[2]: Leaving directory
  `/home/user/Downloads/Gambas/gambas3-svn4143/gb.sdl'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn4143'
  make: *** [all] Error 2
  
 
 Please post the full output of make, because the error means that there is 
 a 
 reference on /usr/lib/libfreetype.la inside another file, and we should see 
 its name just before the error message.
 
 Regards,
 

its in the dependency_libs in gb.sdl.la
B

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas3 control components _Arrangement incorrectly overridden

2011-09-20 Thread Bruce Bruen
On Tue, 2011-09-20 at 21:13 +0200, Benoît Minisini wrote:

  Another migration problem.  I'm not having a good day. :-(
  
  I don't know if this is a bug or whether I'm just not looking at the
  code and/or the help correctly.
  
  I am migrating a bunch of specialised controls from gambas2 to gambas3.
  Much of it is working wonderfully but this one has got me beat.
  
  The attached project has two specialised controls, a trivial example
  called CBlueTextbox which works fine and one called ItemToolBar which
  doesn't.  Testing the controls fails with the dreaded incorrectly
  overridden message, specifically UserControl._Arrangement is
  incorrectly overridden in class ItemToolBar.
  
  CBlueTextBox inherits directly from TextBox, whereas ItemToolbar
  inherits from UserControl.
  
  I realise that the _Arrangement constant for the textbox is meaningless.
  It's just there as an example.  However I think it is needed in the
  ItemToolbar.
  
  (To make the attached project work, delete the ItemToolBar class.)
  
  regards and thanks in advance
  Bruce
 
 You have to choose another name for _Arrangement in the ItemToolbar class. 
 Is it a problem ?
 

Ah! I see (I think). If we are inheriting from UserControl then we
should not include the _Arrangement constant.  This is not a problem.

thanks
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Small error in help text for Event declaration

2011-09-19 Thread Bruce Bruen
Hi,

The Gambas 3 help for Event declaration has an error in the example
code:


Events declaration
EVENT Name ( [ Parameter #1 [ , Parameter #2 ... ] )


This declares a class event. This event is raised by using
the RAISE keyword.

The RAISE keyword may return a boolean value to indicate if
the event handler wants to cancel the event.


Example

EVENT BeforeSend(Data AS String) AS Boolean

...

regards
Bruce
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Inheritance and Signature checking in gambas 3

2011-09-19 Thread Bruce Bruen
HI,

I thought I may have trouble with this area :-(

I am migrating quite a lot of gambas2 components that work well and most
of the pain has arisen in this signature checking in the runtime, as in
the incorrectly overridden message.

First, because this is only evident in the runtime, I have a fear that
testing the converted components may miss the error when the override is
in a rarely executed area of code.

Secondly, I can no longer override a method declared in a base class as
Identifier(...) with a method in the child class with a real and
restricted parameter set. To explain, I have a set of base classes in
component X that provide the very fundamental features of an inheritance
hierarchy.  As well, they prescribe a set of methods that must be
implemented in the child classes.  In short, they are stubs for
required methods.  All they do is raise an error if the method is not
overridden in the child class.  Because of this, these stubs have no
idea nor do they care what the parameters of the child class method are.

As an example, I have a persistence model that involves three levels of
code: 
the [application] uses--- [a business_object library]
---inherits--- [base_persistence]
The persistence of the data is entirely handled by the two lower level
libraries, the application only has to call the Create, Read, Update or
Delete methods on the business_object object and all it's persistence
needs are handled.  The business_object library contains all the
relevant business rules for its classes, e.g. whether objects can be
deleted from the persistence or whether a cascaded delete is necessary
etc etc.  However, the business_object layer has no idea exactly how the
persistence is achieved, it just validates the action applies the
relevant transformations between the object data model and the
persistence data model and then passes the object data off to the low
level persistence methods in it's parent class.  This is the high level
design.

The implementation employs the following code model:  at the
business_object library level, each business object has (at least) two
classes, the main object class, e.g. Account and one or more mapping
classes, say _sqlaccount and _xmlaccount.   The main class is
visible to the application, the mapping classes are hidden.  The mapping
classes provide the two way transformation between the object data and
the persistence data,  in short they have a Marshall method and an
Unmarshall method.  These two methods are very importantly visible
to the base_persistence library.

The last comment requires explanation.  In the base_persistence library
there is a similar split between the object model and the
persistence model.  There is a base BusinessObject class, from which
all the classes in the business_object library inherit, and a base
persistor from which all the mapping classes in the business_object
library inherit.  (There is a tricky bit here that is important to the
design but irrelevant to this message - there is a base persistor for
each persistance type, e.g. postgresql, mysql, xml, flatfile etc.  Each
of these is in separate libraries and is loaded explicitly at runtime by
the BusinessObject class depending on the settings file for the
business_object library. Suffice to say that it is the actual base
persistor that provides the actual input/output methods to add,
load, save and remove the data. Note the change from the CRUD
method names!)

When the application instantiates a business object, say an Account
object called MyAccount, the constructor in the base_persistence
library BusinessObject class i.e. BusinessObject._new() checks the
persistence method in use and instantiates the relevant mapping class in
the business_object library, i.e. it creates an actual persistor which
is either a _sqlaccount or an _xmlaccount.  How I do this is
irrelevant, the important thing is that the BusinessObject has access
to, via the gambas virtual dispatching feature, one of these things
which as far as it is concerned is a persistor.

The CRUD methods are actually public in the BusinessObject class, i.e.
they are inherited by the classes in the business object library.  So
when the application does a MyAccount.Update, it is actually calling
the BusinessObject.Update method.  This in turn calls its'
persistor.save method.  In fact, what it does is call its'
persistor.Marshall method and then its' persistor.save method.  Note the
subtle inference here, the Marshall method is the the one in the active
mapping class and the save method is the one in the base persistor class
(there is no save method in the mapping class). However, in order to
compile the base_persistence libraries there must be a stub method
called Marshall at this level and this is the one that MUST be
overridden at the higher level.  Further, at this level (in the base
persistor libraries) I have no idea as to how the business_object
library level Marshall method works, nor what parameters it needs to
achieve 

Re: [Gambas-user] Inheritance and Signature checking in gambas 3

2011-09-19 Thread Bruce Bruen
On Tue, 2011-09-20 at 03:06 +0200, Benoît Minisini wrote:


 Mmm. You should provide your code, or some schema, so that I am sure to 
 really 
 understand your design.
 
 Now I will try to give you solution, but I'm not sure it is good as I'm not 
 sure that I understood your description completely.
 
 So...
 
 1) Not ensuring that the signatures of a child method is exactly the same as 
 the parent method was a Gambas 2 bug that can lead to interpreter crashes.
 
 2) In other words, as soon as a parent class A has a Marshall() method, a 
 children class B that overrides Marshall() must use the same signature. The 
 contrary is, for me, completely illogical.
 
 3) If you want the children class to all have different Marshall() 
 signatures, 
 then Marshal() cannot be a member of the parent class.
 
 4) So I suggest that you rename all Marshal() child methods into something 
 like _Marshal(). And that you keep a Marshal(...) in the parent class that 
 will call the _Marshal() method *dynamically* by using the Object.Call() 
 method. Something like that:
 
   Public Sub Marshal(...)
   
 Dim aParam As New Variant[Param.Count]
 Dim I As Integer
   
 ' I realise that a Param.All property would be a good idea!
 For I = 0 To Param.Max
   aParam[I] = Param[I]
 Next
   
 Object.Call(Me, _Marshal, aParam)
   
   End
 
 Regards,
 
 -- 
 Benoît Minisini
 

Thanks, for looking at this (again) Benoît.  I will build a simplified
set of the structures and post it (it is just too big at 18 or so
components to post as one chunk) over the next few days.  I'll also have
a look at your note 4 and see if that provides a way around the
problem. 

But regarding note 1) Not ensuring that the signatures of a child
method is exactly the same as the parent method was a Gambas 2 bug that
can lead to interpreter crashes.  This is the bit I don't understand.
In the hundreds if not thousands of lines of code in my gambas2
projects, I have never seen it crash in this way.  As I said these
projects have been running for several years.  

And as to note 2) The contrary is, for me, completely illogical.  I
must disagree,  method overriding is a well known object oriented design
aspect.  (And I know you know :-) as you have said yourself in a comment
in issue 78 And the check is not done too for a native class inheriting
another native class. C/C++ programmer are supposed to know what they
are doing. :-)  ).

regards
Bruce


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas3 control components _Arrangement incorrectly overridden

2011-09-19 Thread Bruce Bruen
Another migration problem.  I'm not having a good day. :-(

I don't know if this is a bug or whether I'm just not looking at the
code and/or the help correctly.

I am migrating a bunch of specialised controls from gambas2 to gambas3.
Much of it is working wonderfully but this one has got me beat.

The attached project has two specialised controls, a trivial example
called CBlueTextbox which works fine and one called ItemToolBar which
doesn't.  Testing the controls fails with the dreaded incorrectly
overridden message, specifically UserControl._Arrangement is
incorrectly overridden in class ItemToolBar.  

CBlueTextBox inherits directly from TextBox, whereas ItemToolbar
inherits from UserControl.

I realise that the _Arrangement constant for the textbox is meaningless.
It's just there as an example.  However I think it is needed in the
ItemToolbar.

(To make the attached project work, delete the ItemToolBar class.)

regards and thanks in advance
Bruce





g3control-0.0.12.tar.gz
Description: application/compressed-tar
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas2 to gambas3 conversion - some problems

2011-09-03 Thread Bruce Bruen
Hi Benoît and everyone,

I have some misgivings about how gambas3 is converting or porting
gambas2 projects.  I'm talking about the way it is renaming the old
project and creating a new project with the same name. This can have a
result of breaking stable production gambas2 applications at worst and
annoying one or more developers at least.

From least to worst, the following scenarios arise:

1) the converter leaves the backup project (MyProject~) in a locked
state.  When the developer goes to open the backup project in gambas2
they receive the This project seems to be already opened message.
Colin Confused, the developer, who has multiple instances of gambas2
running is annoyed because he has to make a decision as to whether it
really is open somewhere (maybe even by another developer on another
machine) or whether they should take the risk and open it anyway.  I was
going to raise a bug about this one, but some more thinking and testing
led to the following.  Analysis - annoying.

2) the converter ignores the existence of the .lock file in the gambas2
project and converts it anyway, thus if the project is open in gambas2
somewhere the following could occur.  Steve Stable, the support
programmer for gambas2 has MyProject open in gambas2 and has spent
several hours finding and fixing an obscure issue and is just about to
compile and test.  Fanny Frantic, the new junior programmer, opens
MyProject in gambas3 and says yes to the convert question.  Gambas3 then
renames (I presume) MyProject to MyProject~ and copies and converts the
code.  Steve Stable then presses F5 whereupon gambas2 crashes and all
his work is lost (because the file system has been altered and his
project now points to the wrong place). Analysis - could result in Steve
causing serious physical harm to Fanny, therefore dangerous.

3) converting existing gambas2 components will break the gambas2 user
projects that use them. Bruce Ballistic (senior programmer, head chef
and dog washer) who is normally very careful to copy his gambas2
projects to a new gambas3 directory structure, accidentally opens the
wrong project. He then makes major changes to the component and
recompiles it.  The existing (production) gambas2 applications will
now fail as the symbolic links in .local/lib and .local/share point to
the gambas3 component.  Analysis - could result in Bruce muttering If I
ever get my hands on that Minisini character, ..., therefore extremely
dangerous.

4) I think (I haven't tested this) that there could be issues
with .config/gambas as well???

In my opinion the converter should insist on the user entering a new
name for the gambas3 project and leave the gambas2 structures alone, but
at the very least it should be alerting the user in the strongest
possible way as to which project it is going to convert and observe any
existing .lock files.

Please consider.

regards
Bruce where's my shotgun Ballistic
Steve don't call me Stable,
Fanny why are you hitting me Steve Frantic, and
Colin ?? Confused


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Fixing bug tracker issue 78

2011-09-01 Thread Bruce Bruen
On Wed, 2011-08-31 at 16:34 +0200, Benoît Minisini wrote:

 This is one the design rule of Gambas : a method has to always return
 the same 
 datatype, otherwise it must return a Variant. 

Benoît,
I think you may have missed the point of my, albeit contrived, sample.
On the other hand I may not have made it explicit enough to let you
answer my fears. I'll try again:
Emil gave an example where the result a of a loop construct was one of
two closely related object references:
For i = 1 To 2

  If i = 1 Then
a = New Class1
  Else If i = 2 Then
a = New Class2
  End If
  Print a.F() + i 'Will print the address in memory for 2 + i the second time
Next

There is a hidden artefact in this code in that a (an object reference)
is of a particular inheritance sequence.  However, because both Class1
and Class2 both have explicit and in the case of Class2 an overridding
implementation of an attribute called F the interpreter has optimised
that any a.F will be an integer, which is not true in the case where a
happens to be a Class2.

In resolving this issue you have spent a great deal of time and effort
on introducing a rule that says, to me at least, once F is declared
in Class1, then any specialised class of Class1 must declare F of the
same type,scope and signature as was declared in Class1. Please don't
react yet.

Just consider the replacement of the original code with this:

For i = 1 To infinty

   Select case Int(Random(i:infinty))
Case 1 
a = new Class1
Case 2
a = new Class2
Case 3 
a = Object.New(gorilla)

Case 23165
a= Object.New(blue_whale)
Case 23166
a=Object.New(bowl_of_petunias)

Case 10^2134532 and falling
a=Object.New(trillian)

Case infinity-1
a=Object.New(marvin)
Case else 
' I'll leave THAT for the readers homework
End Select
' Now magically and against all levels of improbability all of these classes 
just happen to have a method
' called F.  Strange, but not altogether improbable.

Print a.F() + i 'Will succeed, somehow in some format, or not

Next


the original code, at an improbability level of 2^3498423432 just
happened to include a situation where on the first invocation
Int(Random(i:infinty)) was 1 and even more strangely on the second
invocation Int(Random(i:infinty)) just happened to be 2.  Many pundits
and philosophers have argued over exceedingly long lunches as to how
this came about, but at the end of the day disagreed. Which only gave
them the opportunity to have lunch again sometime, preferably before or
at the end of the Universe.

OK, enough of my reminiscing of Doug Anderson.


For i =1 to 2
a=something
PRINT a.F() 
Next

Just because a happens to have a method called F, there should be no
RULE that a.F(), which happened to be an integer the first time is an
integer the second. It could be a small furry beast from Alpha
Centauri. 

Emil's example, in my opinion, has sent you off on a search for an
explicit answer to the highly improbable sequence
Int(Random(i:infinty)={1,2} where Class1 and Class2 are related through
inheritance.  His a is an object reference which just happens to have
a method F which returns an integer.  Your optimization rule seems to
be any a.F() is an integer.  I hope that through the above ramble, I
have illustrated that such a supposition cannot be considered to be true
in all instances.

Putting that another way, any expression that includes a reference to an
object cannot EXPECT that an instance within a (subsequent) iteration IS
going to return a SPECIFIC TYPE based on prior experience.

Benoit, I am Australian and therefore have a poor level of expressing
myself objectively and unemotively, in the English language.  

Please Consider.

regards
Bruce
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb3: using string as stream for sequential write operations of arbitrary datatypes

2011-08-30 Thread Bruce Bruen
On Tue, 2011-08-30 at 01:52 -0400, Kevin Fishburne wrote:


 When a transaction isn't received and I need to resend it, I'd like
 to 
 be able to refer to the transaction history and resend the data 
 (QueueOut[id].Data) without having to recalculate it, especially
 since 
 the data may have changed during the timeout period. I don't see any
 way 
 to store a completely arbitrary set of datatypes as a single
 structure 
 property however. I could write them to a file, then read the file
 into 
 a string and load it into a property of the array of structures, but 
 that's just crazy. 


Kevin,

I can't give you an answer to the question you ask, mainly because I
kept seeing bigger problems as I read your post.  From what I glean,
this is a classic TX-ACK situation and I think you are basing the code
on some type of timeout rule, such that TX-?-TX.  However, there are
some problems with that model.  Firstly, where did the failure occur?
a) firstly, the transaction was never sent from end A (why? is
immaterial. What is, is that end B will not have any possibility of
processing the transaction or sending the ACK)
b) second, the transaction was fully received by end B, but for some
reason it never ACK'ed it
b1) it did process the full transaction, but never sent the ACK
b2) it did not process the transaction and never sent the ACK
c) the transaction was fully received, processed and the ACK sent, but
it was never received by end A.
Since at the end of the timeout, end A has no knowledge of the state of
end B simply retransmitting the same transaction is considered bad
design in network theory. (I could lookup the references for you, but
they are on rotting pieces of paper somewhere in a mouldy box in the
garage, and...)  
From memory, there are at least two well-formed models regarding these
problems:
i) any retransmission is marked as such.  This puts a need on the server
to audit any retransmission and either process it or ignore it.
ii) any failed transmission is assumed to have been processed by end B
and a reversal transaction is sent by end A before retrying the
transaction.  This means that end B must implement a reversal
procedure, but puts the onus on end A to ensure that the transaction
ONLY HAPPENS ONCE (not yelling, just emphasising).

Disregarding your need to store the sent transaction for a moment, it
might be wise of you to consider how these.

hth
Bruce
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keyboard navigation of combobox

2011-08-30 Thread Bruce Bruen
On Tue, 2011-08-30 at 20:53 +0930, Bruce Bruen wrote:
 stuff about space bars

But I want to ask a question.  There appears to me these days that I'm getting 
a psychological dislike
of buttonless pop-ups.  In many application these days you are presented with a 
pop-up that asks a 
reasonable question, you input a reply but the only option you have is to close 
[x] the popup.  I'm asking
because gambas3 has some of these and from a usability point of view (or more 
correctly from a stimulus/response 
point of view) I underline/bold/emphasis don't particularly like it.

Perhaps I'm old fashioned (perhaps I'm just old), but I'm used to the 
edit/[commit|cancel] model of gui.  I get 
a feeling of uncertainty whenever I have to click on the [x] button in order to 
save something.  Further, there is 
no way to uncommit to a change.

Don't get me wrong here.  There are instances in gambas3 where this happens, 
but there are many more instances 
out there that are just reinforcing the negative feeling I'm getting.Maybe I'm 
just used to filling in government 
forms in pencil, checking them twice and using an eraser before commiting 
myself. 

But as I say, I'm asking a question.
How do others feel?

Bruce


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


  1   2   >