[Gambas-user] Gambas 3.5.1 in Debian Testing (Jessie) official repository

2013-12-22 Thread Kende Krisztián
Good news, Gambas3 packages are up-to-date in Debian official 
repository, but these packages break my and IDE created apps. I follow 
the specifications, but if I install my app on Debian Testing, this 
program not starting. Exit with error message:

gbr3: unable to load component: gb.gui

My app Gambas dependencies:

GUI common:
gambas3-gb-crypt (= 3.5.1), gambas3-gb-image (= 3.5.1), 
gambas3-runtime (= 3.5.1)

GUI GTK+:
gambas3-gb-gtk (= 3.5.1)

GUI Qt4:
gambas3-gb-qt4 (= 3.5.1)

Non-existent gambas3-gb-gui package is exist, and if I install, I get 
the following error message:

** Oops! Internal error! **
** Cannot find interface of library 'gb.geom'
ERROR: #27: Cannot load component 'gb.geom': cannot find component
** Program aborting. Sorry! :-(
** Please send a bug report at gam...@users.sourceforge.net

gb.geom component doesn't exist in any of the packages.

Are you serious? Gambas3 is completely useless.

Kendek

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


Re: [Gambas-user] A statusbar control

2013-12-22 Thread Tobias Boege
On Sun, 22 Dec 2013, Bruce wrote:
 On Sat, 2013-12-21 at 10:46 +0100, Tobias Boege wrote:
  On Sat, 21 Dec 2013, Bruce wrote:
   Did someone recently speak about having developed a statusbar form
   control?
   
  
  If you mean[0], then yes, roughly. There was a StatusBar class from
  Raymond de Bruijne (Gambas2) which I changed to be more Gambas3.
  
  (However, I haven't worked on it since I posed that question because
  the answer kind of disappointed me. But looking at it again, it seems
  pretty plausible.) Anyway, do you want to see it? There are at least
  three versions of this class in use in Hans' projects and I couldn't
  find the good one just now... I'll finish the StatusbarForm idea
  and then publish the thing in a separate article...
  
  Regards,
  Tobi
  
  [0] http://sourceforge.net/mailarchive/message.php?msg_id=31629361
  
 
 Tobi,
 
 Yes, that was the mention.
 
 Having re-read that thread (and I have no idea why the search I did
 failed for it?) and you comments above, it seems to be at the same state
 my old gb2 one was, wherever it is. Or probably a bit better, because if
 I recall correctly, I could not ever really work out what I was trying
 to achieve.
 
 Since I never got far, I sort of forgot it and got on with life.  I
 remember thinking at the time that it was such a basic idea how come
 there wasn't a native one.  Since then I have discovered that life on
 the planet has actually continued without it.
 
 But, in fact Some people seem to like this sort of thing. is exactly
 what happened this week.  They want a status bar.
 
 It's no big deal really. I was just hoping that someone had one that
 might get them off my back. So, whenever.
 
 I had another go yesterday at creating a custom status bar control, but
 yet again, came up against the same problem of deciding what it is I
 actually want.  I know some of the things I want:
 - an IDE configurable number of sub-panels,
 - automatic layout, including springiness for at least one of the
 subpanels,
 - user interaction with the statusbar to stretch a sub-panel relative to
 the others,
 - (biggy) event response, so when something happens in the application
 the app can raise an event handled by the statusbar to do/show
 something.
 

Wow, that's much. All we started from was a container for some Labels. I
have added the feature to automatically resize the labels (every label gets
a float width relative to the container's width, zero meaning fit to the
rest) when the container resizes and to put the container at the Form's
bottom automatically. That's pretty much what we needed... The main program
programmatically adds Labels and updates them through an interface of the
Statusbar.

I guess your last point can be done like I handle the two points above:
create an observer (typically with After = True) for the Form your Statusbar
lives in and then catch Resize events (in your case, you may add new events
to the Form just to serve your Statusbar).

I'm now struggling at incorporating the Statusbar into the IDE as the
Statusbar class does not inherit any other class but internally manages a
Panel. Labels are added to the statusbar via its Add() method and I don't
think the IDE understands that if I declare the class _IsContainer = True.

OTOH, if I inherit Panel, there would be things like StatusBar.Children
being pulled into the interface which I need to keep away to make the class
behave consistent.

Do you have any ideas?

 
 p.s. It was 43 degrees here yesterday. That's Celsius, not Fahrenheit.
 Today is a bit better, it's 32 at 3pm.  As such, I may have to go out
 now and find some small quantity of cold liquid refreshment, lest I
 dehydrate! :-)
 

Funny, we have around 40 degrees Fahrenheit here :-)

