Re: [Gambas-user] reading files
thank you Gian i did take a rest and read but alas it did not help as far as i see it he is saying don't use binary file for fixed length strings but as this is an mp3 file tag witch i have no control i am doomed On 18/07/17 19:22, Gianluigi wrote: Why do not you take a moment of rest and read what Tobias Boege recommend me in the discussion [0] I told you here [1]? [0] http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html 2017-07-18 9:04 GMT+02:00 Shane : I am very confused from the docs _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ so wouldn't it be_ _ IDtag = read #hfile as ID3v1_TAG ? with doesn't work by the way On 18/07/17 12:44, nand...@nothingsimple.com wrote: I think Read #hfile, IDtag, ID3v1_TAG should be Read #hfile, IDtag as ID3v1_TAG -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Shane To: gambas-user@lists.sourceforge.net Sent: Tue, 18 Jul 2017 10:50:43 +1000 Subject: Re: [Gambas-user] reading files i don't know what i am doing wrong Public Struct ID3v1_TAG '(128 bytes) Tag[3] As String 'always TAG Title[30] As String 'title, 30 characters Artist[30] As String 'artist, 30 characters Album[30] As String 'album, 30 characters Year[4] As String 'year, 4 characters Comment[30] As String 'comment, 30 characters (or 28 if track# included) Genre As Byte 'genre, 255 for none defined End Struct Private Sub GetID3v1(File As String) Dim IDtag As ID3v1_TAG Dim hfile As File hfile = Open File For Read ' 'read the tag ' seek to end of less tag size Read #hfile, IDtag, ID3v1_TAG here i get IDtag is NULL On 18/07/17 05:05, nand...@nothingsimple.com wrote: Yes it is possible, I do it. here is some code (incomplete) -Nando (Canada) ' top of class file Public Struct recstruc _a as integer _b as integer _c as integer end struct ' a function public function openAfile(filename as string) as file dim hfile as file dim arec as recstruc hfile = open filename for read write create with arec 'some values to write. ._a = 1 ._b = 22 ._c = 333 end with write #hfile, arec as recstruc 'if you position the hfile pointer back to zero, you can... read #hfile, arec as recstruc close #hfile end -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: T Lee Davidson To: gambas-user@lists.sourceforge.net Sent: Sun, 16 Jul 2017 12:42:35 -0400 Subject: Re: [Gambas-user] reading files On 07/16/2017 06:57 AM, Shane wrote: given this example PRIVATE SUB BinaryRead(FilePath AS String) DIM binaryFile AS File DIM i AS Integer DIM b AS Byte DIM s AS Short DIM s1 AS String DIM s2 AS String ' Read binary file binaryFile = OPEN FilePath FOR READ READ #binaryFile, i READ #binaryFile, b READ #binaryFile, s READ #binaryFile, s1 READ #binaryFile, s2 CLOSE #binaryFile ' Display results PRINT i PRINT b PRINT s PRINT s1 PRINT s2 END is there a way for gambas to read a struct of all these variables in one read ? You may have hinted at the solution within your question. Have you considered using a Structure? http://gambaswiki.org/wiki/lang/read : "... reads the stream Stream as binary data whose type is specified by the Datatype argument." "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, Collection or structure." http://gambaswiki.org/wiki/lang/structdecl -- Lee -- 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 --- End of Original Message --- -- 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 _
Re: [Gambas-user] Gambas Playground
Le Wed, 19 Jul 2017 01:50:08 +0200, PICCORO McKAY Lenz a écrit: good made it! its good to know more and more of gambas are happened two things> 1) the playground seems only applies most to gambas scripts rather thant other gambas things 2) wheres its the code that generates the service, i mean url post here! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com I'm not sure I can understand you correctly, but I'll try my best. :) If by "other gambas things" you mean "full projects", then yes, the playground is only intended to run Gambas scripts, since it is designed for quick tests and prototyping, and sharing/running code on Gambas mailing-lists and forums. But since Gambas scripts are no different from a regular project (except that every class/module is in a single file), I don't see how it is a problem. And for the code, I just pushed it to a GitLab repository. You'll find it here : https://gitlab.com/prokopyl/gambas-playground 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
Re: [Gambas-user] Gambas Playground
good made it! its good to know more and more of gambas are happened two things> 1) the playground seems only applies most to gambas scripts rather thant other gambas things 2) wheres its the code that generates the service, i mean url post here! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-16 10:32 GMT-04:00 Gianluigi : > Hi Adrien, > > Thank you very much for the detailed answer. > Now I know how to behave the next time I'm wrong :) > > Regards > Gianluigi > > 2017-07-16 16:03 GMT+02:00 Adrien Prokopowicz < > adrien.prokopow...@gmail.com> > : > > > Le Sun, 16 Jul 2017 15:10:55 +0200, Gianluigi a > > écrit: > > > > Thanks Adrien, > >> I was able to mistake my first insertion (I left useless code) :(. > >> Can I fix it? [0] > >> > >> Regards > >> Gianluigi > >> > >> [0] > >> http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-v > >> alues-td59733.html > >> > >> > > Hi Gianluigi, > > > > You can't edit anonymous Gists once they are created, but a bit of extra > > code is > > no big deal, you can just edit your code in the playground and generate a > > new link. > > (GitHub has plenty of storage space. :) ) > > > > As a side note, if you happen to accidentally share sensitive data inside > > a code link > > (such as passwords), you can contact the GitHub team[0] and ask them to > > delete it. > > The playground itself does not store anything, so you don't need to worry > > about it. > > > > If, in the future, you want to share some code on the playground and be > > able to edit > > it later, you can log in in GitHub, create a Gist from there and then > > manually craft > > a link to the playground like this : > > https://gambas-playground.proko.eu/?gist=your_gist_id_here > > > > Hope this helps. :) > > > > [0] https://help.github.com/articles/deleting-an-anonymous-gist/ > > -- > > 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 > -- 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] Pre-release of Gambas 3.10.0
by second chance fernando you dont have the complete overall of the threath and also the problem of odbc has all my colaboration... please search for the bugtracketr.. 2017-07-18 19:18 GMT-04:00 Fernando Cabral : > "2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : > > its great that a languaje has so easy to lear.. i really need the odbc > > componente to fixed due make programs in gambas are sure for easy! the > > most easy to make its gambas > > > > i dont understand why python its so famous, i understand now! gambas not > > have enough support and vision! > > > > Piccoro, I want to give you for free my two cents on this issue. > > As I see it, Gambas is a free-to-use language. Free and "as is". *No > guarantees*. It means, take it, or leave it. > > It was developed and made available by a volunteer with the eventual help > of other volunteers. So, I can't understand why you insist in saying things > like "gambas [has] not enough support and vision!". > > I don't think this is a nice thing to say when you have free lunch. The > least I can say is that you should not look a gift horse in the mouth. Or, > as the Romans used to say, "Noli equi dentes inspicere donati". This can be > translated to plain English (I think) as "don't be ungrateful when you > receive a gift. > > If you need a good ODBC interface and Gambas doesn't provide it, perhaps > you can develop it yourself and make it available for other people that may > have the same need. That would be much appreciated, I am sure. > > Otherwise, you can use other available libraries (I am sure there are > many). > If neither is attractive to you, then you can give up Gambas and try > something different. > > I think saying Gambas has not "enough support and vision" is not a good way > to obtain what you want. > > Those are my two cents. After that, I'll shut my mouth up as far as this > issue is concerned. > > Best regards > > - fernando > > 2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : > > > 2017-07-18 17:10 GMT-04:00 Tony Morehen : > > > > > Finally, I'd like to say how amazingly satisfying it is to work with > > > Gambas. So far I have developed a Desktop Panel and Menu, a Text > > Editor, a > > > File Explorer and a car computer app that runs on a Raspberry Pi and > > plays > > > audiovideo and embeds NavIt, plus other projects. I intend to upload > > these > > > to the software farm, testing permitted. Attached is a screen shot > > showing > > > off some of these projects. > > > > > its great that a languaje has so easy to lear.. i really need the odbc > > componente to fixed due make programs in gambas are sure for easy! the > > most easy to make its gambas > > > > i dont understand why python its so famous, i understand now! gambas not > > have enough support and vision! > > > > > > > > > BTW I have several compoments I have been working on. How do I submit > > > them for your approval and possible inclusion in Gambas. > > > > > > One is Filebrower, based on Dirview. It's drop in compatible with > > DirView > > > but adds two additional properties to allow the display of files in the > > > tree and to sort folders first. It also has an added event > > > GetSpecialIcon(sPath As String, iIconType As Integer), which is like > the > > > Icon event but includes a flag specifying folder, open folder or file. > > > > > > Another component is UpDown. It is derived from Spinbar with a > property > > > (Showbar) that toggles the display of the bar. I needed a SpinBox > with a > > > float value. > > > > > > On a more trivial note, I have a status bar component, based on code I > > > found floating on the web. > > > > > > the best place to put your code its a git repo, please use gitlab due > > github are close to closed source and privative software > > > > > > > On 2017-07-18 03:39 PM, Benoît Minisini wrote: > > > > > >> Le 18/07/2017 à 19:12, Tony Morehen a écrit : > > >> > > >>> I'll compile and start using it right away. In the meantime, a > feature > > >>> request: > > >>> > > >>> Currently, a menu item with children does nothing before displaying > its > > >>> child menu items. I propose that the parent menu raise a click event > > >>> before displaying its children. This would allow you to show/not > show > > >>> enable/disable child menu items based on the current state of the app > > or > > >>> its environment. > > >>> > > >>> For example, when the edit menu is clicked, you can enable/disable > the > > >>> paste item based on the state of the clipboard. > > >>> > > >>> This change should not affect existing apps as they will not have > click > > >>> handlers for parent menus. > > >>> > > >>> > > >> Why don't you use the Show and Hide events? > > >> > > >> > > > > > > > > > -- > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > >
Re: [Gambas-user] Pre-release of Gambas 3.10.0
"2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : its great that a languaje has so easy to lear.. i really need the odbc > componente to fixed due make programs in gambas are sure for easy! the > most easy to make its gambas > > i dont understand why python its so famous, i understand now! gambas not > have enough support and vision! > Piccoro, I want to give you for free my two cents on this issue. As I see it, Gambas is a free-to-use language. Free and "as is". *No guarantees*. It means, take it, or leave it. It was developed and made available by a volunteer with the eventual help of other volunteers. So, I can't understand why you insist in saying things like "gambas [has] not enough support and vision!". I don't think this is a nice thing to say when you have free lunch. The least I can say is that you should not look a gift horse in the mouth. Or, as the Romans used to say, "Noli equi dentes inspicere donati". This can be translated to plain English (I think) as "don't be ungrateful when you receive a gift. If you need a good ODBC interface and Gambas doesn't provide it, perhaps you can develop it yourself and make it available for other people that may have the same need. That would be much appreciated, I am sure. Otherwise, you can use other available libraries (I am sure there are many). If neither is attractive to you, then you can give up Gambas and try something different. I think saying Gambas has not "enough support and vision" is not a good way to obtain what you want. Those are my two cents. After that, I'll shut my mouth up as far as this issue is concerned. Best regards - fernando 2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : > 2017-07-18 17:10 GMT-04:00 Tony Morehen : > > > Finally, I'd like to say how amazingly satisfying it is to work with > > Gambas. So far I have developed a Desktop Panel and Menu, a Text > Editor, a > > File Explorer and a car computer app that runs on a Raspberry Pi and > plays > > audiovideo and embeds NavIt, plus other projects. I intend to upload > these > > to the software farm, testing permitted. Attached is a screen shot > showing > > off some of these projects. > > > its great that a languaje has so easy to lear.. i really need the odbc > componente to fixed due make programs in gambas are sure for easy! the > most easy to make its gambas > > i dont understand why python its so famous, i understand now! gambas not > have enough support and vision! > > > > > BTW I have several compoments I have been working on. How do I submit > > them for your approval and possible inclusion in Gambas. > > > > One is Filebrower, based on Dirview. It's drop in compatible with > DirView > > but adds two additional properties to allow the display of files in the > > tree and to sort folders first. It also has an added event > > GetSpecialIcon(sPath As String, iIconType As Integer), which is like the > > Icon event but includes a flag specifying folder, open folder or file. > > > > Another component is UpDown. It is derived from Spinbar with a property > > (Showbar) that toggles the display of the bar. I needed a SpinBox with a > > float value. > > > > On a more trivial note, I have a status bar component, based on code I > > found floating on the web. > > > > the best place to put your code its a git repo, please use gitlab due > github are close to closed source and privative software > > > > On 2017-07-18 03:39 PM, Benoît Minisini wrote: > > > >> Le 18/07/2017 à 19:12, Tony Morehen a écrit : > >> > >>> I'll compile and start using it right away. In the meantime, a feature > >>> request: > >>> > >>> Currently, a menu item with children does nothing before displaying its > >>> child menu items. I propose that the parent menu raise a click event > >>> before displaying its children. This would allow you to show/not show > >>> enable/disable child menu items based on the current state of the app > or > >>> its environment. > >>> > >>> For example, when the edit menu is clicked, you can enable/disable the > >>> paste item based on the state of the clipboard. > >>> > >>> This change should not affect existing apps as they will not have click > >>> handlers for parent menus. > >>> > >>> > >> Why don't you use the Show and Hide events? > >> > >> > > > > > > -- > > 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.sou
Re: [Gambas-user] Pre-release of Gambas 3.10.0
2017-07-18 17:10 GMT-04:00 Tony Morehen : > Finally, I'd like to say how amazingly satisfying it is to work with > Gambas. So far I have developed a Desktop Panel and Menu, a Text Editor, a > File Explorer and a car computer app that runs on a Raspberry Pi and plays > audiovideo and embeds NavIt, plus other projects. I intend to upload these > to the software farm, testing permitted. Attached is a screen shot showing > off some of these projects. > its great that a languaje has so easy to lear.. i really need the odbc componente to fixed due make programs in gambas are sure for easy! the most easy to make its gambas i dont understand why python its so famous, i understand now! gambas not have enough support and vision! > BTW I have several compoments I have been working on. How do I submit > them for your approval and possible inclusion in Gambas. > > One is Filebrower, based on Dirview. It's drop in compatible with DirView > but adds two additional properties to allow the display of files in the > tree and to sort folders first. It also has an added event > GetSpecialIcon(sPath As String, iIconType As Integer), which is like the > Icon event but includes a flag specifying folder, open folder or file. > > Another component is UpDown. It is derived from Spinbar with a property > (Showbar) that toggles the display of the bar. I needed a SpinBox with a > float value. > > On a more trivial note, I have a status bar component, based on code I > found floating on the web. > > the best place to put your code its a git repo, please use gitlab due github are close to closed source and privative software > On 2017-07-18 03:39 PM, Benoît Minisini wrote: > >> Le 18/07/2017 à 19:12, Tony Morehen a écrit : >> >>> I'll compile and start using it right away. In the meantime, a feature >>> request: >>> >>> Currently, a menu item with children does nothing before displaying its >>> child menu items. I propose that the parent menu raise a click event >>> before displaying its children. This would allow you to show/not show >>> enable/disable child menu items based on the current state of the app or >>> its environment. >>> >>> For example, when the edit menu is clicked, you can enable/disable the >>> paste item based on the state of the clipboard. >>> >>> This change should not affect existing apps as they will not have click >>> handlers for parent menus. >>> >>> >> Why don't you use the Show and Hide events? >> >> > > > -- > 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] Pre-release of Gambas 3.10.0
wheantime i do that, but are quite slower and ocmplicated due memory hungy in large datasets! also i notes that when i work with collections the IDE becomes slower, some icons dissapears and then hangs after many minutes of use it! i'll try to report this before but a low interes happened! the problem persist in gambas 3.10 2017-07-18 16:29 GMT-04:00 Benoît Minisini : > Le 18/07/2017 à 22:15, PICCORO McKAY Lenz a écrit : > >> SORRY i send and all the conversation was beetwen benoit and me without >> noted it!!! seerending! >> >> 2017-07-18 16:05 GMT-04:00 Benoît Minisini >> : >> >> Of course, for proprietary databases, this is a problem. We must wait for >>> zxMarce to fix the driver. That's life... >>> >> > > >> ... > >> > > Moreover, I think you can workaround the problems of the ODBC driver by > reimplementing the Result class in Gambas, overriding the accurate > properties (Count) and methods (Move...), and fixing the default behaviour > according to the Connection type. > > Something like that: > > ' Result class > > Export > > Property Read Count As Integer > > Private Sub Count_Read() As Integer > > If Me.Connection.Type = "odbc" Then > ' workaround > ... > Else > Return Super.Count > Endif > > End > > > -- > 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
Re: [Gambas-user] Undo/Redo logic.
Hi Julio, only now I could take a look. It looks like a very interesting code. As soon as possible I go to study it, then I'll let you know. Thank You very much. Regards Gianluigi 2017-07-18 19:31 GMT+02:00 Julio Sanchez : > Gianluigi: > > I leave you an example where you can see the use of the Command pattern to > do and undo. Hope this can help you. > > http://jsbsan.blogspot.com.es/2013/11/patron-command- > implementar-deshacer-y.html > > > Regards > > Julio > > > > 2017-07-18 14:05 GMT+02:00 Gianluigi : > > > In addition to what Gambas already provides for some controls, I would > like > > to implement undo/redo on the whole project level. > > I tried to understand the logic of Gambas's IDE, unfortunately without > > success. > > Which is the right way forward. > > > > Regards > > Gianluigi > > > > -- > > 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] Pre-release of Gambas 3.10.0
Le 18/07/2017 à 22:15, PICCORO McKAY Lenz a écrit : SORRY i send and all the conversation was beetwen benoit and me without noted it!!! seerending! 2017-07-18 16:05 GMT-04:00 Benoît Minisini : Of course, for proprietary databases, this is a problem. We must wait for zxMarce to fix the driver. That's life... > ... > Moreover, I think you can workaround the problems of the ODBC driver by reimplementing the Result class in Gambas, overriding the accurate properties (Count) and methods (Move...), and fixing the default behaviour according to the Connection type. Something like that: ' Result class Export Property Read Count As Integer Private Sub Count_Read() As Integer If Me.Connection.Type = "odbc" Then ' workaround ... Else Return Super.Count Endif End -- 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
Re: [Gambas-user] Pre-release of Gambas 3.10.0
SORRY i send and all the conversation was beetwen benoit and me without noted it!!! seerending! 2017-07-18 16:05 GMT-04:00 Benoît Minisini : > Of course, for proprietary databases, this is a problem. We must wait for > zxMarce to fix the driver. That's life... ahhh that's better response rather than "use mysql its great" or "migrate to mysql".. u ok the problem its that i cannot upgrade my OS's so i hope gambas will not raise depends again until this issues wirth odbc have solved! Help us "zxMarce" you are our only hope!! "you are the chose man" (umm that sound like a movie frase, sounds familiar ! ) Le 18/07/2017 à 22:00, PICCORO McKAY Lenz a écrit : > ok but for enterprise and migration tool to those databases i need pleny > access with gambas to sybase, mssql, informix, gambas had very bad support > in that DBMS and for worse, the odbc in gambas has some issues with that > databases... > > how can i migrate and promote opensource with mysql if i can access pleny > with the application in those DBMS? > > of course, many here now will said "use another languaje, use another > platform" or must be that the point? > -- 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] Pre-release of Gambas 3.10.0
Le 18/07/2017 à 19:12, Tony Morehen a écrit : I'll compile and start using it right away. In the meantime, a feature request: Currently, a menu item with children does nothing before displaying its child menu items. I propose that the parent menu raise a click event before displaying its children. This would allow you to show/not show enable/disable child menu items based on the current state of the app or its environment. For example, when the edit menu is clicked, you can enable/disable the paste item based on the state of the clipboard. This change should not affect existing apps as they will not have click handlers for parent menus. Why don't you use the Show and Hide events? -- 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
Re: [Gambas-user] Pre-release of Gambas 3.10.0
seems the problems in odbc are still present, why? please gambas witout odbc are a toy to play with mysql and postgres! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-18 13:12 GMT-04:00 Tony Morehen : > I'll compile and start using it right away. In the meantime, a feature > request: > > Currently, a menu item with children does nothing before displaying its > child menu items. I propose that the parent menu raise a click event > before displaying its children. This would allow you to show/not show > enable/disable child menu items based on the current state of the app or > its environment. > > For example, when the edit menu is clicked, you can enable/disable the > paste item based on the state of the clipboard. > > This change should not affect existing apps as they will not have click > handlers for parent menus. > > > On 2017-07-18 11:56 AM, Benoît Minisini via Gambas-user wrote: > >> Hi, >> >> I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: >> >> https://sourceforge.net/projects/gambas/files/gambas3/gambas >> 3-3.10.0.tar.bz2/download >> >> Can people test it and report any problem before I make the release >> public? >> >> Thanks in advance! >> >> > > > > -- > 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] Undo/Redo logic.
Gianluigi: I leave you an example where you can see the use of the Command pattern to do and undo. Hope this can help you. http://jsbsan.blogspot.com.es/2013/11/patron-command-implementar-deshacer-y.html Regards Julio 2017-07-18 14:05 GMT+02:00 Gianluigi : > In addition to what Gambas already provides for some controls, I would like > to implement undo/redo on the whole project level. > I tried to understand the logic of Gambas's IDE, unfortunately without > success. > Which is the right way forward. > > Regards > Gianluigi > > -- > 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] Pre-release of Gambas 3.10.0
I'll compile and start using it right away. In the meantime, a feature request: Currently, a menu item with children does nothing before displaying its child menu items. I propose that the parent menu raise a click event before displaying its children. This would allow you to show/not show enable/disable child menu items based on the current state of the app or its environment. For example, when the edit menu is clicked, you can enable/disable the paste item based on the state of the clipboard. This change should not affect existing apps as they will not have click handlers for parent menus. On 2017-07-18 11:56 AM, Benoît Minisini via Gambas-user wrote: Hi, I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: https://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.10.0.tar.bz2/download Can people test it and report any problem before I make the release public? Thanks in advance! -- 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
[Gambas-user] Pre-release of Gambas 3.10.0
Hi, I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: https://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.10.0.tar.bz2/download Can people test it and report any problem before I make the release public? Thanks in advance! -- 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
[Gambas-user] Undo/Redo logic.
In addition to what Gambas already provides for some controls, I would like to implement undo/redo on the whole project level. I tried to understand the logic of Gambas's IDE, unfortunately without success. Which is the right way forward. Regards Gianluigi -- 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] reading files
Why do not you take a moment of rest and read what Tobias Boege recommend me in the discussion [0] I told you here [1]? [0] http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html 2017-07-18 9:04 GMT+02:00 Shane : > I am very confused from the docs > > _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ > > _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ > > so wouldn't it be_ > _ > > IDtag = read #hfile as ID3v1_TAG ? > > with doesn't work by the way > > > > On 18/07/17 12:44, nand...@nothingsimple.com wrote: > >> I think >> Read #hfile, IDtag, ID3v1_TAG >> should be >> Read #hfile, IDtag as ID3v1_TAG >> >> >> -- >> Open WebMail Project (http://openwebmail.org) >> >> >> -- Original Message --- >> From: Shane >> To: gambas-user@lists.sourceforge.net >> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >> Subject: Re: [Gambas-user] reading files >> >> i don't know what i am doing wrong >>> >>> Public Struct ID3v1_TAG '(128 bytes) >>>Tag[3] As String 'always TAG >>>Title[30] As String 'title, 30 characters >>>Artist[30] As String 'artist, 30 characters >>>Album[30] As String 'album, 30 characters >>>Year[4] As String 'year, 4 characters >>>Comment[30] As String 'comment, 30 characters (or 28 if >>> track# included) >>>Genre As Byte 'genre, 255 for none defined >>> End Struct >>> >>> Private Sub GetID3v1(File As String) >>> Dim IDtag As ID3v1_TAG >>> Dim hfile As File >>> >>> hfile = Open File For Read >>> >>> ' >>> 'read the tag >>> ' seek to end of less tag size >>> >>> Read #hfile, IDtag, ID3v1_TAG >>> >>> here i get IDtag is NULL >>> >>> On 18/07/17 05:05, nand...@nothingsimple.com wrote: >>> Yes it is possible, I do it. here is some code (incomplete) -Nando (Canada) ' top of class file Public Struct recstruc _a as integer _b as integer _c as integer end struct ' a function public function openAfile(filename as string) as file dim hfile as file dim arec as recstruc hfile = open filename for read write create with arec 'some values to write. ._a = 1 ._b = 22 ._c = 333 end with write #hfile, arec as recstruc 'if you position the hfile pointer back to zero, you can... read #hfile, arec as recstruc close #hfile end -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: T Lee Davidson To: gambas-user@lists.sourceforge.net Sent: Sun, 16 Jul 2017 12:42:35 -0400 Subject: Re: [Gambas-user] reading files On 07/16/2017 06:57 AM, Shane wrote: > >> given this example >> >> PRIVATE SUB BinaryRead(FilePath AS String) >> DIM binaryFile AS File >> DIM i AS Integer >> DIM b AS Byte >> DIM s AS Short >> DIM s1 AS String >> DIM s2 AS String >> ' Read binary file >> binaryFile = OPEN FilePath FOR READ >> READ #binaryFile, i >> READ #binaryFile, b >> READ #binaryFile, s >> READ #binaryFile, s1 >> READ #binaryFile, s2 >> CLOSE #binaryFile >> ' Display results >> PRINT i >> PRINT b >> PRINT s >> PRINT s1 >> PRINT s2 >> END >> >> >> is there a way for gambas to read a struct of all these variables >> in one read ? >> >> You may have hinted at the solution within your question. Have you > considered > using a Structure? > > http://gambaswiki.org/wiki/lang/read : > "... reads the stream Stream as binary data whose type is specified by > the > Datatype argument." > > "The returned datatype can be one of the following: NULL, Boolean, > Byte, Short, >Integer, Long, Pointer, Single, Float, Date, String, Variant, any > Array, >Collection or structure." > > http://gambaswiki.org/wiki/lang/structdecl > > -- > Lee > > > -- > 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 > --- End of Original Message --- -- Che
Re: [Gambas-user] reading files
I am very confused from the docs _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ so wouldn't it be_ _ IDtag = read #hfile as ID3v1_TAG ? with doesn't work by the way On 18/07/17 12:44, nand...@nothingsimple.com wrote: I think Read #hfile, IDtag, ID3v1_TAG should be Read #hfile, IDtag as ID3v1_TAG -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Shane To: gambas-user@lists.sourceforge.net Sent: Tue, 18 Jul 2017 10:50:43 +1000 Subject: Re: [Gambas-user] reading files i don't know what i am doing wrong Public Struct ID3v1_TAG '(128 bytes) Tag[3] As String 'always TAG Title[30] As String 'title, 30 characters Artist[30] As String 'artist, 30 characters Album[30] As String 'album, 30 characters Year[4] As String 'year, 4 characters Comment[30] As String 'comment, 30 characters (or 28 if track# included) Genre As Byte 'genre, 255 for none defined End Struct Private Sub GetID3v1(File As String) Dim IDtag As ID3v1_TAG Dim hfile As File hfile = Open File For Read ' 'read the tag ' seek to end of less tag size Read #hfile, IDtag, ID3v1_TAG here i get IDtag is NULL On 18/07/17 05:05, nand...@nothingsimple.com wrote: Yes it is possible, I do it. here is some code (incomplete) -Nando (Canada) ' top of class file Public Struct recstruc _a as integer _b as integer _c as integer end struct ' a function public function openAfile(filename as string) as file dim hfile as file dim arec as recstruc hfile = open filename for read write create with arec 'some values to write. ._a = 1 ._b = 22 ._c = 333 end with write #hfile, arec as recstruc 'if you position the hfile pointer back to zero, you can... read #hfile, arec as recstruc close #hfile end -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: T Lee Davidson To: gambas-user@lists.sourceforge.net Sent: Sun, 16 Jul 2017 12:42:35 -0400 Subject: Re: [Gambas-user] reading files On 07/16/2017 06:57 AM, Shane wrote: given this example PRIVATE SUB BinaryRead(FilePath AS String) DIM binaryFile AS File DIM i AS Integer DIM b AS Byte DIM s AS Short DIM s1 AS String DIM s2 AS String ' Read binary file binaryFile = OPEN FilePath FOR READ READ #binaryFile, i READ #binaryFile, b READ #binaryFile, s READ #binaryFile, s1 READ #binaryFile, s2 CLOSE #binaryFile ' Display results PRINT i PRINT b PRINT s PRINT s1 PRINT s2 END is there a way for gambas to read a struct of all these variables in one read ? You may have hinted at the solution within your question. Have you considered using a Structure? http://gambaswiki.org/wiki/lang/read : "... reads the stream Stream as binary data whose type is specified by the Datatype argument." "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, Collection or structure." http://gambaswiki.org/wiki/lang/structdecl -- Lee -- 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 --- End of Original Message --- -- 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 --- End of Original Message --- -- 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 --