Re: [Gambas-user] "Long" click

2017-09-23 Thread d4t4full
That is precisely the reason I suggested an OBSERVER object. This Observer 
would get all MouseDown and MouseUp events for the desired controls and act 
accordingly.

My code was, anyway, Form-oriented on purpose to make it simpler and straight 
to the point, without the observer complication. The reader can adapt,  expand 
or innovate as needed.

Regards,
zxMarce.


On Sep 23, 2017, 14:48, at 14:48, PICCORO McKAY Lenz  
wrote:
>i understand perfectly..
>
>--->here but presed but not released
>> here a second was passed
>> here 20 second was passed but button are not released
>-> here due more that 20 second passed and but not released a
>form/window are raised
>
>
>your code looks with sense, but maybe i a good idea start the timming
>based
>on the button pressure, and not the moouse
>
>your code says> if the MOUSE button click ON ANY PART OF THE FORM start
>timing to calculate how long are pressed..
>
>and i thing you want > if the MOUSE button click ON SOME SPECIFIC
>BUTTON
>FORM et etc
>
>
>
>Lenz McKAY Gerardo (PICCORO)
>http://qgqlochekone.blogspot.com
>
>2017-09-21 6:08 GMT-04:00 ML :
>
>> My guess is that you want a new form to appear after the button is
>> raised, but having been pressed more than X seconds.
>> To this end, I'd add a timer with the desired "long-click lenght" to
>the
>> main form (the one that "receives the long-click").
>> Maybe also the form and all its controls should have an observer and
>> apply the timer to the observer, if more than one control may receive
>> the "long click".
>> So it would be MouseDown->Enable timer->MouseUp->Disable Timer. If
>the
>> timer triggered, the form should be shown:
>>
>>   Public Sub Form1_MouseDown()
>>
>> 'Start timing clicks
>> tmrLongClickEnabled = True
>>
>>   End
>>
>>   Public Sub Form1_MouseUp()
>>
>> 'Stop timing clicks
>> tmrLongClick.Enabled = False
>>
>>   End
>>
>>   Public Sub tmrLongClick_Timer()
>>
>> 'If the timer triggered before being disabled, it was a
>> "long-click", so we show the "other" form
>> Form2.Show()
>>
>> 'We also disable the timer so no more than ONE form is shown per
>> "long-click".
>> tmrLongClick.Enabled = False
>>
>>   End
>>
>> Disclaimer: It looks good on paper, but did not actually try it.
>>
>> HTH,
>> zxMarce
>>
>> On 21/09/17 06:28, Gianluigi wrote:
>> > I'm not sure I understand, but that's not enough?
>> >
>> > Public Sub Button1_MouseDown()
>> >
>> >   Form1.Show()
>> >
>> > End
>> >
>> > Public Sub Button1_MouseUp()
>> >
>> >   Form1.Hide()
>> >
>> > End
>> >
>> > Regards
>> > Gianluigi
>> >
>> > 2017-09-21 8:19 GMT+02:00 Miguel Manso :
>> >> Hi All,
>> >> I'm using gambas3 for some time now and I'd like to know your
>opinion
>> >> about the best way to implement a "long" click.
>> >> The idea is to leave a button presses for a certain amount of
>seconds
>> >> and without releasing it, a new form will open.
>> >> We did this using a timer but I'd like to know if there's any
>> >> "recommended" way of doing it.
>> >> Thanks.
>> >> --
>> >> Miguel Manso
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Two issues with the bugtracker

2017-09-15 Thread d4t4full
I guess clear cache+refresh is Ctrl-F5.

Regards.

On Sep 15, 2017, 10:14, at 10:14, "Benoît Minisini via Gambas-user" 
 wrote:
>Le 15/09/2017 à 09:46, Moviga Technologies a écrit :
>> Look at the screenshots:
>> 
>
>The bug number problem should be fixed now. But you have to create the 
>bug report again.
>
>For the second problem: can you try to reload the page without the
>cache 
>(SHIFT+F5), or clear your browser cache entirely?
>
>Regards,
>
>-- 
>Benoît Minisini
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Switching to GitLab