Regards,
Tobi

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


[Gambas-user] How do I limit directory access using the file open dialog?

2013-12-22 Thread Marty
Hello,

I'm using the open file dialog to allow the user to select one file. I 
want to limit his access to only one directory to limit the damage he 
can do. I've set the dialog.path = /home/xxx/xx. The specified 
directory is highlighted but the entire directory tree from root down is 
also accessible. Files in each directory above and below the intended 
directory can be opened. The filechooser allows for such a limit. Do I 
have to recode using the filechooser or have I missed something?

Thanks

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


Re: [Gambas-user] Native Complex type?

2013-12-22 Thread Benoît Minisini
Le 21/12/2013 16:53, Tobias Boege a écrit :
 Hi Benoit,

 is it planned to support complex numbers in Val() or to have an IsComplex()
 function?

No at the moment.

It's a problem for Val(), because some people may assume that Val() only 
returns a Date, a Boolean, a Float or an Integer.


 I see the difficulties that come with this, like having to incorporate
 complex numbers into the interpreter directly and since Complex needs to be
 an object, intermixing objcts and native datatypes in the aforementioned
 functions, etc.. but I wanted to ask anyway. (Then we could also make Sqr()
 support complex numbers, etc.)

 It would unify the way we work with complex numbers even more which would be
 appreciated on our side.

 Regards,
 Tobi


-- 
Benoît Minisini

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


Re: [Gambas-user] Time(0, 0, 555) = invalid date

2013-12-22 Thread Benoît Minisini
Le 21/12/2013 21:58, abbat81 a écrit :
 Hi!
 I'm dissapointed.
 After my last Gambas update my programm do not work.

 I had a variable named match. My old program worked OK, but for now the
 var named match - is not allowed.

 It is not problem to rename the variables.
 The problem is in Time() function.

 My old programms get error and I don't know how to fix it.

 In different places Time() function works and doesn't works.



 I get invalid date but the same code in another place works OK.

 How to fix it?


Don't use a number of seconds greater than 59.

-- 
Benoît Minisini

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


Re: [Gambas-user] Gambas 3.5.1 in Debian Testing (Jessie) official repository

2013-12-22 Thread Benoît Minisini
Le 22/12/2013 10:39, Kende Krisztián a écrit :
 Good news, Gambas3 packages are up-to-date in Debian official
 repository, but these packages break my and IDE created apps. I follow
 the specifications, but if I install my app on Debian Testing, this
 program not starting. Exit with error message:

 gbr3: unable to load component: gb.gui

 My app Gambas dependencies:

 GUI common:
 gambas3-gb-crypt (= 3.5.1), gambas3-gb-image (= 3.5.1),
 gambas3-runtime (= 3.5.1)

 GUI GTK+:
 gambas3-gb-gtk (= 3.5.1)

 GUI Qt4:
 gambas3-gb-qt4 (= 3.5.1)

 Non-existent gambas3-gb-gui package is exist, and if I install, I get
 the following error message:

 ** Oops! Internal error! **
 ** Cannot find interface of library 'gb.geom'
 ERROR: #27: Cannot load component 'gb.geom': cannot find component
 ** Program aborting. Sorry! :-(
 ** Please send a bug report at gam...@users.sourceforge.net

 gb.geom component doesn't exist in any of the packages.

 Are you serious? Gambas3 is completely useless.

 Kendek


The specification says that the 'gb.geom' and 'gb.gui' components must 
be included in the 'gambas3-runtime' package. Is it the case?

-- 
Benoît Minisini

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


Re: [Gambas-user] Gambas 3.5.1 in Debian Testing (Jessie) official repository

2013-12-22 Thread Kende Krisztián
2013-12-22 19:12 keltezéssel, Benoît Minisini írta:
 Le 22/12/2013 10:39, Kende Krisztián a écrit :
 Good news, Gambas3 packages are up-to-date in Debian official
 repository, but these packages break my and IDE created apps. I follow
 the specifications, but if I install my app on Debian Testing, this
 program not starting. Exit with error message:

 gbr3: unable to load component: gb.gui

 My app Gambas dependencies:

 GUI common:
 gambas3-gb-crypt (= 3.5.1), gambas3-gb-image (= 3.5.1),
 gambas3-runtime (= 3.5.1)

 GUI GTK+:
 gambas3-gb-gtk (= 3.5.1)

 GUI Qt4:
 gambas3-gb-qt4 (= 3.5.1)

 Non-existent gambas3-gb-gui package is exist, and if I install, I get
 the following error message:

 ** Oops! Internal error! **
 ** Cannot find interface of library 'gb.geom'
 ERROR: #27: Cannot load component 'gb.geom': cannot find component
 ** Program aborting. Sorry! :-(
 ** Please send a bug report at gam...@users.sourceforge.net

 gb.geom component doesn't exist in any of the packages.

 Are you serious? Gambas3 is completely useless.

 Kendek

 The specification says that the 'gb.geom' and 'gb.gui' components must
 be included in the 'gambas3-runtime' package. Is it the case?


In short, yes.
The 'gb.gui' component found in the 'gambas3-gb-gui' package. And 
'gb.geom' component is completely missing. This seems to be a fatal error.


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


Re: [Gambas-user] How do I limit directory access using the file open dialog?

2013-12-22 Thread Kende Krisztián
2013-12-22 18:35 keltezéssel, Marty írta:
 Hello,

 I'm using the open file dialog to allow the user to select one file. I
 want to limit his access to only one directory to limit the damage he
 can do. I've set the dialog.path = /home/xxx/xx. The specified
 directory is highlighted but the entire directory tree from root down is
 also accessible. Files in each directory above and below the intended
 directory can be opened. The filechooser allows for such a limit. Do I
 have to recode using the filechooser or have I missed something?

 Thanks

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



Set 'ReadOnly = True' (damage eliminated), or write an own file chooser. 
Need to add a 'TreeView' and some 'Button'.

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


Re: [Gambas-user] Gambas 3.5.1 in Debian Testing (Jessie) official repository

2013-12-22 Thread Kende Krisztián
2013-12-22 19:28 keltezéssel, Gianni Piccini írta:
 On 22/12/2013 10:39, Kende Krisztián wrote:

 I don't see message previously sent, if double please don't kill me :-)

 gb.geom component doesn't exist in any of the packages.
 In order to have Gambas 3.5.1 running on my Debian amd64 (the bug is
 filed in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731487), I
 walk this way: obviously I think that the problem is gb.geom.so absence
 after install.

 1) Got from Kendek's ppa :-)  the package
 gambas3-runtime_3.5.1-0trusty1_amd64.deb

 2) Unpacked the package

 3) Moved the file gb.geom.so.0.0.0 as root in /usr/bin/lib/gambas3

 4) Done two symlinks in this directory:

 root@debserv:/usr/lib/gambas3# ln -s gb.geom.so.0.0.0 gb.geom.so
 root@debserv:/usr/lib/gambas3# ln -s gb.geom.so.0.0.0 gb.geom.so.0



