From ron at ...572... Mon Aug 5 14:53:23 2013 From: ron at ...572... (Ron) Date: Mon, 5 Aug 2013 14:53:23 +0200 Subject: [Gambas-devel] Project feature request to follow symbolic links and allow to edit/save them. Message-ID: Hi, I want to request a new project preference which -when enabled- will allow to edit/save files where a symbolic link points to. Now symbolic links are displayed with an 'symbolic link' icon which is ok but the files are opened read only. I have two big projects sharing as much as 90 files. I can somehow understand the current behavior, but all unix editors (vi, gedit, file browser) allow you to edit the files when opened through their symbolic links. So the current behavior is kinda unconventional. Thanks! Regards, Ron. From gambas at ...1... Mon Aug 5 15:24:52 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Mon, 05 Aug 2013 15:24:52 +0200 Subject: [Gambas-devel] Project feature request to follow symbolic links and allow to edit/save them. In-Reply-To: References: Message-ID: <51FFA7A4.7060502@...1...> Le 05/08/2013 14:53, Ron a ?crit : > Hi, > > I want to request a new project preference which -when enabled- will > allow to edit/save files where a symbolic link points to. > > Now symbolic links are displayed with an 'symbolic link' icon which is > ok but the files are opened read only. > > I have two big projects sharing as much as 90 files. > > I can somehow understand the current behavior, but all unix editors > (vi, gedit, file browser) allow you to edit the files when opened > through their symbolic links. > So the current behavior is kinda unconventional. > > Thanks! > > Regards, > Ron. > The reason why symbolic links are read-only is because they are supposed to be owned by their original project, and so you have to open it to edit them. Maybe the IDE could automatically open the original project to edit symbolic links then? -- Beno?t Minisini From ron at ...572... Mon Aug 5 15:45:03 2013 From: ron at ...572... (Ron) Date: Mon, 5 Aug 2013 15:45:03 +0200 Subject: [Gambas-devel] Project feature request to follow symbolic links and allow to edit/save them. In-Reply-To: <51FFA7A4.7060502@...1...> References: <51FFA7A4.7060502@...1...> Message-ID: Hi Benoit, what exactly do you mean by 'owned by the project'? The symbolic links show up in project tree, see attachment and it can run the project fine. So yeah the project knows and uses the files already. Why not have the option to edit them. I don't want to be able to edit them at the same time from two ide's. But you have the same issue if you changes files with vi and/or sed 'under water' now. You have to refresh the project. Regards, Ron. 2013/8/5 Beno?t Minisini : > Le 05/08/2013 14:53, Ron a ?crit : >> Hi, >> >> I want to request a new project preference which -when enabled- will >> allow to edit/save files where a symbolic link points to. >> >> Now symbolic links are displayed with an 'symbolic link' icon which is >> ok but the files are opened read only. >> >> I have two big projects sharing as much as 90 files. >> >> I can somehow understand the current behavior, but all unix editors >> (vi, gedit, file browser) allow you to edit the files when opened >> through their symbolic links. >> So the current behavior is kinda unconventional. >> >> Thanks! >> >> Regards, >> Ron. >> > > The reason why symbolic links are read-only is because they are supposed > to be owned by their original project, and so you have to open it to > edit them. > > Maybe the IDE could automatically open the original project to edit > symbolic links then? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2013-08-05 15:38:36.png Type: image/png Size: 131596 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2013-08-05 15:44:27.png Type: image/png Size: 95017 bytes Desc: not available URL: From ron at ...572... Mon Aug 5 17:40:56 2013 From: ron at ...572... (Ron) Date: Mon, 5 Aug 2013 17:40:56 +0200 Subject: [Gambas-devel] Project feature request to follow symbolic links and allow to edit/save them. In-Reply-To: References: <51FFA7A4.7060502@...1...> Message-ID: Anyway the right click menu on those entries in the tree say 'Edit' so he... Something is a contradiction here.. ;-) Regards, Ron. 2013/8/5 Ron : > Hi Benoit, > > what exactly do you mean by 'owned by the project'? > > The symbolic links show up in project tree, see attachment and it can > run the project fine. > So yeah the project knows and uses the files already. > Why not have the option to edit them. > > I don't want to be able to edit them at the same time from two ide's. > But you have the same issue if you changes files with vi and/or sed > 'under water' now. > You have to refresh the project. > > Regards, > Ron. > > > 2013/8/5 Beno?t Minisini : >> Le 05/08/2013 14:53, Ron a ?crit : >>> Hi, >>> >>> I want to request a new project preference which -when enabled- will >>> allow to edit/save files where a symbolic link points to. >>> >>> Now symbolic links are displayed with an 'symbolic link' icon which is >>> ok but the files are opened read only. >>> >>> I have two big projects sharing as much as 90 files. >>> >>> I can somehow understand the current behavior, but all unix editors >>> (vi, gedit, file browser) allow you to edit the files when opened >>> through their symbolic links. >>> So the current behavior is kinda unconventional. >>> >>> Thanks! >>> >>> Regards, >>> Ron. >>> >> >> The reason why symbolic links are read-only is because they are supposed >> to be owned by their original project, and so you have to open it to >> edit them. >> >> Maybe the IDE could automatically open the original project to edit >> symbolic links then? >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel From sebikul at ...176... Thu Aug 8 05:01:09 2013 From: sebikul at ...176... (Sebastian Kulesz) Date: Thu, 8 Aug 2013 00:01:09 -0300 Subject: [Gambas-devel] Compile error in Ubuntu Lucid Message-ID: Hi! I'm getting build errors on the Lucid series. Bug is in revision 5772. Here is the log [0]. The affected file is gb.gtk/src/CKey.cpp. gb.qt4 builds fine. It fails with this message: CXX gb_gtk_la-CKey.lo CKey.cpp:108: error: 'GDK_KEY_Escape' was not declared in this scope CKey.cpp:109: error: 'GDK_KEY_Escape' was not declared in this scope CKey.cpp:110: error: 'GDK_KEY_Tab' was not declared in this scope CKey.cpp:111: error: 'GDK_KEY_ISO_Left_Tab' was not declared in this scope CKey.cpp:112: error: 'GDK_KEY_BackSpace' was not declared in this scope CKey.cpp:113: error: 'GDK_KEY_Return' was not declared in this scope CKey.cpp:114: error: 'GDK_KEY_KP_Enter' was not declared in this scope CKey.cpp:115: error: 'GDK_KEY_Insert' was not declared in this scope CKey.cpp:116: error: 'GDK_KEY_Delete' was not declared in this scope CKey.cpp:117: error: 'GDK_KEY_Pause' was not declared in this scope CKey.cpp:118: error: 'GDK_KEY_Print' was not declared in this scope CKey.cpp:119: error: 'GDK_KEY_Sys_Req' was not declared in this scope CKey.cpp:120: error: 'GDK_KEY_Home' was not declared in this scope CKey.cpp:121: error: 'GDK_KEY_End' was not declared in this scope CKey.cpp:122: error: 'GDK_KEY_Left' was not declared in this scope CKey.cpp:123: error: 'GDK_KEY_Up' was not declared in this scope CKey.cpp:124: error: 'GDK_KEY_Right' was not declared in this scope CKey.cpp:125: error: 'GDK_KEY_Down' was not declared in this scope CKey.cpp:126: error: 'GDK_KEY_Page_Up' was not declared in this scope CKey.cpp:127: error: 'GDK_KEY_Page_Down' was not declared in this scope CKey.cpp:128: error: 'GDK_KEY_Shift_L' was not declared in this scope CKey.cpp:129: error: 'GDK_KEY_Control_L' was not declared in this scope CKey.cpp:130: error: 'GDK_KEY_Meta_L' was not declared in this scope CKey.cpp:131: error: 'GDK_KEY_Alt_L' was not declared in this scope CKey.cpp:132: error: 'GDK_KEY_Caps_Lock' was not declared in this scope CKey.cpp:133: error: 'GDK_KEY_Num_Lock' was not declared in this scope CKey.cpp:134: error: 'GDK_KEY_Scroll_Lock' was not declared in this scope CKey.cpp:135: error: 'GDK_KEY_F1' was not declared in this scope CKey.cpp:136: error: 'GDK_KEY_F2' was not declared in this scope CKey.cpp:137: error: 'GDK_KEY_F3' was not declared in this scope CKey.cpp:138: error: 'GDK_KEY_F4' was not declared in this scope CKey.cpp:139: error: 'GDK_KEY_F5' was not declared in this scope CKey.cpp:140: error: 'GDK_KEY_F6' was not declared in this scope CKey.cpp:141: error: 'GDK_KEY_F7' was not declared in this scope CKey.cpp:142: error: 'GDK_KEY_F8' was not declared in this scope CKey.cpp:143: error: 'GDK_KEY_F9' was not declared in this scope CKey.cpp:144: error: 'GDK_KEY_F10' was not declared in this scope CKey.cpp:145: error: 'GDK_KEY_F11' was not declared in this scope CKey.cpp:146: error: 'GDK_KEY_F12' was not declared in this scope CKey.cpp:147: error: 'GDK_KEY_F13' was not declared in this scope CKey.cpp:148: error: 'GDK_KEY_F14' was not declared in this scope CKey.cpp:149: error: 'GDK_KEY_F15' was not declared in this scope CKey.cpp:150: error: 'GDK_KEY_F16' was not declared in this scope CKey.cpp:151: error: 'GDK_KEY_F17' was not declared in this scope CKey.cpp:152: error: 'GDK_KEY_F18' was not declared in this scope CKey.cpp:153: error: 'GDK_KEY_F19' was not declared in this scope CKey.cpp:154: error: 'GDK_KEY_F20' was not declared in this scope CKey.cpp:155: error: 'GDK_KEY_F21' was not declared in this scope CKey.cpp:156: error: 'GDK_KEY_F22' was not declared in this scope CKey.cpp:157: error: 'GDK_KEY_F23' was not declared in this scope CKey.cpp:158: error: 'GDK_KEY_F24' was not declared in this scope CKey.cpp:159: error: 'GDK_KEY_Menu' was not declared in this scope CKey.cpp:160: error: 'GDK_KEY_Help' was not declared in this scope CKey.cpp:161: error: 'GDK_KEY_space' was not declared in this scope CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' CKey.cpp:173: error: too many initializers for 'GB_DESC' [0] https://launchpadlibrarian.net/147038496/buildlog_ubuntu-lucid-i386.gambas3_3.4.99-2%2Bsvn4622-build29~lucid1_FAILEDTOBUILD.txt.gz -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at ...176... Sat Aug 10 00:12:25 2013 From: mckaygerhard at ...176... (PICCORO McKAY Lenz) Date: Fri, 9 Aug 2013 17:42:25 -0430 Subject: [Gambas-devel] Build error in gb.net.curl Message-ID: Err i have already installed libcurl-openssl-dev, should be installed their conunter part libcurl-gnutls-dev ? CC gb_net_curl_la-CNet.lo CNet.c:65: error: ?CURLAUTH_DIGEST_IE? no se declar? aqu? (no en una funci?n) CNet.c:146: error: ?CURLE_SSL_CRL_BADFILE? no se declar? aqu? (no en una funci?n) CNet.c:147: error: ?CURLE_SSL_ISSUER_ERROR? no se declar? aqu? (no en una funci?n) make[5]: *** [gb_net_curl_la-CNet.lo] Error 1 Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at ...692... Sun Aug 11 02:21:09 2013 From: tobias at ...692... (Tobias Boege) Date: Sun, 11 Aug 2013 02:21:09 +0200 Subject: [Gambas-devel] What's in GB_BASE or Is it save to copy it for another object? Message-ID: <20130811002109.GE497@...693...> Hi Benoit, I'm currently implementing an AVL tree class (named AvlTree) in gb.data and for my plans I need to give it a Current property which is an AvlTree itself, which is given in theory but I fear that it's not that easy in Gambas: --- typedef struct { NODE *left, *right; /* Children or NULL */ GB_STRING key; /* The key string */ GB_VARIANT_VALUE value; /* Payload */ } NODE; typedef struct { GB_BASE ob; NODE *root, *current; } CAVLTREE; GB_DESC CAvlTree[] = { GB_DECLARE("AvlTree", sizeof(CAVLTREE)), ... GB_PROPERTY_READ("Current", "AvlTree", AvlTree_Current), ... GB_END_DECLARE }; --- To implement AvlTree_Current I imagine something as simple as: --- BEGIN_PROPERTY(AvlTree_Current) CAVLTREE *subtree; GB.Alloc(&subtree, sizeof(*subtree)); memcpy(subtree, _object, sizeof(*subtree)); subtree->root = subtree->current; GB.Ref(_object); GB.ReturnObject(subtree); END_PROPERTY --- This copies the original AvlTree and just assigns it a new root. I think all my routines will be fine with this but what about the Gambas machinery? Is it safe for a data container (it won't have any events, but it will be enumerable, though (the next element will, however, be located just in time)) to copy its GB_BASE into another object? The resulting subtree is explicitly supposed to share elements with the parent tree. I now need to know: Are there any implications I don't know of? Is this considered bad taste/not future-proof? You see, the bulk of the information lies in the NODE structure which is to be shared between both objects anyway and the class will be really simple - the only exception is that an element of an object of this class is going to be another instance of the same class sharing data with its parent. Thinking about it a little further, this question is only about using memcpy() to copy GB_BASE (if it's safe - because it's more efficient) or using the GB.New() API. So what would you advise? Regards, Tobi From gambas at ...1... Sun Aug 11 02:34:50 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sun, 11 Aug 2013 02:34:50 +0200 Subject: [Gambas-devel] What's in GB_BASE or Is it save to copy it for another object? In-Reply-To: <20130811002109.GE497@...693...> References: <20130811002109.GE497@...693...> Message-ID: <5206DC2A.7090400@...1...> Le 11/08/2013 02:21, Tobias Boege a ?crit : > Hi Benoit, > > I'm currently implementing an AVL tree class (named AvlTree) in gb.data and > for my plans I need to give it a Current property which is an AvlTree > itself, which is given in theory but I fear that it's not that easy in > Gambas: > > --- > typedef struct { > NODE *left, *right; /* Children or NULL */ > GB_STRING key; /* The key string */ > GB_VARIANT_VALUE value; /* Payload */ > } NODE; > > typedef struct { > GB_BASE ob; > NODE *root, *current; > } CAVLTREE; > > GB_DESC CAvlTree[] = { > GB_DECLARE("AvlTree", sizeof(CAVLTREE)), > ... > > GB_PROPERTY_READ("Current", "AvlTree", AvlTree_Current), > > ... > GB_END_DECLARE > }; > --- > > To implement AvlTree_Current I imagine something as simple as: > > --- > BEGIN_PROPERTY(AvlTree_Current) > > CAVLTREE *subtree; > > GB.Alloc(&subtree, sizeof(*subtree)); > memcpy(subtree, _object, sizeof(*subtree)); > subtree->root = subtree->current; > GB.Ref(_object); > GB.ReturnObject(subtree); > > END_PROPERTY > --- > Simple: you *must* create a new Gambas object with the GB.New() API. -- Beno?t Minisini From gambas at ...1... Sun Aug 11 02:37:02 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sun, 11 Aug 2013 02:37:02 +0200 Subject: [Gambas-devel] Compile error in Ubuntu Lucid In-Reply-To: References: Message-ID: <5206DCAE.8060308@...1...> Le 08/08/2013 05:01, Sebastian Kulesz a ?crit : > Hi! I'm getting build errors on the Lucid series. Bug is in revision > 5772. Here is the log [0]. The affected file is gb.gtk/src/CKey.cpp. > gb.qt4 builds fine. > > > It fails with this message: > > > CXX gb_gtk_la-CKey.lo > CKey.cpp:108: error: 'GDK_KEY_Escape' was not declared in this scope > CKey.cpp:109: error: 'GDK_KEY_Escape' was not declared in this scope > CKey.cpp:110: error: 'GDK_KEY_Tab' was not declared in this scope > CKey.cpp:111: error: 'GDK_KEY_ISO_Left_Tab' was not declared in this scope > CKey.cpp:112: error: 'GDK_KEY_BackSpace' was not declared in this scope > CKey.cpp:113: error: 'GDK_KEY_Return' was not declared in this scope > CKey.cpp:114: error: 'GDK_KEY_KP_Enter' was not declared in this scope > CKey.cpp:115: error: 'GDK_KEY_Insert' was not declared in this scope > CKey.cpp:116: error: 'GDK_KEY_Delete' was not declared in this scope > CKey.cpp:117: error: 'GDK_KEY_Pause' was not declared in this scope > CKey.cpp:118: error: 'GDK_KEY_Print' was not declared in this scope > CKey.cpp:119: error: 'GDK_KEY_Sys_Req' was not declared in this scope > CKey.cpp:120: error: 'GDK_KEY_Home' was not declared in this scope > CKey.cpp:121: error: 'GDK_KEY_End' was not declared in this scope > CKey.cpp:122: error: 'GDK_KEY_Left' was not declared in this scope > CKey.cpp:123: error: 'GDK_KEY_Up' was not declared in this scope > CKey.cpp:124: error: 'GDK_KEY_Right' was not declared in this scope > CKey.cpp:125: error: 'GDK_KEY_Down' was not declared in this scope > CKey.cpp:126: error: 'GDK_KEY_Page_Up' was not declared in this scope > CKey.cpp:127: error: 'GDK_KEY_Page_Down' was not declared in this scope > CKey.cpp:128: error: 'GDK_KEY_Shift_L' was not declared in this scope > CKey.cpp:129: error: 'GDK_KEY_Control_L' was not declared in this scope > CKey.cpp:130: error: 'GDK_KEY_Meta_L' was not declared in this scope > CKey.cpp:131: error: 'GDK_KEY_Alt_L' was not declared in this scope > CKey.cpp:132: error: 'GDK_KEY_Caps_Lock' was not declared in this scope > CKey.cpp:133: error: 'GDK_KEY_Num_Lock' was not declared in this scope > CKey.cpp:134: error: 'GDK_KEY_Scroll_Lock' was not declared in this scope > CKey.cpp:135: error: 'GDK_KEY_F1' was not declared in this scope > CKey.cpp:136: error: 'GDK_KEY_F2' was not declared in this scope > CKey.cpp:137: error: 'GDK_KEY_F3' was not declared in this scope > CKey.cpp:138: error: 'GDK_KEY_F4' was not declared in this scope > CKey.cpp:139: error: 'GDK_KEY_F5' was not declared in this scope > CKey.cpp:140: error: 'GDK_KEY_F6' was not declared in this scope > CKey.cpp:141: error: 'GDK_KEY_F7' was not declared in this scope > CKey.cpp:142: error: 'GDK_KEY_F8' was not declared in this scope > CKey.cpp:143: error: 'GDK_KEY_F9' was not declared in this scope > CKey.cpp:144: error: 'GDK_KEY_F10' was not declared in this scope > CKey.cpp:145: error: 'GDK_KEY_F11' was not declared in this scope > CKey.cpp:146: error: 'GDK_KEY_F12' was not declared in this scope > CKey.cpp:147: error: 'GDK_KEY_F13' was not declared in this scope > CKey.cpp:148: error: 'GDK_KEY_F14' was not declared in this scope > CKey.cpp:149: error: 'GDK_KEY_F15' was not declared in this scope > CKey.cpp:150: error: 'GDK_KEY_F16' was not declared in this scope > CKey.cpp:151: error: 'GDK_KEY_F17' was not declared in this scope > CKey.cpp:152: error: 'GDK_KEY_F18' was not declared in this scope > CKey.cpp:153: error: 'GDK_KEY_F19' was not declared in this scope > CKey.cpp:154: error: 'GDK_KEY_F20' was not declared in this scope > CKey.cpp:155: error: 'GDK_KEY_F21' was not declared in this scope > CKey.cpp:156: error: 'GDK_KEY_F22' was not declared in this scope > CKey.cpp:157: error: 'GDK_KEY_F23' was not declared in this scope > CKey.cpp:158: error: 'GDK_KEY_F24' was not declared in this scope > CKey.cpp:159: error: 'GDK_KEY_Menu' was not declared in this scope > CKey.cpp:160: error: 'GDK_KEY_Help' was not declared in this scope > CKey.cpp:161: error: 'GDK_KEY_space' was not declared in this scope > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > > [0] > https://launchpadlibrarian.net/147038496/buildlog_ubuntu-lucid-i386.gambas3_3.4.99-2%2Bsvn4622-build29~lucid1_FAILEDTOBUILD.txt.gz > > It should be fixed with revision #5783. Regards, -- Beno?t Minisini From gambas at ...1... Sun Aug 11 02:37:58 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sun, 11 Aug 2013 02:37:58 +0200 Subject: [Gambas-devel] gb.sdl.sound channel volume bug In-Reply-To: <51DA2156.6010408@...590...> References: <5184B4A8.5040100@...590...> <518E9015.3060604@...1...> <518F2890.1020200@...590...> <51D95BA5.6050002@...1...> <51DA2156.6010408@...590...> Message-ID: <5206DCE6.7080502@...1...> Le 08/07/2013 04:17, Kevin Fishburne a ?crit : > On 07/07/2013 08:14 AM, Beno?t Minisini wrote: >> Le 12/05/2013 07:28, Kevin Fishburne a ?crit : >>> Out of curiousity, is OpenAL Soft worth a damn? It sounds pretty cool >>> from what I've read here: http://kcat.strangesoft.net/openal.html. >>> >> Mmm... Maybe, the project seems to be maintained. I don't know OpenAL at >> all, but I guess a component could be done the same way as gb.opengl >> (i.e. by replicating the OpenAL interface). >> > I'm not familiar with it either, but from everything it says it > supports, it blows SDL's audio out of the water. I checked the Kubuntu > 13.04 repositories and the package is called libopenal1 (version 1.14). > Its dependencies are libopenal-data and libc6. There is also a toolkit > called alut (OpenAL Utility Toolkit), which likens itself to GLUT in > functionality. > > Obviously since I'm making a game it's in my interest to have such > libraries included in GAMBAS, but if you've been paying any attention to > the game industry (Gamasutra, Indiegames.com, Valve Corporation, etc.) > there has been an explosion of industry support for gaming on Linux this > year. There may never be a "year of the Linux desktop", but it looks > like the "year of gaming on Linux" is 2013. > So... Did you test gb.openal ? :-) -- Beno?t Minisini From kevinfishburne at ...590... Mon Aug 12 06:51:14 2013 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Mon, 12 Aug 2013 00:51:14 -0400 Subject: [Gambas-devel] gb.sdl.sound channel volume bug In-Reply-To: <5206DCE6.7080502@...1...> References: <5184B4A8.5040100@...590...> <518E9015.3060604@...1...> <518F2890.1020200@...590...> <51D95BA5.6050002@...1...> <51DA2156.6010408@...590...> <5206DCE6.7080502@...1...> Message-ID: <520869C2.1070104@...590...> On 08/10/2013 08:37 PM, Beno?t Minisini wrote: > Le 08/07/2013 04:17, Kevin Fishburne a ?crit : >> On 07/07/2013 08:14 AM, Beno?t Minisini wrote: >>> Le 12/05/2013 07:28, Kevin Fishburne a ?crit : >>>> Out of curiousity, is OpenAL Soft worth a damn? It sounds pretty cool >>>> from what I've read here: http://kcat.strangesoft.net/openal.html. >>>> >>> Mmm... Maybe, the project seems to be maintained. I don't know OpenAL at >>> all, but I guess a component could be done the same way as gb.opengl >>> (i.e. by replicating the OpenAL interface). >>> >> I'm not familiar with it either, but from everything it says it >> supports, it blows SDL's audio out of the water. I checked the Kubuntu >> 13.04 repositories and the package is called libopenal1 (version 1.14). >> Its dependencies are libopenal-data and libc6. There is also a toolkit >> called alut (OpenAL Utility Toolkit), which likens itself to GLUT in >> functionality. >> >> Obviously since I'm making a game it's in my interest to have such >> libraries included in GAMBAS, but if you've been paying any attention to >> the game industry (Gamasutra, Indiegames.com, Valve Corporation, etc.) >> there has been an explosion of industry support for gaming on Linux this >> year. There may never be a "year of the Linux desktop", but it looks >> like the "year of gaming on Linux" is 2013. >> > So... Did you test gb.openal ? :-) > Not yet as other fish have been demanding to be fried, unfortunately (for myself and the fish). Ironic, I know, and I apologize. Every now and then when I make a breakthrough in the game I actually jump out of my chair and leap around the room in excitement. I'm pretty sure the first time I hear precisely amplified 3D positional footfall and environmental effects something similar will occur. My audio setup right now is pretty detailed (six water loops, two wind loops, three rain loops, sixteen thunder effects and 72 footfall effects with eight variations each of rubble kicks, sea shell pops and twig snaps, to name a few), so if there are any dev-related issues with the openal implementation I will give a full report. For the time being, thank you and everyone who helped for the openal implementation. GAMBAS really needed something like that as SDL (as its name implies) is sorely lacking in audio functionality. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From sebikul at ...176... Wed Aug 14 18:41:09 2013 From: sebikul at ...176... (Sebastian Kulesz) Date: Wed, 14 Aug 2013 13:41:09 -0300 Subject: [Gambas-devel] Compile error in Ubuntu Lucid In-Reply-To: <5206DCAE.8060308@...1...> References: <5206DCAE.8060308@...1...> Message-ID: It is still failing, same file, same error message, different symbols: CXX gb_gtk_la-gkey.lo gkey.cpp: In static member function 'static int gKey::code()': gkey.cpp:69: error: 'GDK_KEY_Alt_R' was not declared in this scope gkey.cpp:70: error: 'GDK_KEY_Alt_L' was not declared in this scope gkey.cpp:71: error: 'GDK_KEY_Control_R' was not declared in this scope gkey.cpp:72: error: 'GDK_KEY_Control_L' was not declared in this scope gkey.cpp:73: error: 'GDK_KEY_Meta_R' was not declared in this scope gkey.cpp:74: error: 'GDK_KEY_Meta_L' was not declared in this scope gkey.cpp:75: error: 'GDK_KEY_Shift_R' was not declared in this scope gkey.cpp:76: error: 'GDK_KEY_Shift_L' was not declared in this scope Full log here: https://launchpadlibrarian.net/147504191/buildlog_ubuntu-lucid-i386.gambas3_3.4.99-2%2Bsvn4638-build29~lucid1_FAILEDTOBUILD.txt.gz A special note about arm builds. They are failing for every Ubuntu series, the bug is in gb.qt4. Here are the logs for each version: Precise: https://launchpadlibrarian.net/147528135/buildlog_ubuntu-precise-armhf.gambas3_3.4.99-1%2Bsvn4640-build28~precise1_FAILEDTOBUILD.txt.gz Quantal: https://launchpadlibrarian.net/147527943/buildlog_ubuntu-quantal-armhf.gambas3_3.4.99-1%2Bsvn4640-build37~quantal1_FAILEDTOBUILD.txt.gz Raring: https://launchpadlibrarian.net/147527994/buildlog_ubuntu-raring-armhf.gambas3_3.4.99-1%2Bsvn4640-build37~raring1_FAILEDTOBUILD.txt.gz Saucy: https://launchpadlibrarian.net/147295212/buildlog_ubuntu-saucy-armhf.gambas3_3.4.99-1%2Bsvn4628-build4~saucy1_FAILEDTOBUILD.txt.gz Thanks! On Sat, Aug 10, 2013 at 9:37 PM, Beno?t Minisini < gambas at ...1...> wrote: > Le 08/08/2013 05:01, Sebastian Kulesz a ?crit : > > Hi! I'm getting build errors on the Lucid series. Bug is in revision > > 5772. Here is the log [0]. The affected file is gb.gtk/src/CKey.cpp. > > gb.qt4 builds fine. > > > > > > It fails with this message: > > > > > > CXX gb_gtk_la-CKey.lo > > CKey.cpp:108: error: 'GDK_KEY_Escape' was not declared in this scope > > CKey.cpp:109: error: 'GDK_KEY_Escape' was not declared in this scope > > CKey.cpp:110: error: 'GDK_KEY_Tab' was not declared in this scope > > CKey.cpp:111: error: 'GDK_KEY_ISO_Left_Tab' was not declared in this > scope > > CKey.cpp:112: error: 'GDK_KEY_BackSpace' was not declared in this scope > > CKey.cpp:113: error: 'GDK_KEY_Return' was not declared in this scope > > CKey.cpp:114: error: 'GDK_KEY_KP_Enter' was not declared in this scope > > CKey.cpp:115: error: 'GDK_KEY_Insert' was not declared in this scope > > CKey.cpp:116: error: 'GDK_KEY_Delete' was not declared in this scope > > CKey.cpp:117: error: 'GDK_KEY_Pause' was not declared in this scope > > CKey.cpp:118: error: 'GDK_KEY_Print' was not declared in this scope > > CKey.cpp:119: error: 'GDK_KEY_Sys_Req' was not declared in this scope > > CKey.cpp:120: error: 'GDK_KEY_Home' was not declared in this scope > > CKey.cpp:121: error: 'GDK_KEY_End' was not declared in this scope > > CKey.cpp:122: error: 'GDK_KEY_Left' was not declared in this scope > > CKey.cpp:123: error: 'GDK_KEY_Up' was not declared in this scope > > CKey.cpp:124: error: 'GDK_KEY_Right' was not declared in this scope > > CKey.cpp:125: error: 'GDK_KEY_Down' was not declared in this scope > > CKey.cpp:126: error: 'GDK_KEY_Page_Up' was not declared in this scope > > CKey.cpp:127: error: 'GDK_KEY_Page_Down' was not declared in this scope > > CKey.cpp:128: error: 'GDK_KEY_Shift_L' was not declared in this scope > > CKey.cpp:129: error: 'GDK_KEY_Control_L' was not declared in this scope > > CKey.cpp:130: error: 'GDK_KEY_Meta_L' was not declared in this scope > > CKey.cpp:131: error: 'GDK_KEY_Alt_L' was not declared in this scope > > CKey.cpp:132: error: 'GDK_KEY_Caps_Lock' was not declared in this scope > > CKey.cpp:133: error: 'GDK_KEY_Num_Lock' was not declared in this scope > > CKey.cpp:134: error: 'GDK_KEY_Scroll_Lock' was not declared in this scope > > CKey.cpp:135: error: 'GDK_KEY_F1' was not declared in this scope > > CKey.cpp:136: error: 'GDK_KEY_F2' was not declared in this scope > > CKey.cpp:137: error: 'GDK_KEY_F3' was not declared in this scope > > CKey.cpp:138: error: 'GDK_KEY_F4' was not declared in this scope > > CKey.cpp:139: error: 'GDK_KEY_F5' was not declared in this scope > > CKey.cpp:140: error: 'GDK_KEY_F6' was not declared in this scope > > CKey.cpp:141: error: 'GDK_KEY_F7' was not declared in this scope > > CKey.cpp:142: error: 'GDK_KEY_F8' was not declared in this scope > > CKey.cpp:143: error: 'GDK_KEY_F9' was not declared in this scope > > CKey.cpp:144: error: 'GDK_KEY_F10' was not declared in this scope > > CKey.cpp:145: error: 'GDK_KEY_F11' was not declared in this scope > > CKey.cpp:146: error: 'GDK_KEY_F12' was not declared in this scope > > CKey.cpp:147: error: 'GDK_KEY_F13' was not declared in this scope > > CKey.cpp:148: error: 'GDK_KEY_F14' was not declared in this scope > > CKey.cpp:149: error: 'GDK_KEY_F15' was not declared in this scope > > CKey.cpp:150: error: 'GDK_KEY_F16' was not declared in this scope > > CKey.cpp:151: error: 'GDK_KEY_F17' was not declared in this scope > > CKey.cpp:152: error: 'GDK_KEY_F18' was not declared in this scope > > CKey.cpp:153: error: 'GDK_KEY_F19' was not declared in this scope > > CKey.cpp:154: error: 'GDK_KEY_F20' was not declared in this scope > > CKey.cpp:155: error: 'GDK_KEY_F21' was not declared in this scope > > CKey.cpp:156: error: 'GDK_KEY_F22' was not declared in this scope > > CKey.cpp:157: error: 'GDK_KEY_F23' was not declared in this scope > > CKey.cpp:158: error: 'GDK_KEY_F24' was not declared in this scope > > CKey.cpp:159: error: 'GDK_KEY_Menu' was not declared in this scope > > CKey.cpp:160: error: 'GDK_KEY_Help' was not declared in this scope > > CKey.cpp:161: error: 'GDK_KEY_space' was not declared in this scope > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > CKey.cpp:173: error: too many initializers for 'GB_DESC' > > > > > > [0] > > > https://launchpadlibrarian.net/147038496/buildlog_ubuntu-lucid-i386.gambas3_3.4.99-2%2Bsvn4622-build29~lucid1_FAILEDTOBUILD.txt.gz > > > > > > It should be fixed with revision #5783. > > Regards, > > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas at ...1... Wed Aug 14 18:59:23 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 14 Aug 2013 18:59:23 +0200 Subject: [Gambas-devel] Compile error in Ubuntu Lucid In-Reply-To: References: <5206DCAE.8060308@...1...> Message-ID: <520BB76B.6000602@...1...> Le 14/08/2013 18:41, Sebastian Kulesz a ?crit : > It is still failing, same file, same error message, different symbols: > > CXX gb_gtk_la-gkey.lo > gkey.cpp: In static member function 'static int gKey::code()': > gkey.cpp:69: error: 'GDK_KEY_Alt_R' was not declared in this scope > gkey.cpp:70: error: 'GDK_KEY_Alt_L' was not declared in this scope > gkey.cpp:71: error: 'GDK_KEY_Control_R' was not declared in this scope > gkey.cpp:72: error: 'GDK_KEY_Control_L' was not declared in this scope > gkey.cpp:73: error: 'GDK_KEY_Meta_R' was not declared in this scope > gkey.cpp:74: error: 'GDK_KEY_Meta_L' was not declared in this scope > gkey.cpp:75: error: 'GDK_KEY_Shift_R' was not declared in this scope > gkey.cpp:76: error: 'GDK_KEY_Shift_L' was not declared in this scope > I forgot some constants... It should be fixed in revision #5796. -- Beno?t Minisini From tobias at ...692... Fri Aug 16 00:07:30 2013 From: tobias at ...692... (Tobias Boege) Date: Fri, 16 Aug 2013 00:07:30 +0200 Subject: [Gambas-devel] Comparing Gambas strings Message-ID: <20130815220729.GO472@...693...> Hi Benoit, I'm a little uncertain about the following code: --- BEGIN_METHOD(Class_Method, GB_STRING a; GB_STRING b) char *b = GB.NewString(STRING(b), LENGTH(b)); int res = strncmp(STRING(a), b, LENGTH(a) + 1); END_METHOD --- I just want to compare (case-unsensitively) the given Gambas strings 'a' and 'b'. As I saw in the sources of STRING_new(), the resulting string 'b' is always NUL terminated. (I need it GB.NewString'd anyway.) So this seems correct to me: strncmp() compares the maybe-not-NUL-terminated string 'a' and 'b' until either string reaches a NUL or the given number of bytes was searched. That there is a NUL in 'b' is sure. And for 'a', the NUL is either at LENGTH(a) + 1 or the string is part of a larger one, right? As if we called Class.Method(Mid$("String containing 'a'", 3, 3), "string b") In any case it will *not* produce a segfault if I instruct strncmp() to examine LENGTH(a) + 1 bytes. Is this correct? Additionally, it will lead me a correct comparison of the two strings, or not? I fear that something like this could produce false positives: Class.Method(Mid$("sample", 1, 2), "sample") Should I also compare the strings' lengths? Sounds kind of inconvenient because all I want is to compare ASCII strings case-unsensitively. Maybe I have overlooked an API or I don't get the right idea just now. Regards, Tobi From gambas at ...1... Fri Aug 16 01:04:36 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Fri, 16 Aug 2013 01:04:36 +0200 Subject: [Gambas-devel] Comparing Gambas strings In-Reply-To: <20130815220729.GO472@...693...> References: <20130815220729.GO472@...693...> Message-ID: <520D5E84.30204@...1...> Le 16/08/2013 00:07, Tobias Boege a ?crit : > Hi Benoit, > > I'm a little uncertain about the following code: > > --- > BEGIN_METHOD(Class_Method, GB_STRING a; GB_STRING b) > > char *b = GB.NewString(STRING(b), LENGTH(b)); > > int res = strncmp(STRING(a), b, LENGTH(a) + 1); > > END_METHOD > --- > > I just want to compare (case-unsensitively) the given Gambas strings 'a' and > 'b'. As I saw in the sources of STRING_new(), the resulting string 'b' is > always NUL terminated. (I need it GB.NewString'd anyway.) > > So this seems correct to me: strncmp() compares the maybe-not-NUL-terminated > string 'a' and 'b' until either string reaches a NUL or the given number of > bytes was searched. > > That there is a NUL in 'b' is sure. And for 'a', the NUL is either at > LENGTH(a) + 1 or the string is part of a larger one, right? As if we called > > Class.Method(Mid$("String containing 'a'", 3, 3), "string b") > > In any case it will *not* produce a segfault if I instruct strncmp() to > examine LENGTH(a) + 1 bytes. Is this correct? > > Additionally, it will lead me a correct comparison of the two strings, or > not? I fear that something like this could produce false positives: > > Class.Method(Mid$("sample", 1, 2), "sample") > > Should I also compare the strings' lengths? Sounds kind of inconvenient > because all I want is to compare ASCII strings case-unsensitively. Maybe I > have overlooked an API or I don't get the right idea just now. > > Regards, > Tobi > GB.NewString() always allocates a null-terminated string. But string passed as arguments are not necessarily null-terminated (this is why you get both a pointer and a length!). -> Note: this allows Mid$(), Left$(), Right$(), Trim$(), LTrim$(), RTrim$() not to allocate anything, and so to be fast. Don't use strcmp() and strncmp() (and tolower() and toupper()), because they are doing a locale-aware comparison. You must use GB.StrCaseCmp(), GB.StrNCaseCamp(), GB.ToLower() and GB.ToUpper() instead. -> This because of the Turkish language, where 'i' and 'I' are not the same letter if you do a locale-aware case unsensitive comparison. -> Fortunately, if you include "gambas.h", it will do the substitution automatically. So you can continue on using strcmp(), strncmp(), toupper() and tolower(). So you have to do: LENGTH(a) == LENGTH(b) && GB.StrNCaseCmp(a, b, LENGTH(a)) == 0 to test case-unsensitive equality. If you need fast comparisons, look at the 'main/share/gb_common_string_temp.h' Gambas source file. Regards, -- Beno?t Minisini From tobias at ...692... Fri Aug 16 09:50:29 2013 From: tobias at ...692... (Tobias Boege) Date: Fri, 16 Aug 2013 09:50:29 +0200 Subject: [Gambas-devel] Comparing Gambas strings In-Reply-To: <520D5E84.30204@...1...> References: <20130815220729.GO472@...693...> <520D5E84.30204@...1...> Message-ID: <20130816075029.GA654@...693...> On Fri, 16 Aug 2013, Beno?t Minisini wrote: > Le 16/08/2013 00:07, Tobias Boege a ?crit : > > Hi Benoit, > > > > I'm a little uncertain about the following code: > > > > --- > > BEGIN_METHOD(Class_Method, GB_STRING a; GB_STRING b) > > > > char *b = GB.NewString(STRING(b), LENGTH(b)); > > > > int res = strncmp(STRING(a), b, LENGTH(a) + 1); > > > > END_METHOD > > --- > > > > I just want to compare (case-unsensitively) the given Gambas strings 'a' and > > 'b'. As I saw in the sources of STRING_new(), the resulting string 'b' is > > always NUL terminated. (I need it GB.NewString'd anyway.) > > > > So this seems correct to me: strncmp() compares the maybe-not-NUL-terminated > > string 'a' and 'b' until either string reaches a NUL or the given number of > > bytes was searched. > > > > That there is a NUL in 'b' is sure. And for 'a', the NUL is either at > > LENGTH(a) + 1 or the string is part of a larger one, right? As if we called > > > > Class.Method(Mid$("String containing 'a'", 3, 3), "string b") > > > > In any case it will *not* produce a segfault if I instruct strncmp() to > > examine LENGTH(a) + 1 bytes. Is this correct? > > > > Additionally, it will lead me a correct comparison of the two strings, or > > not? I fear that something like this could produce false positives: > > > > Class.Method(Mid$("sample", 1, 2), "sample") > > > > Should I also compare the strings' lengths? Sounds kind of inconvenient > > because all I want is to compare ASCII strings case-unsensitively. Maybe I > > have overlooked an API or I don't get the right idea just now. > > > > Regards, > > Tobi > > > > GB.NewString() always allocates a null-terminated string. But string > passed as arguments are not necessarily null-terminated (this is why you > get both a pointer and a length!). > > -> Note: this allows Mid$(), Left$(), Right$(), Trim$(), LTrim$(), > RTrim$() not to allocate anything, and so to be fast. > > Don't use strcmp() and strncmp() (and tolower() and toupper()), because > they are doing a locale-aware comparison. You must use GB.StrCaseCmp(), > GB.StrNCaseCamp(), GB.ToLower() and GB.ToUpper() instead. > > -> This because of the Turkish language, where 'i' and 'I' are not the > same letter if you do a locale-aware case unsensitive comparison. > > -> Fortunately, if you include "gambas.h", it will do the substitution > automatically. So you can continue on using strcmp(), strncmp(), > toupper() and tolower(). > > So you have to do: > > LENGTH(a) == LENGTH(b) && GB.StrNCaseCmp(a, b, LENGTH(a)) == 0 > > to test case-unsensitive equality. > > If you need fast comparisons, look at the > 'main/share/gb_common_string_temp.h' Gambas source file. > Phew, it took me quite some time to figure out that I meant to say: I want to compare case-sensitively not case-unsensitively! My mistake... In the former case I would have used GB.StrNCaseCmp() but case matters. I guess, the additional length comparison is the solution I need. If not so, please correct me. Regards, Tobi From jusabejusabe at ...176... Thu Aug 22 18:45:07 2013 From: jusabejusabe at ...176... (Julio Sanchez) Date: Thu, 22 Aug 2013 18:45:07 +0200 Subject: [Gambas-devel] RFC: component LATEX2 Message-ID: Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a component that I made to create reports. Generates both TEX files (latex) and PDF. You can create reports RTF and ODT, gridviews content of queries and databases, which can be modified by libreoffice, for example. For if it considers, is added in future version gambas3. Here you are download links and a short video so you can see what you can get with component latex2 Download: component: https://app.box.com/s/8x4a1k2bjw75cknulmzy test: https://app.box.com/s/mydi385uslwlkxg1v697 VideoTutorial: http://youtu.be/6fWUFGOT-tQ I have two questions: 1) When I create a program that makes use of the new component, to create the installation package. DEB siquiente get the error: https://app.box.com/s/mg75jawunxftlvgsoy8p 2) Latex component classes, methods are discussed, to help the user. Leaving the aid when used. But when added to a new project, that helps not appear: https://app.box.com/s/phm89rjjng14pt24gmo9 https://app.box.com/s/lh5pj2oens064baoezt7 Best Regards Note: Forgive my English, but not much and helps me google translate -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at ...176... Thu Aug 22 21:51:49 2013 From: gambas.fr at ...176... (Fabien Bodard) Date: Thu, 22 Aug 2013 21:51:49 +0200 Subject: [Gambas-devel] RFC: component LATEX2 In-Reply-To: References: Message-ID: Why are you using Bash script ???? Use Exec insteed. Maybe it will be good too to store the doc structure in an object tree like gb.xml.html do, So you can imagine to load Tex file and modify it. Maybe you can use gb.xml at backend storing and then parse the xml structure to generate the Latex file before render. It's a good idea of component indeed. 2013/8/22 Julio Sanchez > Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a > component that I made to create reports. Generates both TEX files (latex) > and PDF. > > You can create reports RTF and ODT, gridviews content of queries and > databases, which can be modified by libreoffice, for example. > > For if it considers, is added in future version gambas3. > > Here you are download links and a short video so you can see what you can > get with component latex2 > > Download: > component: https://app.box.com/s/8x4a1k2bjw75cknulmzy > test: https://app.box.com/s/mydi385uslwlkxg1v697 > > VideoTutorial: > http://youtu.be/6fWUFGOT-tQ > > I have two questions: > 1) When I create a program that makes use of the new component, to create > the installation package. DEB siquiente get the error: > https://app.box.com/s/mg75jawunxftlvgsoy8p > > 2) Latex component classes, methods are discussed, to help the user. > Leaving the aid when used. But when added to a new project, that helps not > appear: > https://app.box.com/s/phm89rjjng14pt24gmo9 > https://app.box.com/s/lh5pj2oens064baoezt7 > > > Best Regards > > Note: > Forgive my English, but not much and helps me google translate > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From jusabejusabe at ...176... Fri Aug 23 12:25:50 2013 From: jusabejusabe at ...176... (Julio Sanchez) Date: Fri, 23 Aug 2013 12:25:50 +0200 Subject: [Gambas-devel] RFC: component LATEX2 In-Reply-To: References: Message-ID: Hello Fabian: "Why are you using Bash script ???? Use Exec insteed." Okay, but I used Shell, and that gave me an error Exec. And eliminated the use of script bash :) New Download: code tar.gz: https://app.box.com/s/yhioaqx1u7ags9zy4l88 .deb: https://app.box.com/s/ximes52mi8xu10v8zk7u "........the Latex file before render to generate the Latex file before render." I added a new method .compileTEX to create the file .tex (plus you can display and edit with Gedit) capture: https://app.box.com/s/qktv9nqot1xnepewb7q3 Download new test: https://app.box.com/s/x106l0f6of33c7awukck "Maybe you can use gb.xml at backend storing" No gb.xml handle component :( Regards Julio 2013/8/22 Fabien Bodard > Why are you using Bash script ???? Use Exec insteed. Maybe it will be good > too to store the doc structure in an object tree like gb.xml.html do, So > you can imagine to load Tex file and modify it. Maybe you can use gb.xml at > backend storing and then parse the xml structure to generate the Latex file > before render. > > It's a good idea of component indeed. > > > > > 2013/8/22 Julio Sanchez > >> Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a >> component that I made to create reports. Generates both TEX files (latex) >> and PDF. >> >> You can create reports RTF and ODT, gridviews content of queries and >> databases, which can be modified by libreoffice, for example. >> >> For if it considers, is added in future version gambas3. >> >> Here you are download links and a short video so you can see what you >> can get with component latex2 >> >> Download: >> component: https://app.box.com/s/8x4a1k2bjw75cknulmzy >> test: https://app.box.com/s/mydi385uslwlkxg1v697 >> >> VideoTutorial: >> http://youtu.be/6fWUFGOT-tQ >> >> I have two questions: >> 1) When I create a program that makes use of the new component, to create >> the installation package. DEB siquiente get the error: >> https://app.box.com/s/mg75jawunxftlvgsoy8p >> >> 2) Latex component classes, methods are discussed, to help the user. >> Leaving the aid when used. But when added to a new project, that helps not >> appear: >> https://app.box.com/s/phm89rjjng14pt24gmo9 >> https://app.box.com/s/lh5pj2oens064baoezt7 >> >> >> Best Regards >> >> Note: >> Forgive my English, but not much and helps me google translate >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from SourceForge and >> AppDynamics. Performance Central is your source for news, insights, >> analysis and resources for efficient Application Performance Management. >> Visit us today! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> > > > -- > Fabien Bodard > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at ...176... Fri Aug 23 13:15:10 2013 From: gambas.fr at ...176... (Fabien Bodard) Date: Fri, 23 Aug 2013 13:15:10 +0200 Subject: [Gambas-devel] RFC: component LATEX2 In-Reply-To: References: Message-ID: 2013/8/23 Julio Sanchez > Hello Fabian: > > > "Why are you using Bash script ???? Use Exec insteed." > Okay, but I used Shell, and that gave me an error Exec. And eliminated the > use of script bash :) > > New Download: > code tar.gz: https://app.box.com/s/yhioaqx1u7ags9zy4l88 > .deb: https://app.box.com/s/ximes52mi8xu10v8zk7u > > "........the Latex file before render to generate the Latex file before > render." > I added a new method .compileTEX to create the file .tex (plus you can > display and edit with Gedit) > > capture: https://app.box.com/s/qktv9nqot1xnepewb7q3 > Download new test: https://app.box.com/s/x106l0f6of33c7awukck > > "Maybe you can use gb.xml at backend storing" > No gb.xml handle component :( > > What do you mean ? > Regards > > Julio > > > 2013/8/22 Fabien Bodard > >> Why are you using Bash script ???? Use Exec insteed. Maybe it will be >> good too to store the doc structure in an object tree like gb.xml.html do, >> So you can imagine to load Tex file and modify it. Maybe you can use gb.xml >> at backend storing and then parse the xml structure to generate the Latex >> file before render. >> >> It's a good idea of component indeed. >> >> >> >> >> 2013/8/22 Julio Sanchez >> >>> Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a >>> component that I made to create reports. Generates both TEX files ( >>> latex) and PDF. >>> >>> You can create reports RTF and ODT, gridviews content of queries and >>> databases, which can be modified by libreoffice, for example. >>> >>> For if it considers, is added in future version gambas3. >>> >>> Here you are download links and a short video so you can see what you >>> can get with component latex2 >>> >>> Download: >>> component: https://app.box.com/s/8x4a1k2bjw75cknulmzy >>> test: https://app.box.com/s/mydi385uslwlkxg1v697 >>> >>> VideoTutorial: >>> http://youtu.be/6fWUFGOT-tQ >>> >>> I have two questions: >>> 1) When I create a program that makes use of the new component, to create >>> the installation package. DEB siquiente get the error: >>> https://app.box.com/s/mg75jawunxftlvgsoy8p >>> >>> 2) Latex component classes, methods are discussed, to help the user. >>> Leaving the aid when used. But when added to a new project, that helps not >>> appear: >>> https://app.box.com/s/phm89rjjng14pt24gmo9 >>> https://app.box.com/s/lh5pj2oens064baoezt7 >>> >>> >>> Best Regards >>> >>> Note: >>> Forgive my English, but not much and helps me google translate >>> >>> >>> ------------------------------------------------------------------------------ >>> Introducing Performance Central, a new site from SourceForge and >>> AppDynamics. Performance Central is your source for news, insights, >>> analysis and resources for efficient Application Performance Management. >>> Visit us today! >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Gambas-devel mailing list >>> Gambas-devel at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>> >>> >> >> >> -- >> Fabien Bodard >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from SourceForge and >> AppDynamics. Performance Central is your source for news, insights, >> analysis and resources for efficient Application Performance Management. >> Visit us today! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at ...692... Fri Aug 23 13:38:59 2013 From: tobias at ...692... (Tobias Boege) Date: Fri, 23 Aug 2013 13:38:59 +0200 Subject: [Gambas-devel] RFC: component LATEX2 In-Reply-To: References: Message-ID: <20130823113859.GB500@...693...> On Thu, 22 Aug 2013, Julio Sanchez wrote: > Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a > component that > I made to create reports. Generates both TEX files (latex) and PDF. > > You can create reports RTF and ODT, gridviews content of queries and > databases, which can be modified by libreoffice, for example. > > For if it considers, is added in future version gambas3. > > Here you are download links and a short video so you can see what you can > get with component latex2 > > Download: > component: https://app.box.com/s/8x4a1k2bjw75cknulmzy > test: https://app.box.com/s/mydi385uslwlkxg1v697 > > VideoTutorial: > http://youtu.be/6fWUFGOT-tQ > > I have two questions: > 1) When I create a program that makes use of the new component, to create > the installation package. DEB siquiente get the error: > https://app.box.com/s/mg75jawunxftlvgsoy8p > > 2) Latex component classes, methods are discussed, to help the user. > Leaving the > aid when used. But when added to a new project, that helps not appear: > https://app.box.com/s/phm89rjjng14pt24gmo9 > https://app.box.com/s/lh5pj2oens064baoezt7 > > > Best Regards > > Note: > Forgive my English, but not much and helps me google translate My comments focus on the LaTeX part mainly as I don't know much about .odt and don't care about .rtf ;-) Nice idea. However, there are three things I don't like: 1) The component is only marginally object-oriented, like Fabien already pointed out. I mean, the idea to let the user programmatically construct a LaTeX document is a pretty good one but you should keep track of the document structure and then be able to modify it (to some extent) afterwards. 2) You depend on pandoc for the conversions and some LaTeX packages which people may not have installed. The least duty you have is to say what LaTeX packages one needs. (And man, I just checked out pandoc and it's 1 GiB when installed under Arch Linux on my machine. Is it worth the effort to just create .odt and .rtf? Can't you just export the .tex and let the user, if he so desires, convert .tex to .odt or .rtf?) 3) You cannot just save shell scripts under /tmp and execute them. This is a security risk (depending on your users' umask). Even though, you Chmod them correctly, there is still a race condition involved. Oh, and I need to say that I didn't understand most of the code because your naming is spanish (I think). I don't know what most variables signify. While I'm at naming, don't prepend "Class" before a class name. I.e. you name a class "_ClassBox.class" but from the file extension, it is already clear that it is a class, so just name it "_Box" or "_LatexBox" if you fear name conflicts. Not to say that the interface needs polishing. Just look at _ClassBox:MessageBox(). Its 'itype' parameter needs symbolic constants. The user likes to give box.MessageBox("some text", box.Oval) instead of box.MessageBox("some text", 3) And the symbols need to follow the Pascal naming convention. Also some random things I encountered: - Don't include spanish comments (or comments at all) in the documents your component generates (Latex:InitDoc()). - I don't think functions like Latex:QueryResultTableDB() or Latex:TableGridViews() really belong to the LaTeX class. They just make your component depend on gb.db and gb.form for some very special tasks. latex2 should be usable without databases and a graphical system. So instead, take the code out of there and write an example project to show how it could be done. - _ClassVerbatin is clearly mis-named with the "n" at the end. The corresponding variable in _ClassEnvironment is also mis-named. - Not everyone has "evince" installed (LatexHelper:compilePDF()). Just don't launch PDF viewers from a component. - Returning an error string where a file name would be expected is not a sane way of reporting errors (again in LatexHelper:compilePDF() and some others). Your error message could equivalently well be file names. You'll have to use Error.Raise(). IMHO, the component also lacks some generic functions like Latex.BeginEnvironment(sEnv As String, ...) where you would then write \begin{sEnv}[...] Use the Param class to access the variable argument list. I hope this isn't too much or too unordered. Regards, Tobi From jusabejusabe at ...176... Fri Aug 23 19:25:28 2013 From: jusabejusabe at ...176... (Julio Sanchez) Date: Fri, 23 Aug 2013 19:25:28 +0200 Subject: [Gambas-devel] RFC: component LATEX2 In-Reply-To: <20130823113859.GB500@...693...> References: <20130823113859.GB500@...693...> Message-ID: Hello Fabien: "What do you mean ?" I uploaded a new version with those changes New Download: code tar.gz: https://app.box.com/s/yhioaqx1u7ags9zy4l88 .deb: https://app.box.com/s/ximes52mi8xu10v8zk7u Download new test: https://app.box.com/s/x106l0f6of33c7awukck Regards, Julio 2013/8/23 Tobias Boege > On Thu, 22 Aug 2013, Julio Sanchez wrote: > > Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a > > component that > > I made to create reports. Generates both TEX files (latex) and PDF. > > > > You can create reports RTF and ODT, gridviews content of queries and > > databases, which can be modified by libreoffice, for example. > > > > For if it considers, is added in future version gambas3. > > > > Here you are download links and a short video so you can see what you can > > get with component latex2 > > > > Download: > > component: https://app.box.com/s/8x4a1k2bjw75cknulmzy > > test: https://app.box.com/s/mydi385uslwlkxg1v697 > > > > VideoTutorial: > > http://youtu.be/6fWUFGOT-tQ > > > > I have two questions: > > 1) When I create a program that makes use of the new component, to create > > the installation package. DEB siquiente get the error: > > https://app.box.com/s/mg75jawunxftlvgsoy8p > > > > 2) Latex component classes, methods are discussed, to help the user. > > Leaving the > > aid when used. But when added to a new project, that helps not appear: > > https://app.box.com/s/phm89rjjng14pt24gmo9 > > https://app.box.com/s/lh5pj2oens064baoezt7 > > > > > > Best Regards > > > > Note: > > Forgive my English, but not much and helps me google translate > > My comments focus on the LaTeX part mainly as I don't know much about .odt > and don't care about .rtf ;-) > > Nice idea. However, there are three things I don't like: > > 1) The component is only marginally object-oriented, like Fabien already > pointed out. I mean, the idea to let the user programmatically construct > a LaTeX document is a pretty good one but you should keep track of the > document structure and then be able to modify it (to some extent) > afterwards. > 2) You depend on pandoc for the conversions and some LaTeX packages which > people may not have installed. The least duty you have is to say what > LaTeX packages one needs. (And man, I just checked out pandoc and it's > 1 GiB when installed under Arch Linux on my machine. Is it worth the > effort to just create .odt and .rtf? Can't you just export the .tex and > let the user, if he so desires, convert .tex to .odt or .rtf?) > 3) You cannot just save shell scripts under /tmp and execute them. This is > a > security risk (depending on your users' umask). Even though, you Chmod > them correctly, there is still a race condition involved. > > Oh, and I need to say that I didn't understand most of the code because > your > naming is spanish (I think). I don't know what most variables signify. > While > I'm at naming, don't prepend "Class" before a class name. I.e. you name a > class "_ClassBox.class" but from the file extension, it is already clear > that it is a class, so just name it "_Box" or "_LatexBox" if you fear name > conflicts. > > Not to say that the interface needs polishing. Just look at > _ClassBox:MessageBox(). Its 'itype' parameter needs symbolic constants. The > user likes to give > > box.MessageBox("some text", box.Oval) > > instead of > > box.MessageBox("some text", 3) > > And the symbols need to follow the Pascal naming convention. > > Also some random things I encountered: > - Don't include spanish comments (or comments at all) in the documents your > component generates (Latex:InitDoc()). > - I don't think functions like Latex:QueryResultTableDB() or > Latex:TableGridViews() really belong to the LaTeX class. They just make > your component depend on gb.db and gb.form for some very special tasks. > latex2 should be usable without databases and a graphical system. So > instead, take the code out of there and write an example project to show > how it could be done. > - _ClassVerbatin is clearly mis-named with the "n" at the end. The > corresponding variable in _ClassEnvironment is also mis-named. > - Not everyone has "evince" installed (LatexHelper:compilePDF()). Just > don't > launch PDF viewers from a component. > - Returning an error string where a file name would be expected is not a > sane way of reporting errors (again in LatexHelper:compilePDF() and some > others). Your error message could equivalently well be file names. You'll > have to use Error.Raise(). > > IMHO, the component also lacks some generic functions like > > Latex.BeginEnvironment(sEnv As String, ...) > > where you would then write > > \begin{sEnv}[...] > > Use the Param class to access the variable argument list. > > I hope this isn't too much or too unordered. > > Regards, > Tobi > > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jusabejusabe at ...176... Fri Aug 23 19:38:59 2013 From: jusabejusabe at ...176... (Julio Sanchez) Date: Fri, 23 Aug 2013 19:38:59 +0200 Subject: [Gambas-devel] RFC: component LATEX2 In-Reply-To: References: <20130823113859.GB500@...693...> Message-ID: Hello Tobi "2) You depend on pandoc for the conversions..." Only used Pandoc when converting odt or rtf. To create pdf needless. "3) You cannot just save shell scripts under /tmp and execute them. This is a security risk (depending on your users' umask). Even though, you Chmod them correctly, there is still a race condition involved." I have already resolved in the latest version, do not use script. We perform with the command Shell As I see that there are many changes to be made, I will upload the google code project (both the component and the example), for there to be modifying ye the things I mentioned, to better control the versions so and so go improving it. Thanks for the comments. Julio 2013/8/23 Julio Sanchez > Hello Fabien: > > > "What do you mean ?" > I uploaded a new version with those changes > > New Download: > code tar.gz: https://app.box.com/s/yhioaqx1u7ags9zy4l88 > .deb: https://app.box.com/s/ximes52mi8xu10v8zk7u > > Download new test: https://app.box.com/s/x106l0f6of33c7awukck > > Regards, > Julio > > > > > 2013/8/23 Tobias Boege > >> On Thu, 22 Aug 2013, Julio Sanchez wrote: >> > Hello, my name is Julio Sanchez Berro (jsbsan alia), I attached a >> > component that >> > I made to create reports. Generates both TEX files (latex) and PDF. >> > >> > You can create reports RTF and ODT, gridviews content of queries and >> > databases, which can be modified by libreoffice, for example. >> > >> > For if it considers, is added in future version gambas3. >> > >> > Here you are download links and a short video so you can see what you >> can >> > get with component latex2 >> > >> > Download: >> > component: https://app.box.com/s/8x4a1k2bjw75cknulmzy >> > test: https://app.box.com/s/mydi385uslwlkxg1v697 >> > >> > VideoTutorial: >> > http://youtu.be/6fWUFGOT-tQ >> > >> > I have two questions: >> > 1) When I create a program that makes use of the new component, to >> create >> > the installation package. DEB siquiente get the error: >> > https://app.box.com/s/mg75jawunxftlvgsoy8p >> > >> > 2) Latex component classes, methods are discussed, to help the user. >> > Leaving the >> > aid when used. But when added to a new project, that helps not appear: >> > https://app.box.com/s/phm89rjjng14pt24gmo9 >> > https://app.box.com/s/lh5pj2oens064baoezt7 >> > >> > >> > Best Regards >> > >> > Note: >> > Forgive my English, but not much and helps me google translate >> >> My comments focus on the LaTeX part mainly as I don't know much about .odt >> and don't care about .rtf ;-) >> >> Nice idea. However, there are three things I don't like: >> >> 1) The component is only marginally object-oriented, like Fabien already >> pointed out. I mean, the idea to let the user programmatically >> construct >> a LaTeX document is a pretty good one but you should keep track of the >> document structure and then be able to modify it (to some extent) >> afterwards. >> 2) You depend on pandoc for the conversions and some LaTeX packages which >> people may not have installed. The least duty you have is to say what >> LaTeX packages one needs. (And man, I just checked out pandoc and it's >> 1 GiB when installed under Arch Linux on my machine. Is it worth the >> effort to just create .odt and .rtf? Can't you just export the .tex and >> let the user, if he so desires, convert .tex to .odt or .rtf?) >> 3) You cannot just save shell scripts under /tmp and execute them. This >> is a >> security risk (depending on your users' umask). Even though, you Chmod >> them correctly, there is still a race condition involved. >> >> Oh, and I need to say that I didn't understand most of the code because >> your >> naming is spanish (I think). I don't know what most variables signify. >> While >> I'm at naming, don't prepend "Class" before a class name. I.e. you name a >> class "_ClassBox.class" but from the file extension, it is already clear >> that it is a class, so just name it "_Box" or "_LatexBox" if you fear name >> conflicts. >> >> Not to say that the interface needs polishing. Just look at >> _ClassBox:MessageBox(). Its 'itype' parameter needs symbolic constants. >> The >> user likes to give >> >> box.MessageBox("some text", box.Oval) >> >> instead of >> >> box.MessageBox("some text", 3) >> >> And the symbols need to follow the Pascal naming convention. >> >> Also some random things I encountered: >> - Don't include spanish comments (or comments at all) in the documents >> your >> component generates (Latex:InitDoc()). >> - I don't think functions like Latex:QueryResultTableDB() or >> Latex:TableGridViews() really belong to the LaTeX class. They just make >> your component depend on gb.db and gb.form for some very special tasks. >> latex2 should be usable without databases and a graphical system. So >> instead, take the code out of there and write an example project to show >> how it could be done. >> - _ClassVerbatin is clearly mis-named with the "n" at the end. The >> corresponding variable in _ClassEnvironment is also mis-named. >> - Not everyone has "evince" installed (LatexHelper:compilePDF()). Just >> don't >> launch PDF viewers from a component. >> - Returning an error string where a file name would be expected is not a >> sane way of reporting errors (again in LatexHelper:compilePDF() and some >> others). Your error message could equivalently well be file names. >> You'll >> have to use Error.Raise(). >> >> IMHO, the component also lacks some generic functions like >> >> Latex.BeginEnvironment(sEnv As String, ...) >> >> where you would then write >> >> \begin{sEnv}[...] >> >> Use the Param class to access the variable argument list. >> >> I hope this isn't too much or too unordered. >> >> Regards, >> Tobi >> >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from SourceForge and >> AppDynamics. Performance Central is your source for news, insights, >> analysis and resources for efficient Application Performance Management. >> Visit us today! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ron at ...572... Sat Aug 31 12:40:10 2013 From: ron at ...572... (Ron) Date: Sat, 31 Aug 2013 12:40:10 +0200 Subject: [Gambas-devel] Bug regarding breakpoint in IDE Message-ID: While developing in Gambas 3.4.2 I find a lot of small bugs/strange things in the IDE. Opening a bugreport for each of them distracts me to much from my own project, I will post them here. So at least they don't get lost, and other people can shoot on them. When settings a breakpoint, it doesn't trigger depending on position. 1) If Main.bWeatherUGDebug Then Main.WriteDebugLog(("[WeatherUG] Current Weather: '")) 2) Main.WriteDebugLog(("[WeatherUG] observation_epoch = '") & cJSON["current_observation"]["observation_epoch"] & "'") From ron at ...572... Sat Aug 31 12:41:31 2013 From: ron at ...572... (Ron) Date: Sat, 31 Aug 2013 12:41:31 +0200 Subject: [Gambas-devel] Bug regarding breakpoint in IDE In-Reply-To: References: Message-ID: Sorry wrong shortkey... Breakpoint on Position 1 works ok, but inside the If-then it doesn't. (position 2) And I'm sure the line is run. Regards, Ron. 2013/8/31 Ron : > While developing in Gambas 3.4.2 I find a lot of small bugs/strange > things in the IDE. > > Opening a bugreport for each of them distracts me to much from my own > project, I will post them here. > So at least they don't get lost, and other people can shoot on them. > > When settings a breakpoint, it doesn't trigger depending on position. > > 1) If Main.bWeatherUGDebug Then > Main.WriteDebugLog(("[WeatherUG] Current Weather: '")) > 2) Main.WriteDebugLog(("[WeatherUG] observation_epoch = '") & > cJSON["current_observation"]["observation_epoch"] & "'")