2017-08-13 Thread d4t4full
+1
TIA
zxMarce

On Aug 13, 2017, 09:57, at 09:57, Gianluigi  wrote:
>Hi Benoit,
>
>I apologize for ignorance but I have never used Git.
>To update the Trunk, what should I do now?
>To subscribe to the new ML?
>To report a bug?
>Write access is only for participating in the code, or?
>
>Regards
>Gianluigi
>
>2017-08-12 20:10 GMT+02:00 Benoît Minisini via Gambas-user <
>gambas-user@lists.sourceforge.net>:
>
>> Hi,
>>
>> The Gambas source repository is currently moving from SourceForge to
>> GitLab.
>>
>> The Subversion repository is now read-only.
>>
>> The new git repository is at https://gitlab.com/gambas/gambas
>>
>> If you want a write access to the GitLab repository, sign in to
>GitLab and
>> give me your account.
>>
>> The first 'gambas' is the name of the group of GitLab users.
>>
>> The second 'gambas' is the name of the project.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] XML - Display structure

2017-08-12 Thread d4t4full
Don't want to sound pedantic or be the wiseguy that states the obvious, but I 
think this is a perfect example for a recursive call.

The way I picture this is a routine that initially receives the XML root node 
and displays all its attributes and text. Then, it calls itself recursively for 
each subnode.

To mantain GUI hierarchy, a second optional parameter may be set to the parent 
node key in a treeview. This parameter is initially not passed when the node is 
root.

Hope it helps,
zxMarce.


On Aug 12, 2017, 13:43, at 13:43, Adrien Prokopowicz 
 wrote:
>Le Fri, 11 Aug 2017 14:25:33 +0200, Hans Lehmann 
>a  
>écrit:
>
>>
>> Hello,
>>
>> I am unable to read and display the structure of the following XML
>file  
>> xml.xml:
>> [...]
>> Does anyone have an idea or suggestion or even a finished solution
>for  
>> the above mentioned task? My projects with >XmlDocument and XmlReader
>do  
>> not display the structure of the xml.xml file correctly. But: Other
>XML  
>> files are displayed >correctly. We are looking for a (general)
>solution  
>> for any XML files.
>>
>
>The problem in your code is here :
>
> For Each xChild In xmlElement.ChildElements
>   'Extract Element-Value if the element has no children
>   If (xChild.ChildElements.Count = 0) Then
>
>You are assuming elements have either text or other elements in them,
>but  
>your
>E3 element has both.
>
>To do this, you have to treat each element separately, and to iterate
>on  
>all
>node types using the Children property (not just Elements, which is
>what  
>the
>ChildElements property does).
>
>The attached example gives a simple solution to your problem.
>
>Regards,
>
>-- 
>Adrien Prokopowicz
>
>
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Difference DateDiff(...) ?

2017-08-06 Thread d4t4full
Toni,

I don't think Print is at fault here at all. My guess is that DateDiff may need 
an "attitude adjustment" in these cases: It may need to either raise an 
overflow error or return a 64bit Long.

Hope this helps,
zxMarce.