Yes, this is a good workaround, and not problem for me. And manually 
install the gambas3-gb-gui package is also good. :-)
But my application doesn't run other users computer. This is a problem. 
I can not ask everyone to follow them out. :-(
At least one problem solved, wait for update.


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


Re: [Gambas-user] Gambas 3.5.1 in Debian Testing (Jessie) official repository

2013-12-22 Thread Gianni Piccini
On 22/12/2013 10:39, Kende Krisztián wrote:

  gb.geom component doesn't exist in any of the packages.

In order to have Gambas 3.5.1 running on my Debian amd64 (the bug is 
filed in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731487), I 
walk this way: obviously I think that the problem is gb.geom.so absence 
after install.

1) Got from Kendek's ppa :-)  the package
gambas3-runtime_3.5.1-0trusty1_amd64.deb

2) Unpacked the package

3) Moved the file gb.geom.so.0.0.0 as root in /usr/bin/lib/gambas3

4) Done two symlinks in this directory:

root@debserv:/usr/lib/gambas3# ln -s gb.geom.so.0.0.0 gb.geom.so
root@debserv:/usr/lib/gambas3# ln -s gb.geom.so.0.0.0 gb.geom.so.0


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


Re: [Gambas-user] Gambas 3.5.1 in Debian Testing (Jessie) official repository

2013-12-22 Thread ISS Boss
Hello:

