Re: [Gambas-user] SQLite PRAGMA don't seem works any more
Fine Benoit! That's efficiency Regards 2015-01-07 0:11 GMT+01:00 Benoît Minisini : > Le 06/01/2015 19:28, Jorge Carrión a écrit : > > I've tested "PRAGMA foreign_keys=ON" and it works fine... > > > > I can live without "PRAGMA fields_info". > > Gambas rules!! > > > > Regards > > > > "PRAGMA" and "WITH" are now supported in the gb.db.sqlite3 component, as > well as in the IDE database editor. Check revision #6815. > > Regards, > > -- > Benoît Minisini > > > -- > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Just as a matter of interest...
Le 7 janv. 2015 02:57, "adamn...@gmail.com" a écrit : > > with the cursor in the IDE Console tab, I just pressed Ctrl+Enter. > This had a strange effect of sort of collapsing the visible console text to a single line. > Repeating that, all the original text reappears. > Is this intentional or is it something weird that only happens to me in LXDE? > If it is intentional, what was the intent? Small bug ... Not from lxde > > ??? > Bruce > > -- > B Bruen > > -- > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] (hard?) Testing for a treeview key with Like
.Find ? Le 7 janv. 2015 05:10, "adamn...@gmail.com" a écrit : > Something new? > > I have a treeview (actually a columnview) whose Item keys are a > concatenated string of filename and > version via > Subst("&1-&2", hItem.Name, hItem.Version) > > When loading the view and I encounter an item with the same filename but a > different version I'd like to add the new version as a child node under the > existing original. > > Short of processing the key of every node in the view I can't see a way to > detect the parent node I am looking for. > > What I am looking for is a partial key recognition of the following ilk: > If ColumnView1.Exists(Like NewItem.FileName&"-*") Then > ' add a child node > Else > ' add a parent (root) node > EndIf > > Any clues? > > tia > Bruce > > -- > B Bruen > > > -- > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Array.Sort
I was playing around trying to learn how to pass string arrays back and forth. I then looked at the array.sort function. The prototype in the Wiki indicates that it returns an "string[]". Function Sort([Mode As Integer]) As String[] However it seems that I can not use the returned values(s) where I would normally use an array. It appears to to me to operate more as a SUB than a FUNCTION in that it resorts the array but does not return something that I can use in another function or procedure. Is my interpretation of the prototype wrong-headed ? Regards, Lewis Balentine ' Private Function TestFunction() As String[] Return ["TEST:abcdefghij", "TEST:1234567890", "TEST:ABCDEFGHIJ"] End Private Sub DoPrint(XXX As String[]) Dim S As String For Each S In XXX Print S Next Print "--" End Public Sub Main() ' From Gambas Wiki: ' Function Sort([Mode As Integer]) As String[] ' Sort the array. ' Dim XXX As String[] = ["XXX:abcdefghij", "XXX:1234567890", "XXX:ABCDEFGHIJ"] Dim S As String ' All of the following work as expected DoPrint(XXX) DoPrint(TestFunction()) XXX.Sort DoPrint(XXX) XXX = TestFunction() XXX.Sort DoPrint(XXX) ' None of the following works: Type Mismatch, wanted string[] got function instead ' xxx = TestFunction().sort ' DoPrint(XXX.sort) ' DoPrint(TestFunction().sort) ' For Each S In XXX.Sort' not an object ' Print S ' Next ' Print "---" ' For Each S In TestFunction().sort ' not an object ' Print S ' Next Quit End ' [System] ' Gambas = 3.6.2 ' OperatingSystem = Linux ' Kernel = 3.13.0 - 24 - generic ' Architecture = x86_64 ' Distribution = Linux Mint 17 Qiana ' Desktop = MATE ' Theme = QGtk ' Language = en_US.UTF - 8 ' Memory = 15994 M ' [Libraries] ' Cairo = libcairo.so.2.11301.0 ' Curl = libcurl.so.4.3.0 ' DBus = libdbus - 1. so.3.7.6 ' GStreamer = libgstreamer - 0.10.so.0.30.0 ' GStreamer = libgstreamer - 1.0.so.0.204.0 ' GTK + 3 = libgtk - 3. so.0.1000.8 ' GTK += libgtk - x11 - 2.0.so.0.2400.23 ' OpenGL = libGL.so.1.2.0 ' Poppler = libpoppler.so.44.0.0 ' Qt4 = libQtCore.so.4.8.6 ' SDL = libSDL - 1.2.so.0.11.4 -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Array.Sort
Test with parenthesis. XXX.Sort() Jussi On Thu, Jan 8, 2015 at 12:55 AM, Lewis Balentine wrote: > I was playing around trying to learn how to pass string arrays back and > forth. > I then looked at the array.sort function. The prototype in the Wiki > indicates that it returns an "string[]". > >Function Sort([Mode As Integer]) As String[] > > However it seems that I can not use the returned values(s) where I would > normally use an array. It appears to to me to operate more as a SUB than > a FUNCTION in that it resorts the array but does not return something > that I can use in another function or procedure. Is my interpretation of > the prototype wrong-headed ? > > Regards, > > Lewis Balentine > > ' > Private Function TestFunction() As String[] >Return ["TEST:abcdefghij", "TEST:1234567890", "TEST:ABCDEFGHIJ"] > End > > Private Sub DoPrint(XXX As String[]) >Dim S As String >For Each S In XXX > Print S >Next >Print "--" > End > > > Public Sub Main() >' From Gambas Wiki: > ' Function Sort([Mode As Integer]) As String[] > ' Sort the array. > ' >Dim XXX As String[] = ["XXX:abcdefghij", "XXX:1234567890", > "XXX:ABCDEFGHIJ"] >Dim S As String > >' All of the following work as expected >DoPrint(XXX) >DoPrint(TestFunction()) >XXX.Sort >DoPrint(XXX) >XXX = TestFunction() >XXX.Sort >DoPrint(XXX) > >' None of the following works: Type Mismatch, wanted string[] got > function instead >' xxx = TestFunction().sort >' DoPrint(XXX.sort) >' DoPrint(TestFunction().sort) > >' For Each S In XXX.Sort' not an object >' Print S >' Next >' Print "---" > >' For Each S In TestFunction().sort ' not an object >' Print S >' Next > >Quit > End > > ' [System] > ' Gambas = 3.6.2 > ' OperatingSystem = Linux > ' Kernel = 3.13.0 - 24 - generic > ' Architecture = x86_64 > ' Distribution = Linux Mint 17 Qiana > ' Desktop = MATE > ' Theme = QGtk > ' Language = en_US.UTF - 8 > ' Memory = 15994 M > ' [Libraries] > ' Cairo = libcairo.so.2.11301.0 > ' Curl = libcurl.so.4.3.0 > ' DBus = libdbus - 1. so.3.7.6 > ' GStreamer = libgstreamer - 0.10.so.0.30.0 > ' GStreamer = libgstreamer - 1.0.so.0.204.0 > ' GTK + 3 = libgtk - 3. so.0.1000.8 > ' GTK += libgtk - x11 - 2.0.so.0.2400.23 > ' OpenGL = libGL.so.1.2.0 > ' Poppler = libpoppler.so.44.0.0 > ' Qt4 = libQtCore.so.4.8.6 > ' SDL = libSDL - 1.2.so.0.11.4 > > > -- > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Array.Sort
Hi Lewis, You're forgetting, like I often do, the parentheses for the method [.Sort()]. ... XXX = TestFunction().Sort() DoPrint(XXX.Sort()) DoPrint(TestFunction().Sort()) For Each S In XXX.Sort() Print S Next Print "---" For Each S In TestFunction().Sort() Print S Next ... Lee __ "Artificial Intelligence is no match for natural stupidity." On 01/07/2015 05:55 PM, Lewis Balentine wrote: > I was playing around trying to learn how to pass string arrays back and > forth. > I then looked at the array.sort function. The prototype in the Wiki > indicates that it returns an "string[]". > > Function Sort([Mode As Integer]) As String[] > > However it seems that I can not use the returned values(s) where I would > normally use an array. It appears to to me to operate more as a SUB than > a FUNCTION in that it resorts the array but does not return something > that I can use in another function or procedure. Is my interpretation of > the prototype wrong-headed ? > > Regards, > > Lewis Balentine > > ' > Private Function TestFunction() As String[] > Return ["TEST:abcdefghij", "TEST:1234567890", "TEST:ABCDEFGHIJ"] > End > > Private Sub DoPrint(XXX As String[]) > Dim S As String > For Each S In XXX > Print S > Next > Print "--" > End > > > Public Sub Main() > ' From Gambas Wiki: >' Function Sort([Mode As Integer]) As String[] >' Sort the array. >' > Dim XXX As String[] = ["XXX:abcdefghij", "XXX:1234567890", > "XXX:ABCDEFGHIJ"] > Dim S As String > > ' All of the following work as expected > DoPrint(XXX) > DoPrint(TestFunction()) > XXX.Sort > DoPrint(XXX) > XXX = TestFunction() > XXX.Sort > DoPrint(XXX) > > ' None of the following works: Type Mismatch, wanted string[] got > function instead > ' xxx = TestFunction().sort > ' DoPrint(XXX.sort) > ' DoPrint(TestFunction().sort) > > ' For Each S In XXX.Sort' not an object > ' Print S > ' Next > ' Print "---" > > ' For Each S In TestFunction().sort ' not an object > ' Print S > ' Next > > Quit > End > > ' [System] > ' Gambas = 3.6.2 > ' OperatingSystem = Linux > ' Kernel = 3.13.0 - 24 - generic > ' Architecture = x86_64 > ' Distribution = Linux Mint 17 Qiana > ' Desktop = MATE > ' Theme = QGtk > ' Language = en_US.UTF - 8 > ' Memory = 15994 M > ' [Libraries] > ' Cairo = libcairo.so.2.11301.0 > ' Curl = libcurl.so.4.3.0 > ' DBus = libdbus - 1. so.3.7.6 > ' GStreamer = libgstreamer - 0.10.so.0.30.0 > ' GStreamer = libgstreamer - 1.0.so.0.204.0 > ' GTK + 3 = libgtk - 3. so.0.1000.8 > ' GTK += libgtk - x11 - 2.0.so.0.2400.23 > ' OpenGL = libGL.so.1.2.0 > ' Poppler = libpoppler.so.44.0.0 > ' Qt4 = libQtCore.so.4.8.6 > ' SDL = libSDL - 1.2.so.0.11.4 > > -- > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Array.Sort
No ... I was not forgetting. I have not yet learned they are required ... ... but this old dog 'will' learn the new tricks. Thank thee again. Lewis On 01/07/2015 06:09 PM, T Lee Davidson wrote: > Hi Lewis, > > You're forgetting, like I often do, the parentheses for the method [.Sort()]. > > -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Array.Sort
Do I have it correct now ?? The program runs and operates as expected. My concern is more to the proper nomenclature than function. Regards, Lewis Balentine '--- --- (project archive attached to message) --- --- Private Function TestFunction() As String[] Return ["abcdefghij", "1234567890", "ABCDEFGHIJ"] End Private Sub DoPrint(XXX As String[]) Dim S As String For Each S In XXX Print S Next Print "--" End Public Sub Main() Dim XXX As New String[] ' NOTE: ' The empty set of parentheses is REQUIRED when ' sort is used as a function to return an array. ' array=array.sort() will work ' array=array.sort will not work DoPrint(TestFunction()) DoPrint(TestFunction().sort()) ' XXX = TestFunction() DoPrint(XXX) DoPrint(XXX.Sort()) ' XXX = TestFunction().sort() DoPrint(XXX) ' ' NOTE: ' The empty set of parentheses is NOT required when ' sort is used as a procedure call to simply sort ' array without returning anything. ' array.sort() will work ' array.sort will work XXX = TestFunction() XXX.Sort DoPrint(XXX) ' ' array.reverse and array.pop work similarly. DoPrint(XXX.Reverse()) XXX.Reverse DoPrint(XXX) XXX.Pop Print XXX.Pop() ' parentheses are not used for an array's properties Print "==" XXX = TestFunction() Print "'array.dim'returns the number of dimensions in an array: " & XXX.dim Print "'array.length' returns the number of items in an array: " & XXX.length Print "'array.count' returns the number of items in an array: " & XXX.count Print "'array.max'returns the number of items in an array: " & XXX.max Quit End ArrayExample-0.0.1.tar.gz Description: application/gzip -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Array.Sort
oops Last line should be: Print "'array.max'returns index of the last item in an array: " & XXX.max On 01/07/2015 11:59 PM, Lewis Balentine wrote: > Print "'array.max'returns the number of items in an array: " > & XXX.max > > Quit > End -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user