On Aug 6, 2017, 12:00, at 12:00, Tony Morehen  wrote:
>zxMarce, you are exactly right.  DateDiff returns an integer so when 
>print adds the two datediff it adds 2 signed integers and gets an
>signed 
>integer.  Since the max value of a signed integer is 2147483647, the 
>answer of 2208988800 overflows to -2085978496. So print's behaviour is 
>as expected.  The only question is: Should print raise an overflow 
>error?  Note that there has not been a hardware overflow so the
>gambas's 
>math engine must do the overflow check (by matching signs).
>
>
>On 2017-08-06 10:30 AM, d4t4f...@gmail.com wrote:
>> Without a machine nearby, I'd risk you're in the right track.
>>
>> The DIM AS LONG creates 64bit vars while DateDiff may return 32bit
>data (don't have the docs with me).
>>
>> Print will use 64bit to print the vars and 32bit with direct DateDiff
>(you may confirm by using CLng to affect the DateDiff's in the second
>Print)
>>
>> Remember that when you have the most significant bit (MSB) set,
>Gambas will interpret the value as twos-complement sign and yield
>negative values.
>>
>> Regards,
>> zxMarce.
>>
>>
>> On Aug 6, 2017, 10:21, at 10:21, Hans Lehmann 
>wrote:
>>> Hello,
>>> Why are two different results:
>>>
>>> Public Sub Main()
>>>
>>>Dim a, b As Long
>>>
>>>a = DateDiff("01/01/1900", "01/01/1935", gb.Second)
>>>b = DateDiff("01/01/1935", "01/01/1970 ", gb.Second)
>>>
>>>Print a + b
>>>Print DateDiff("01/01/1900", "01/01/1935", gb.Second) +
>>> DateDiff("01/01/1935", "01/01/1970 ", gb.Second)
>>>
>>> End
>>>
>>> Results:
>>>
>>> 2208988800 ' ok
>>> -2085978496' complement?
>>>
>>> Best regards
>>>
>>> Hans
>>>
>--
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Gambas-user mailing list
>>> Gambas-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>--
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Difference DateDiff(...) ?

2017-08-06 Thread d4t4full
Without a machine nearby, I'd risk you're in the right track.

The DIM AS LONG creates 64bit vars while DateDiff may return 32bit data (don't 
have the docs with me).

Print will use 64bit to print the vars and 32bit with direct DateDiff (you may 
confirm by using CLng to affect the DateDiff's in the second Print)

Remember that when you have the most significant bit (MSB) set, Gambas will 
interpret the value as twos-complement sign and yield negative values.

Regards,
zxMarce.


On Aug 6, 2017, 10:21, at 10:21, Hans Lehmann  wrote:
>Hello,
>Why are two different results:
>
>Public Sub Main()
>
>   Dim a, b As Long
>
>   a = DateDiff("01/01/1900", "01/01/1935", gb.Second)
>   b = DateDiff("01/01/1935", "01/01/1970 ", gb.Second)
>
>   Print a + b
>   Print DateDiff("01/01/1900", "01/01/1935", gb.Second) + 
>DateDiff("01/01/1935", "01/01/1970 ", gb.Second)
>
>End
>
>Results:
>
>2208988800 ' ok
>-2085978496' complement?
>
>Best regards
>
>Hans
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] vb code

2017-07-14 Thread d4t4full
Actually a type in VBA (old VB6 and MSOffice Basic) is not regarded as an 
object, it is more akin to a C Struc.

All you do to use it is "Dim myVar As UserType". You use New for object classes 
only, and Type is not a class or object.

The Private clause makes the user type definition accessible only in the form, 
module or class where it is defined, making the type unavsilable to others.

HTH,
zxMarce.


On Jul 14, 2017, 09:36, at 09:36, PICCORO McKAY Lenz  
wrote:
>2017-07-14 3:27 GMT-04:00 Shane :
>
>> I have some vb code i want to convert to gambas and it uses this code
>>
>> Private Type ID3V22HDR
>>frameName1 As String * 3
>>frameSize1 As Byte
>>frameSize2 As Byte
>>frameSize3 As Byte
>> End Type
>>
>
>the most close are a struc.. i mean.. in the (poor) visual basic u
>define a
>"type" but really that "type" must be instanciated/redeclared before
>use it
>
>so then struc maybe its the shor.. but will act as a new class to use
>it, i
>mean, event
>
>Dim variable as new ID3V22HDR
>
>
>>
>> what would be the best way to convert this to gambas?
>>
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Split: misleading Wiki

2017-05-22 Thread d4t4full
Matti

Your string has 3 substrings when split with SPLIT (STRING, "#"):

Index 0: "Hello"
Index 1: ""
Index 2: "12345"

It is documented that separators are single characters, not strings; you can 
specify a string because any of its individual characters may be used as 
separator.

If you also specify IgnoreVoids as True, split should omit the null string and 
return only:

Index 0: "Hello"
Index 1: "12345"

HTH,
zxMarce.

On May 22, 2017, 18:02, at 18:02, Matti  wrote:
>Ok, thank you, Tobi.
>I'll have to start thinking again (but not tonight anymore).
>Matti
>
>Am 22.05.2017 um 22:17 schrieb Tobias Boege:
>> On Mon, 22 May 2017, Matti wrote:
>>> If I have a string sStr="hello##12345" and want to split it:
>>>
>>> Dim aSplit as String[]
>>> aSplit = Split(sStr, "##")
>>> Print aSplit[0], aSplit[1]
>>>
>>> Returns always only "hello". Maybe "12345" is excluded because being
>an integer?
>>>
>> It is not an integer in this case. It's a string of characters and
>Split()
>> doesn't interpret it as an integer. Consequently it has nothing to do
>with
>> IgnoreVoid in my book.
>>
>> If anything is wrong, it is your use of the separator. According to
>the
>> documentation (and the implementation!), the Separator argument is a
>*list*
>> of separator characters, i.e. "##" will not split against the string
>"##",
>> but it will split against "#" or "#".
>>
>> To give a different example, if you had given the string
>"abc#123,456" and
>> separators "#," you would have gotten the array ["abc", "123",
>"456"].
>>
>>> Now the Wiki says "StringArray = Split ( String [ , Separators ,
>Escape , IgnoreVoid , KeepEscape ] )"
>>> Where "IgnoreVoid" means "a boolean that tells Split() *not* to
>return void elements."
>>>
>>> By trial and error I found out that "IgnoreVoid" has to be set to
>'True' to return "12345". Exactly the opposite.
>>>
>>> The Wiki should be corrected here.
>>>
>> I don't know what's the problem with your installation but on mine I
>get:
>>
>>$ gbx3 -e 'Split("hello##12345", "##").Join("|")'
>>hello||12345
>>
>> i.e. it works. Notice the empty string between "hello" and "12345"
>> in the context of what I explained about the separators above!
>>
>> Regards,
>> Tobi
>>
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] result from select can be movefirts from ODBC?