I had a completely working project that suddenly quit running.  It was 
as if the contents of the entire form went Enabled = False. Nothing 
clicks, nothing works.  It runs in the IDE, and I can click the 'Close' 
X, but the rest of the form is dead.  I can also hit a breakpoint in 
the form load routine, but nowhere else (since I can't click anything)

Info:

[System]
Gambas=3.5.1
OperatingSystem=Linux
Kernel=3.5.0-44-generic
Architecture=x86_64
Distribution=Ubuntu 12.04.3 LTS
Desktop=GNOME
Theme=QGtk
Language=en_US.UTF-8
Memory=7984M
[Libraries]
Cairo=libcairo.so.2.11000.2
Curl=libcurl.so.4.2.0
DBus=libdbus-1.so.3.5.8
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.1.0
GTK+=libgtk-x11-2.0.so.0.2400.10
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.19.0.0
Qt4=libQtCore.so.4.8.1
SDL=libSDL-1.2.so.0.11.3

Any help here?


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


Re: [Gambas-user] Problem with dialog box already displayed

2013-12-22 Thread Benoît Minisini
Le 22/12/2013 22:04, richard terry a écrit :
 Hi Benoit.

 I've noticed (infrequently) that if a dialog box is being called by
 clicking a button and my computer is busy doing other stuff chewing up
 the cpu and the user (me) doesn't get a response to the button that I
 just pressed and I press it again, gambas crashes into the IDE saying
 the dialog box is already displayed (when in fact it hasn't come up yet
 on the gui). This has been a long-standing intermittent bug for me in
 3.4 and now 3.5.1.

 Any solution to this bar putting a catch in all subroutines showing
 dialog boxes or disabling the button being pressed as soon as one clicks it?

 Regards

 richard


Is it with gb.gtk or gb.qt4?

-- 
Benoît Minisini

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


Re: [Gambas-user] Problem with dialog box already displayed

2013-12-22 Thread Benoît Minisini
Le 22/12/2013 22:08, Benoît Minisini a écrit :
 Le 22/12/2013 22:04, richard terry a écrit :
 Hi Benoit.

 I've noticed (infrequently) that if a dialog box is being called by
 clicking a button and my computer is busy doing other stuff chewing up
 the cpu and the user (me) doesn't get a response to the button that I
 just pressed and I press it again, gambas crashes into the IDE saying
 the dialog box is already displayed (when in fact it hasn't come up yet
 on the gui). This has been a long-standing intermittent bug for me in
 3.4 and now 3.5.1.

 Any solution to this bar putting a catch in all subroutines showing
 dialog boxes or disabling the button being pressed as soon as one
 clicks it?

 Regards

 richard


 Is it with gb.gtk or gb.qt4?


Can you provide a piece of the source code so that I can see how you 
display your dialog box: what you describe is possible only if the event 
loop is called during the button click event handler.

-- 
Benoît Minisini

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


Re: [Gambas-user] Problem with dialog box already displayed

2013-12-22 Thread richard terry
On 23/12/13 08:08, Benoît Minisini wrote:
 Le 22/12/2013 22:04, richard terry a écrit :
 Hi Benoit.

 I've noticed (infrequently) that if a dialog box is being called by
 clicking a button and my computer is busy doing other stuff chewing up
 the cpu and the user (me) doesn't get a response to the button that I
 just pressed and I press it again, gambas crashes into the IDE saying
 the dialog box is already displayed (when in fact it hasn't come up yet
 on the gui). This has been a long-standing intermittent bug for me in
 3.4 and now 3.5.1.

 Any solution to this bar putting a catch in all subroutines showing
 dialog boxes or disabling the button being pressed as soon as one clicks it?

 Regards

 richard

 Is it with gb.gtk or gb.qt4?
qt4


This sub  lives in a form embedded on the workspace in the main clinical 
form:

Public Sub Print_Notes()
'-
'creates pdf with page header of the progress notes
'-
If Message.Question(Are you sure you want to print out today's 
notes?, Yes, No) = 2 Then Return
modPrinting.Print_PDF(modProgressNotes.ProgressNotes_Add_Page_Header_Create_PDF_File(Notes_Editor.teNotes.RichText,
 
currentConsult, CONSULTATION))

End

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


[Gambas-user] Serial port control

2013-12-22 Thread Carl Nilsson
G'day all:
Now with Gambas 3 installed, I want to get on with porting my running 
software from VB6/Windows.  It requires processing multiple streams 
of binary serial data from attached devices.  The serial control in 
gambas 3 does not seem up to the job, in so far as the available 
properties lack the elements I use under VB MScomm.  In addition to 
the basic ones, these are inbuffer.size, outbuffer.size, 
inbuffer.count, inputMode, input Len(gth), PortOpen and, in 
particular, R Threshold and S Threshold.  The latter R/S Thresholds 
are very useful in allowing the software to get on with other 
processing while the buffers are filling - at least that is my understanding.
I ask if whoever wrote the gambas serial control has any plans to 
expand it's functionality to the MScomm level in the foreseeable 
future or can someone point me to another more comprehensive control 
I could use with gambas?
Carl

Carl S Nilsson
137 Gordons Hill Road
Lindisfarne, Tas.
Australia 7015 


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


Re: [Gambas-user] Application quit running

2013-12-22 Thread ISS Boss

   More information:
   This unresponsive behavior all takes place in the IDE under Debug-Run.
   Thinking back to just prior to this happening, I lassoed four ValueBoxes
   which were off-center and used the context menu to try and center then
   Horizontally on the form.  It was a disaster!  All four boxes were slapped
   willy-nilly across the form in no order whatsoever.  From that point onwards
   whenever I tried to run the app in the debugger it was totally unresponsive.
   Am I going to have to rebuild this entire project?
   Bill
   ISS Boss wrote, On 12/22/2013 16:07:

   Sorry.  Used an old email and forgot to change the Subject...
   ISS Boss wrote, On 12/22/2013 15:58:

Hello:

I had a completely working project that suddenly quit running.  It was
as if the contents of the entire form went Enabled = False. Nothing
clicks, nothing works.  It runs in the IDE, and I can click the 'Close'
X, but the rest of the form is dead.  I can also hit a breakpoint in
the form load routine, but nowhere else (since I can't click anything)

Info:

[System]
Gambas=3.5.1
OperatingSystem=Linux
Kernel=3.5.0-44-generic
Architecture=x86_64
Distribution=Ubuntu 12.04.3 LTS
Desktop=GNOME
Theme=QGtk
Language=en_US.UTF-8
Memory=7984M
[Libraries]
Cairo=libcairo.so.2.11000.2
Curl=libcurl.so.4.2.0
DBus=libdbus-1.so.3.5.8
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.1.0
GTK+=libgtk-x11-2.0.so.0.2400.10
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.19.0.0
Qt4=libQtCore.so.4.8.1
SDL=libSDL-1.2.so.0.11.3

Any help here?


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

References

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

References

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


Re: [Gambas-user] Application quit running

2013-12-22 Thread Benoît Minisini
Le 23/12/2013 02:24, ISS Boss a écrit :

 More information:
 This unresponsive behavior all takes place in the IDE under Debug-Run.
 Thinking back to just prior to this happening, I lassoed four ValueBoxes
 which were off-center and used the context menu to try and center then
 Horizontally on the form.  It was a disaster!  All four boxes were slapped
 willy-nilly across the form in no order whatsoever.  From that point 
 onwards
 whenever I tried to run the app in the debugger it was totally 
 unresponsive.
 Am I going to have to rebuild this entire project?
 Bill
 ISS Boss wrote, On 12/22/2013 16:07:


Can you send me your full project, and tell me on which form you moved 
the ValueBoxes?

-- 
Benoît Minisini

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


Re: [Gambas-user] Serial port control

2013-12-22 Thread Randall Morgan
As I recall gb serial is steam based and so you would handle buffers via
the stream not the serial object.


On Sun, Dec 22, 2013 at 3:01 PM, Carl Nilsson nils...@iinet.net.au wrote:

 G'day all:
 Now with Gambas 3 installed, I want to get on with porting my running
 software from VB6/Windows.  It requires processing multiple streams
 of binary serial data from attached devices.  The serial control in
 gambas 3 does not seem up to the job, in so far as the available
 properties lack the elements I use under VB MScomm.  In addition to
 the basic ones, these are inbuffer.size, outbuffer.size,
 inbuffer.count, inputMode, input Len(gth), PortOpen and, in
 particular, R Threshold and S Threshold.  The latter R/S Thresholds
 are very useful in allowing the software to get on with other
 processing while the buffers are filling - at least that is my
 understanding.
 I ask if whoever wrote the gambas serial control has any plans to
 expand it's functionality to the MScomm level in the foreseeable
 future or can someone point me to another more comprehensive control
 I could use with gambas?
 Carl

 Carl S Nilsson
 137 Gordons Hill Road
 Lindisfarne, Tas.
 Australia 7015



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




-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Serial port control

2013-12-22 Thread Carl Nilsson
Randall: Thanks for responding.  OK, I have looked at the stream 
functions:  My question was, basically, how do I specify how many 
bytes I want to take in from a given serial port at each 
instance?  For example, on one input I expect a continuous stream of 
31 byte packets and I want to take them in for processing 25 (say) 
packets at a time, i.e. 775 bytes at a time.  Now I don't much mind 
if I get a few bytes more or less because I can check for a remainder 
part-packet and put it on the front of the next nominal 775 byte 
intake - that's part of the processing software - but I don't want 
the CPU tied up with that port or stream between intakes of (about) 
775 bytes.  There are other input streams and data processing to 
attend to.  I don't see how to do that with the stream functions - 
but maybe I'm not understanding how the stream works?  I can see that 
I could (I think!) read a given number of bytes from a stream, but 
does that relieve the CPU from being tied up with that stream until I 
read another 775 bytes?  Is a stream of indefinite length or does it 
have some buffer limit?
Carl

At 01:09 PM 23/12/2013, you wrote:
As I recall gb serial is steam based and so you would handle buffers via
the stream not the serial object.


On Sun, Dec 22, 2013 at 3:01 PM, Carl Nilsson nils...@iinet.net.au wrote:

  G'day all:
  Now with Gambas 3 installed, I want to get on with porting my running
  software from VB6/Windows.  It requires processing multiple streams
  of binary serial data from attached devices.  The serial control in
  gambas 3 does not seem up to the job, in so far as the available
  properties lack the elements I use under VB MScomm.  ...(snip)


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



--
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

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


Re: [Gambas-user] Serial port control

2013-12-22 Thread Randall Morgan
It has been a long while since I have used the serial component of GB but I
have a project starting in which I will need to re-acquaint myself with it.
The stream can be setup as blocking or non-blocking. The PC uses either
polling or interrupt when the port is opened. So trying to manage the
serial port at the same level you would in on uC is pointless in most
cases. Just set up the stream and read the bytes you need from there. If
you're concerned about buffer overflow then you may want to close the port
once you have read the bytes you need.

Perhaps someone with more recent experience can help you more.




On Sun, Dec 22, 2013 at 7:15 PM, Carl Nilsson nils...@iinet.net.au wrote:

 Randall: Thanks for responding.  OK, I have looked at the stream
 functions:  My question was, basically, how do I specify how many
 bytes I want to take in from a given serial port at each
 instance?  For example, on one input I expect a continuous stream of
 31 byte packets and I want to take them in for processing 25 (say)
 packets at a time, i.e. 775 bytes at a time.  Now I don't much mind
 if I get a few bytes more or less because I can check for a remainder
 part-packet and put it on the front of the next nominal 775 byte
 intake - that's part of the processing software - but I don't want
 the CPU tied up with that port or stream between intakes of (about)
 775 bytes.  There are other input streams and data processing to
 attend to.  I don't see how to do that with the stream functions -
 but maybe I'm not understanding how the stream works?  I can see that
 I could (I think!) read a given number of bytes from a stream, but
 does that relieve the CPU from being tied up with that stream until I
 read another 775 bytes?  Is a stream of indefinite length or does it
 have some buffer limit?
 Carl

 At 01:09 PM 23/12/2013, you wrote:
 As I recall gb serial is steam based and so you would handle buffers via
 the stream not the serial object.
 
 
 On Sun, Dec 22, 2013 at 3:01 PM, Carl Nilsson nils...@iinet.net.au
 wrote:
 
   G'day all:
   Now with Gambas 3 installed, I want to get on with porting my running
   software from VB6/Windows.  It requires processing multiple streams
   of binary serial data from attached devices.  The serial control in
   gambas 3 does not seem up to the job, in so far as the available
   properties lack the elements I use under VB MScomm.  ...(snip)


   Carl
  
   Carl S Nilsson
   137 Gordons Hill Road
   Lindisfarne, Tas.
   Australia 7015
  
  
  
  
 
 --
   Rapidly troubleshoot problems before they affect your business. Most IT
   organizations don't have a clear picture of how application performance
   affects their revenue. With AppDynamics, you get 100% visibility into
 your
   Java,.NET,  PHP application. Start your 15-day FREE TRIAL of
 AppDynamics
   Pro!
  
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
  
 
 
 
 --
 If you ask me if it can be done. The answer is YES, it can always be done.
 The correct questions however are... What will it cost, and how long will
 it take?

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

 Carl S Nilsson
 137 Gordons Hill Road
 Lindisfarne, Tas.
 Australia 7015

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




-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations 

Re: [Gambas-user] Serial port control

2013-12-22 Thread Carl Nilsson
Thanks Randall.  I guess it's time to try it and play around a 
little, which I can't do for a few days.  At the moment I'm trying to 
look ahead and see where problems might lie.  When push comes to 
shove, I don't know how these things really work!  I follow 
recipes!  Don't really want to close the port as the data come in 
continuously as fast as the device can send them and I don't want to 
miss any.  (It's attitude sensor data from an inertial management 
unit in a light aircraft).  Same in principle with another 
continuous stream of binary GPS data with packets of 124 bytes 
coming in at a slower rate of, say, 4 Hz.  How continuous it is 
would depend on the baud rate at which the port is operating.  The 
RThreashold property of MScomm handles this issue very well. Doesn't 
trigger an event until the specified number of bytes is in the serial buffer.
Carl

At 02:47 PM 23/12/2013, you wrote:
It has been a long while since I have used the serial component of GB but I
have a project starting in which I will need to re-acquaint myself with it.
The stream can be setup as blocking or non-blocking. The PC uses either
polling or interrupt when the port is opened. So trying to manage the
serial port at the same level you would in on uC is pointless in most
cases. Just set up the stream and read the bytes you need from there. If
you're concerned about buffer overflow then you may want to close the port
once you have read the bytes you need.

Perhaps someone with more recent experience can help you more.




On Sun, Dec 22, 2013 at 7:15 PM, Carl Nilsson nils...@iinet.net.au wrote:

  Randall: Thanks for responding.  OK, I have looked at the stream
  functions:  My question was, basically, how do I specify how many
  bytes I want to take in from a given serial port at each
  instance?  For example, on one input I expect a continuous stream of
  31 byte packets and I want to take them in for processing 25 (say)
  packets at a time, i.e. 775 bytes at a time.  Now I don't much mind
  if I get a few bytes more or less because I can check for a remainder
  part-packet and put it on the front of the next nominal 775 byte
  intake - that's part of the processing software - but I don't want
  the CPU tied up with that port or stream between intakes of (about)
  775 bytes.  There are other input streams and data processing to
  attend to.  I don't see how to do that with the stream functions -
  but maybe I'm not understanding how the stream works?  I can see that
  I could (I think!) read a given number of bytes from a stream, but
  does that relieve the CPU from being tied up with that stream until I
  read another 775 bytes?  Is a stream of indefinite length or does it
  have some buffer limit?
  Carl
 
  At 01:09 PM 23/12/2013, you wrote:
  As I recall gb serial is steam based and so you would handle buffers via
  the stream not the serial object.
  
  
  On Sun, Dec 22, 2013 at 3:01 PM, Carl Nilsson nils...@iinet.net.au
  wrote:
  
G'day all:
Now with Gambas 3 installed, I want to get on with porting my running
software from VB6/Windows.  It requires processing multiple streams
of binary serial data from attached devices.  The serial control in
gambas 3 does not seem up to the job, in so far as the available
properties lack the elements I use under VB MScomm.  ...(snip)
 
 
Carl
   
Carl S Nilsson
137 Gordons Hill Road
Lindisfarne, Tas.
Australia 7015
   
   
   
   
  
  
 --
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into
  your
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of
  AppDynamics
Pro!
   
  http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
   
  
  
  
  --
  If you ask me if it can be done. The answer is YES, it can always be done.
  The correct questions however are... What will it cost, and how long will
  it take?
 
  - 
 -
  Rapidly troubleshoot problems before they affect your business. Most IT
  organizations don't have a clear picture of how application performance
  affects their revenue. With AppDynamics, you get 100% visibility into your
  Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
  Pro!
  
  http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
  Carl S Nilsson
  137 Gordons Hill 

Re: [Gambas-user] basics of dynamic arrays of structures

2013-12-22 Thread Kevin Fishburne

On 12/21/2013 04:57 AM, Tobias Boege wrote:

On Sat, 21 Dec 2013, Kevin Fishburne wrote:

On 12/21/2013 12:36 AM, Kevin Fishburne wrote:

I've gotten some flak about how I declare arrays and want to change my
ways. Previously I would do something like:

Public SomeArray[300,300] as Integer

I have a case now where I need an array whose number of elements will be
incremented and that will be cleared occasionally. Of course I can't
figure out how to do it. My code looks like this (I stripped it down):

---

Public Struct PlanWallStructure
 Created As Boolean
End Struct

Public Struct PlanStructure
 Wall As Struct PlanWallStructure
End Struct

Public Plan[10] As Struct PlanStructure

---

So I need, for example, Plan[0].Wall to be an array where I can do
something like:

---

Plan[0].Wall.Clear
Index = Plan[0].Wall.Count
Plan[0].Wall[Index] = True
Index = Plan[0].Wall.Count
Plan[0].Wall[Plan[0].Wall.Count] = False

---

Is this possible? I've tried every syntax I can think of and looked at
the documentation but get errors every time.


Whoops. Meant for that last bit of code to be:

Plan[0].Wall.Clear
Index = Plan[0].Wall.Count
Plan[0].Wall[Index] = True
Index = Plan[0].Wall.Count
Plan[0].Wall[Index] = False


Same thing basically for the purpose of the example.


I don't think there is an array in Gambas which lets you use its Count as
index without raising an out of bounds error :-) (and you certainly mean
Plan[0].Wall[Index]*.Created* = False or else, don't use a Struct.)

Using dynamic arrays, you would do:

---
Public Plan As PlanStructure[]

Public Sub _new()
   Dim iIndex As Integer

   Plan = New PlanStructure[](10) ' Initial size
   For iIndex = 0 To Plan.Max
 Plan[iIndex] = New PlanWallStructure
   Next
End
---

I wrote this out of my head. If it doesn't get you started, just tell me.


I may have figured it out, though please let me know if I'm doing this 
ass-backward (sample project attached). Looks like the Resize array 
method can be used to add elements as needed. I also needed to revise 
how the arrays of structures were declared in the Plan structure as your 
code example suggested.


If my project code is correct, it would be nice to have this somewhere 
in the documentation. I couldn't find a decent explanation of how to 
create and manipulate arrays anywhere in the docs. Maybe there should be 
a tutorial or example wiki along with the regular docs?


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



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


Re: [Gambas-user] Serial port control

2013-12-22 Thread Randall Morgan
I think the RTheshold of VB simply sets the byte count that must accumulate
in the receive buffer before a comm event is triggered. It doesn't do
anything else. In the background VB is still polling the buffer and looking
at the byte count. You can do this in GB but you will have to write it
yourself. You would need to simply use the read event on the comm object to
test the byte count. I believe it triggers at 1 byte. Then use that to
trigger your own custom event when your 124 bytes have arrived.

You might also be able to talk Benoit into adding an RThreshold property.
Seems like it might be handy At the very least 4Hz is very very slow
for most computers. And setting up a 4Hz polling of the port wouldn't be
hard at all.


On Sun, Dec 22, 2013 at 8:10 PM, Carl Nilsson nils...@iinet.net.au wrote:

 Thanks Randall.  I guess it's time to try it and play around a
 little, which I can't do for a few days.  At the moment I'm trying to
 look ahead and see where problems might lie.  When push comes to
 shove, I don't know how these things really work!  I follow
 recipes!  Don't really want to close the port as the data come in
 continuously as fast as the device can send them and I don't want to
 miss any.  (It's attitude sensor data from an inertial management
 unit in a light aircraft).  Same in principle with another
 continuous stream of binary GPS data with packets of 124 bytes
 coming in at a slower rate of, say, 4 Hz.  How continuous it is
 would depend on the baud rate at which the port is operating.  The
 RThreashold property of MScomm handles this issue very well. Doesn't
 trigger an event until the specified number of bytes is in the serial
 buffer.
 Carl

 At 02:47 PM 23/12/2013, you wrote:
 It has been a long while since I have used the serial component of GB but
 I
 have a project starting in which I will need to re-acquaint myself with
 it.
 The stream can be setup as blocking or non-blocking. The PC uses either
 polling or interrupt when the port is opened. So trying to manage the
 serial port at the same level you would in on uC is pointless in most
 cases. Just set up the stream and read the bytes you need from there. If
 you're concerned about buffer overflow then you may want to close the port
 once you have read the bytes you need.
 
 Perhaps someone with more recent experience can help you more.
 
 
 
 
 On Sun, Dec 22, 2013 at 7:15 PM, Carl Nilsson nils...@iinet.net.au
 wrote:
 
   Randall: Thanks for responding.  OK, I have looked at the stream
   functions:  My question was, basically, how do I specify how many
   bytes I want to take in from a given serial port at each
   instance?  For example, on one input I expect a continuous stream of
   31 byte packets and I want to take them in for processing 25 (say)
   packets at a time, i.e. 775 bytes at a time.  Now I don't much mind
   if I get a few bytes more or less because I can check for a remainder
   part-packet and put it on the front of the next nominal 775 byte
   intake - that's part of the processing software - but I don't want
   the CPU tied up with that port or stream between intakes of (about)
   775 bytes.  There are other input streams and data processing to
   attend to.  I don't see how to do that with the stream functions -
   but maybe I'm not understanding how the stream works?  I can see that
   I could (I think!) read a given number of bytes from a stream, but
   does that relieve the CPU from being tied up with that stream until I
   read another 775 bytes?  Is a stream of indefinite length or does it
   have some buffer limit?
   Carl
  
   At 01:09 PM 23/12/2013, you wrote:
   As I recall gb serial is steam based and so you would handle buffers
 via
   the stream not the serial object.
   
   
   On Sun, Dec 22, 2013 at 3:01 PM, Carl Nilsson nils...@iinet.net.au
   wrote:
   
 G'day all:
 Now with Gambas 3 installed, I want to get on with porting my
 running
 software from VB6/Windows.  It requires processing multiple streams
 of binary serial data from attached devices.  The serial control in
 gambas 3 does not seem up to the job, in so far as the available
 properties lack the elements I use under VB MScomm.  ...(snip)
  
  
 Carl

 Carl S Nilsson
 137 Gordons Hill Road
 Lindisfarne, Tas.
 Australia 7015




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

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