2017-05-21 Thread d4t4full
Piccoro,

All .MoveXXX methods except .MoveNext need a record count from the provider. 
You know that ODBC does not provide one, but some drivers do, and I also 
patched the component to try to fetch this count when possible.

Now, the driver may NOT be correctly configured in unixODBC, allowing some 
issues. For example, if I use FreeTDS with a Server_Version of 7.0 and try to 
connect to a MSSQL2005, the compinent will not be able to fetch rec counts even 
with the patch I mentioned. But if I just change the Server_Version to 7.2, 
voilà: I get record counts via the patch.

This is because FreeTDS will not allow (nor ODBC will emulate) cursors with the 
first version combination. But it will with the second.  Cursors is what enable 
a result set to skip back and forth. The patch simply remembers where the 
cursor is (if it exists), then jumps to the last record and fetches its 
ordinal; then it goes back to where it was originally, and returns the record 
count. But for all this to work both ODBC and the driver must somehow support 
cursors, either by design or emulated.

If you use the component test project I attached to one of your bug reports, 
enable GB.Debug and try your connection string (for these tests it's  best to 
try connstrings so you don't have to edit INIs like crazy just to test), the 
console will tell you whether cursors are present or not.

Bear in mind that it is possible to have cursors available but not a proper 
Gambas RecordCount though.

Hope it helps,
zxMarce.


On May 21, 2017, 12:41, at 12:41, PICCORO McKAY Lenz  
wrote:
>now after some messaged between fabian and me, i continue in the list
>the
>problemm
>
>thanks fabian.. do you see that moveto do not permit due the grid does
>not
>fill in order.. so when the data event are raised the index are not
>secuencial so a "foward only" problem happened
>
>and now u count and then send again the select:
>
>
>  $Result = db.Exec("select count(*) irows from sys_productos")
>  $iCount = $Result!irows
>
>$Result = db.Exec("select * from sys_productos") <- in sybase odbc
>seems
>this does not work afete a count using select
>
>
>seems there's a problem in odbc, this was i do in firts, but does not
>work,
>maybe i do in bad way..
>
>due right now i not have the odbc environment.. i'll test monday and
>post
>feedback here.. but seems the odbc module in gambas has a problem in
>this
>way, due does not permit make that.. or at least does not permit
>retrieve
>the results after made a select count
>
>
>Lenz McKAY Gerardo (PICCORO)
>http://qgqlochekone.blogspot.com
>
>2017-05-19 2:59 GMT-04:30 Fabien Bodard :
>
>> 2017-05-18 17:13 GMT+02:00 PICCORO McKAY Lenz
>:
>> > yes tobias, I already know.- in last years some bugs where
>discovered by
>> me
>> > ... the surprise its that those bugs were inside gambas since some
>time
>> ..
>> > that's probe that the usage of was very few and limited .. (i mean
>too
>> many
>> > mysql )
>> >
>> > but now i can not use, the corporation now used odbc for standard
>and
>> > gundows integration ... so i must use odbc inclusivelly for mysql
>!!!
>> Arrggg
>> >
>> > so now i implement your solution, and recors fill the grid .. but
>when i
>> > separate the database logic from the form .. now the recorset gives
>me
>> the
>> > "only forward" error ...
>> >
>> > i try to attadhed the project example ... some one can helpme? the
>mail
>> > list cut the message! i cannot attach project!
>>
>> send it to me :
>>
>> gambas...@gmail.com
>> >
>> > Lenz McKAY Gerardo (PICCORO)
>> > http://qgqlochekone.blogspot.com
>> >
>> > 2017-05-17 18:49 GMT-04:00 Tobias Boege :
>> >
>> >> On Thu, 18 May 2017, Cristiano Guadagnino wrote:
>> >> > If your complaint is due to the fact that the only native
>> implementation
>> >> > for Gambas is the Mysql one, you have to understand that Mysql
>> (usually
>> >> in
>> >> > the form of MariaDB) is available on all linux distributions and
>it is
>> >> > free.
>> >> > One other free DBMS available for all linuxes is Postgresql, but
>this
>> is
>> >> > not even nearly as widely used as Mysql. I would not be very
>surprised
>> >> if,
>> >> > in fact, the great majority of Gambas developers were using
>Mysql.
>> What's
>> >> > wrong with that?
>> >> >
>> >>
>> >> (Just a quick interjection: Gambas does have a native PostgreSQL
>> driver.)
>> >>
>> >> --
>> >> "There's an old saying: Don't change anything... ever!" -- Mr.
>Monk
>> >>
>> >> 
>> >> --
>> >> Check out the vibrant tech community on one of the world's most
>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >> ___
>> >> Gambas-user mailing list
>> >> Gambas-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >>
>> > 

Re: [Gambas-user] Serial I/O with byte data

2017-05-15 Thread d4t4full
 is ASCII for STX, a special char that for some protocols mean "start 
transmission".
Some protocols frame their data payload between chars STX () and ETX().
These also normally use some checksum mechanism either before or right after 
ETX.

Of course it could also be a misleading UTF8 header of some kind resulting from 
raw data to string conversion, but that I cannot tell for sure.

You need a good protocol manual and check low-level comms frames.

Regards,
zxMarce.

On May 15, 2017, 10:42, at 10:42, alexchernoff  wrote:
>Hmm eureka, it's 02 53 = 0x53
>Or 02 25 = 0x25...
>
>Where could that 02 be from?
>
>Cheers!
>
>
>
>--
>View this message in context:
>http://gambas.8142.n7.nabble.com/Serial-I-O-with-byte-data-tp58933p58986.html
>Sent from the gambas-user mailing list archive at Nabble.com.
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [Gambas Bug Tracker] Bug #1100: ODBC driver super buggy 1: rs.count return always negative and only one event in lasted

2017-05-03 Thread d4t4full
Hehe... you're right. But I also cited IBM's ODBC docs for its DB2, and you can 
also check Easysoft's excellent C tutorials at 
http://www.easysoft.com/developer/languages/c/odbc_tutorial.html. Speaking 
about Easysoft, I myself made a command line ODBC tool to connect with 
ConnectionStrings and run queries in C with Easysoft's tutorials... And I 
absolutely suck at C. That good are those tutorials! 

Also, in case you didn't know, Microsoft was one of the leading forces behind 
drafting ODBC, as this quote from Wikipedia says: 

ODBC was originally developed by Microsoft and Progress DataDirect during the 
early 1990s, and became the basis for the Call Level Interface (CLI) 
standardized by SQL Access Group in the Unix and mainframe field. 

So by using their docs you know that that is the standard. Well, at least 
theirs... They suck at Windows (and OS making and privacy respecting in 
general), yes, but they sometimes pull nice tricks off their hats like ODBC. 
And that is not the only standard they helped draft. 

But anyway both MS and IBM  (at least when I read the docs to make the Gambas 
component work again) were kind enough to mark clearly any deviations or 
differences from the standard in their ODBC docs. 

Hope that helps, 
zxMarce.

On May 3, 2017, 21:20, at 21:20, bugtrac...@gambaswiki.org wrote:
>http://gambaswiki.org/bugtracker/edit?object=BUG.1100=L21haW4-
>
>Comment #8 by PICCORO LENZ MCKAY:
>
>i noyed u only cited mocosoft papers.. dont know about mocosoft like
>papers.. mocosoft tendts to change everything depends of their
>convenience...
>
>
>odbc its today standardized by SQL Access Group in the Unix and
>mainframe field so please cited a right paper.. not windo/like
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [Gambas Bug Tracker] Bug #1101: ODBC driver super buggy 2: rs.max return always negative and always -2 event in lasted

2017-05-03 Thread d4t4full
Hehe... you're right. But I also cited IBM's ODBC docs for its DB2, and you can 
also check Easysoft's excellent C tutorials at 
http://www.easysoft.com/developer/languages/c/odbc_tutorial.html. Speaking 
about Easysoft, I myself made a command line ODBC tool to connect with 
ConnectionStrings and run queries in C with Easysoft's tutorials... And I 
absolutely suck at C. That good are those tutorials!

Also, in case you didn't know, Microsoft was one of the leading forces behind 
drafting ODBC, as this quote from Wikipedia says:

ODBC was originally developed by Microsoft and Progress DataDirect during the 
early 1990s, and became the basis for the Call Level Interface (CLI) 
standardized by SQL Access Group in the Unix and mainframe field.

So by using their docs you know that that is the standard. Well, at least 
theirs... They suck at Windows (and OS making and privacy respecting in 
general), yes, but they sometimes pull nice tricks off their hats like ODBC. 
And that is not the only standard they helped draft.

But anyway both MS and IBM  (at least when I read the docs to make the Gambas 
component work again) were kind enough to mark clearly any deviations or 
differences from the standard in their ODBC docs.

Hope that helps,
zxMarce.

On May 3, 2017, 21:19, at 21:19, bugtrac...@gambaswiki.org wrote:
>http://gambaswiki.org/bugtracker/edit?object=BUG.1101=L21haW4-
>
>Comment #2 by PICCORO LENZ MCKAY:
>
>i noyed u only cited mocosoft papers.. dont know about mocosoft like
>papers..  mocosoft tendts to change everything depends of their
>convenience...
>
>odbc its today standardized by SQL Access Group in the Unix and
>mainframe field so please cited a right paper.. not windo/like
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] New component gb.rss to generate and parse RSS documents

2017-04-02 Thread d4t4full
Got it.
Thanks Benoît.

On Apr 2, 2017, 20:51, at 20:51, "Benoît Minisini" 
 wrote:
>Le 03/04/2017 à 00:48, d4t4f...@gmail.com a écrit :
>> I do not see the need to "force" developers needing timezone handling
>> functionality to add a reference to gb.util.web; expecting to have
>> timezone capability in a web component is simply not intuitive.
>>
>> Couldn't the timezone be a new property of the Date type/object,
>> defaulting to the System's timezone? This way older programs and
>> interpreters ignoring it would still work.
>>
>> An alternative would be to add an (optional) timezone pareter to
>> DateAdd, and/or a new Format specifier for timezone. I do not have it
>> present now, but if Gambas has Dateserial/Timeserial functions, they
>> could too receive timezone as optional info.
>>
>> Just my two cents. zxMarce
>>
>
>A lot of confusion again...
>
>Time is absolute in Gambas: there is no timezone associated with a 
>Gambas date/time value.
>
>Timezone is a local concept. By the way you have System.Timezone to get
>
>the local timezone of your system.
>
>When I talk about gb.util.web, I think about a function that convert a 
>standard (RFC #) date/time string representation with a timezone to
>
>a Gambas date/time value.
>
>Of course, it can be in gb.util. It depends on the format. If it is a 
>specific web date format, it's logical to put it in gb.util.web
>instead.
>
>Regards,
>
>-- 
>Benoît Minisini
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] New component gb.rss to generate and parse RSS documents

2017-04-02 Thread d4t4full
I do not see the need to "force" developers needing timezone handling  
functionality to add a reference to gb.util.web; expecting to have timezone 
capability in a web component is simply not intuitive.

Couldn't the timezone be a new property of the Date type/object, defaulting to 
the System's timezone? This way older programs and interpreters ignoring it 
would still work.

An alternative would be to add an (optional) timezone pareter to DateAdd, 
and/or a new Format specifier for timezone. I do not have it present now, but 
if Gambas has Dateserial/Timeserial functions, they could too receive timezone 
as optional info.

Just my two cents.
zxMarce

On Apr 2, 2017, 17:40, at 17:40, "Benoît Minisini" 
 wrote:
>Le 02/04/2017 à 22:34, Tobias Boege a écrit :
>> On Sun, 02 Apr 2017, Benoît Minisini wrote:
>>> Le 02/04/2017 à 18:07, Tobias Boege a écrit :
 Hello all,

 I wrote an RSS feed generator for one of my projects recently and
>could
 luckily complete also the parser before the new semester starts
>tomorrow.
 So you get a gb.rss component in the latest revision #8117.

 It should support all the things that are mentioned in the RSS 2.0
 specification here [1], but there are still some problems:

   * The date conversion routines ignore timezones completely,
>because
 I have no clue about working with timezones in Gambas.
>>>
>>> As I don't know RSS, can you elaborate? What do you need to do
>exactly
>>> with timezones?
>>>
>>
>> The items in an RSS feed (and the feed itself) contain publication
>dates
>> such as
>>
>>   Sat, 07 Sep 2002 10:00:00 GMT
>>
>> At the moment, when I read this string into a Date and use it in a
>Gambas
>> application, the timezone is ignored, i.e. it will be the 7th Sep
>2002 at
>> 10:00:00 *system-local timezone*, which is not correct. You can see
>this
>> when you serialise the RSS object into an XML document again. It
>gives:
>>
>>   Sat, 07 Sep 2002 10:00:00 +0100
>>
>> because my system is in +0100 now.
>>
>> I don't know how this situation is best handled. The Gambas Date type
>is
>> not big enough to carry timezone information, is it? Then I would
>have to
>> convert the given time to the system timezone
>>
>>   10:00:00 GMT -> 09:00:00 +0100
>>
>> which results in the XML output
>>
>>   Sat, 07 Sep 2002 09:00:00 +0100
>>
>> later, which is not identical to the source but at least represents
>the same
>> point in time. But I could image that being able to set the target
>timezone
>> explicitly would be desirable, e.g. when your RSS feed item
>represents a
>> story in a German newspaper, but your server runs in a US timezone.
>>
>> Regards,
>> Tobi
>>
>
>Date in Gambas are storead as a number of days and microseconds from a 
>specific origin, and are always considered as UTC.
>
>They are converted to the timezone associated with the localisation
>when 
>you use Str() or Format() or Print.
>
>To convert a date ti a specific timezone, you have to convert the date 
>part taken as UTC, and then you add (or substract I think, must be 
>checked!) the time zone value (which are hours).
>
>Maybe this is an utility function to implement in gb.util.web...
>
>-- 
>Benoît Minisini
>
>--
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Set cursor position on a webview editable.

2016-12-07 Thread d4t4full
I was just curious about the use of CTRL-RIGHT instead of CTRL-END. The latter 
normally takes the cursor to the end of the text, while the former just skips a 
word at a time. One of the examples in this thread splitted the text at spaces 
and then skipped one word at a time in a FOR loop instead of jumping right 
through to the end.

I thought that what the original poster wanted was getting to the text end, not 
the current word's end.

Just my two cents, maybe I did not fully understood the issue at hand, sorry if 
that's the case.

Regards,
zxMarce.

On Dec 7, 2016, 16:21, at 16:21, Gianluigi  wrote:
>Just for information, if you add "Me.SetFocus" as well:
>...
>Dec Application.Busy
>Me.SetFocus
>hwebView.SetFocus
>Desktop.SendKeys("{[Control_L][Right]}")
>...
>
>SendKeys works.
>
>Regards
>Gianluigi
>
>2016-12-07 17:42 GMT+01:00 Jorge Carrión :
>
>> Anohter try. This time containing only de (spanish) words beginning
>on "A"
>>
>>
>> 2016-12-07 14:53 GMT+01:00 Fabien Bodard :
>>
>> > 2016-12-07 12:22 GMT+01:00 Jorge Carrión :
>> > > I'm afraid that my Javascript abilities are too limited.
>> > > I Just tried to manage with webview.eval(documment.execcommand
>... )
>> but
>> > > without success...
>> > >
>> > > Thanks for the answer...
>> > >
>> > > The project has been rejected for mailing list 1,5mb (too big may
>be)?
>> >
>> > Too big for sure :-)
>> >
>> > 
>> > --
>> > Developer Access Program for Intel Xeon Phi Processors
>> > Access to Intel Xeon Phi processor-based developer platforms.
>> > With one year of Intel Parallel Studio XE.
>> > Training and support from Colfax.
>> > Order your platform today.http://sdm.link/xeonphi
>> > ___
>> > Gambas-user mailing list
>> > Gambas-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>>
>> 
>> --
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today.http://sdm.link/xeonphi
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
>--
>Developer Access Program for Intel Xeon Phi Processors
>Access to Intel Xeon Phi processor-based developer platforms.
>With one year of Intel Parallel Studio XE.
>Training and support from Colfax.
>Order your platform today.http://sdm.link/xeonphi
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [Gambas Bug Tracker] Bug #1013: gb.db.odbc new GetRecordCount mechanism seem not work with firebird database

2016-09-25 Thread d4t4full
Christian,

Hi. I made the GetRecordCount() function.

Can you please be more specific as why it does not work for you? I do not have 
an FB DB to test, so if you could please be clear as how it fails I'll 
appreciate it.

Thank you,
zxMarce.



On Sep 25, 2016, 17:42, at 17:42, bugtrac...@gambaswiki.org wrote:
>http://gambaswiki.org/bugtracker/edit?object=BUG.1013=L21haW4-
>
>Christian FAURE reported a new bug.
>
>Summary
>---
>
>gb.db.odbc new GetRecordCount mechanism seem not work with firebird
>database
>
>Type : Bug
>Priority : Medium
>Gambas version   : Unknown
>Product  : Unknown
>
>
>Description
>---
>
>New GetRecordCount method always return zero when used with a Firebird
>test database.
>as workaround i've uncomented the old call to SQLRowCount and comented
>the new call to GetRecordCount
>
>
>
>
>
>--
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user