From Merick_TeVaran at comcast.net Sun Apr 6 08:41:40 2008 From: Merick_TeVaran at comcast.net (Merick) Date: Sun Apr 6 08:45:53 2008 Subject: [Iup-users] iup-lua interpreter Message-ID: <47F8A8E4.4010306@comcast.net> The iup-lua interpreter on the download page, what all was compiled in it? Was it just the iup libs, or was it also linked with CD or IM? From scuri at tecgraf.puc-rio.br Sun Apr 6 17:51:34 2008 From: scuri at tecgraf.puc-rio.br (Antonio Scuri) Date: Sun Apr 6 17:56:05 2008 Subject: [Iup-users] iup-lua interpreter In-Reply-To: <47F8A8E4.4010306@comcast.net> References: <47F8A8E4.4010306@comcast.net> Message-ID: <02724013FAE2497CA80B9D45C03A1BBD@antonio> Yes, IUP, CD and IM are linked in IupLua interpreter. Best, Scuri > -----Original Message----- > From: iup-users-bounces@lists.luaforge.net > [mailto:iup-users-bounces@lists.luaforge.net] On Behalf Of Merick > Sent: domingo, 6 de abril de 2008 07:42 > To: IUP discussion list. > Subject: [Iup-users] iup-lua interpreter > > The iup-lua interpreter on the download page, what all was > compiled in it? Was it just the iup libs, or was it also > linked with CD or IM? > > _______________________________________________ > iup-users mailing list > iup-users@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users > From jeremy at cowgar.com Fri Apr 11 15:08:21 2008 From: jeremy at cowgar.com (Jeremy Cowgar) Date: Fri Apr 11 15:16:03 2008 Subject: [Iup-users] Dialog wide hot keys? Message-ID: <47FF9B05.3040706@cowgar.com> I am trying to implement a few dialog wide hot keys starting with Control+S to save the current item. I am having a problem in that I do: Ihandle *dlg = IupDialog(); IupSetCallback(dlg, "K_cS", (Icallback*)onSave); Now, my onSave is called and I return IUP_IGNORE from it, however, if the cursor is in, say a IupText, a control character is inserted into the IupText control as well. What should I do to make this work right? Jeremy Cowgar From scuri at tecgraf.puc-rio.br Sat Apr 12 02:11:25 2008 From: scuri at tecgraf.puc-rio.br (Antonio Scuri) Date: Sat Apr 12 02:16:22 2008 Subject: [Iup-users] Dialog wide hot keys? In-Reply-To: <47FF9B05.3040706@cowgar.com> References: <47FF9B05.3040706@cowgar.com> Message-ID: <20DA713D0C9544AE9AFC3B1A2C1DDCC5@antonio> Hi Jeremy, This was an old bug that I did not have a fix. But I just managed how to fix it today, and commit the changes to the CVS. If you need I can send you a pre-compiled library so you can test it. The annoying beep is still there. Even Notepad has it, except when a Hot Key is implemented. Since there is no hot keys in IUP, it will beep also for K_* callbacks. Best, scuri > -----Original Message----- > From: iup-users-bounces@lists.luaforge.net > [mailto:iup-users-bounces@lists.luaforge.net] On Behalf Of > Jeremy Cowgar > Sent: sexta-feira, 11 de abril de 2008 14:08 > To: IUP discussion list. > Subject: [Iup-users] Dialog wide hot keys? > > I am trying to implement a few dialog wide hot keys starting with > Control+S to save the current item. I am having a problem in > that I do: > > Ihandle *dlg = IupDialog(); > IupSetCallback(dlg, "K_cS", (Icallback*)onSave); > > Now, my onSave is called and I return IUP_IGNORE from it, > however, if the cursor is in, say a IupText, a control > character is inserted into the IupText control as well. > > What should I do to make this work right? > > Jeremy Cowgar > > _______________________________________________ > iup-users mailing list > iup-users@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users > From jeremy at cowgar.com Sun Apr 13 20:56:39 2008 From: jeremy at cowgar.com (Jeremy Cowgar) Date: Sun Apr 13 21:04:51 2008 Subject: [Iup-users] Memory again, sorry. Message-ID: <48028FA7.7070903@cowgar.com> IupSetAttribute does not duplicate the attribute sent, but IupStoreAttribute does, correct? Now, it seems that IupSetAttributes does duplicate the values? So: { char *attrs = strdup("VALUE=John,SIZE=20x20"); IupSetAttributes(control, attrs); free(attrs); } ... I realize the strdup and free are useless here, but I added for greater clarity of what I am speaking about. Now, what about values sent to controls such as IupButton and IupValue? IupLabel("My Label") is "My Label" duplicated? The same with other similar controls, such as IupButton("Name", "Action")... Thanks, Jeremy From jeremy at cowgar.com Sun Apr 13 21:46:28 2008 From: jeremy at cowgar.com (Jeremy Cowgar) Date: Sun Apr 13 21:54:37 2008 Subject: [Iup-users] IupList, Adding/Removing items resizes control Message-ID: <48029B54.2010505@cowgar.com> I have an IupList and I set SIZE=100x50,EXPAND=VERTICAL. I want it to be 50 wide regardless of it's content. Now, this works fine, but when I add or remove an item to/from the list, the list control resizes itself to fit the new lists "width" (which in all my testing has been smaller). This makes things look pretty weird. So, I found that I can do: IupStoreAttribute(hList, "SIZE", "100x50"); IupRefresh(hList); and that will put it back to normal. However, this causes the whole dialog to resize all the controls. This happens in an instant but it does create an annoying flash. Any ideas? Jeremy From scuri at tecgraf.puc-rio.br Sun Apr 13 23:37:28 2008 From: scuri at tecgraf.puc-rio.br (Antonio Scuri) Date: Sun Apr 13 23:42:26 2008 Subject: [Iup-users] Memory again, sorry. In-Reply-To: <48028FA7.7070903@cowgar.com> References: <48028FA7.7070903@cowgar.com> Message-ID: > IupSetAttribute does not duplicate the attribute sent, but > IupStoreAttribute does, correct? Yes. > Now, it seems that IupSetAttributes does duplicate the values? So: > > { > char *attrs = strdup("VALUE=John,SIZE=20x20"); > IupSetAttributes(control, attrs); > free(attrs); > } > > ... I realize the strdup and free are useless here, but I > added for greater clarity of what I am speaking about. Yes, they are useless. IupSetAttributes uses IupStoreAttribute internally. > Now, what about values sent to controls such as IupButton and > IupValue? > > IupLabel("My Label") > > is "My Label" duplicated? The same with other similar > controls, such as IupButton("Name", "Action")... They all use IupStoreAttribute internally. Best, Scuri From scuri at tecgraf.puc-rio.br Mon Apr 14 11:20:34 2008 From: scuri at tecgraf.puc-rio.br (Antonio Scuri) Date: Mon Apr 14 11:25:32 2008 Subject: [Iup-users] IupList, Adding/Removing items resizes control In-Reply-To: <48029B54.2010505@cowgar.com> References: <48029B54.2010505@cowgar.com> Message-ID: <92DBE88726F247FE9F7A4EB54284ECDF@antonio> That' weird, because the list natural size will be used only if the user size is NOT set. In other words, the list will expand or contract to its contents only when SIZE and RASTERSIZE are NOT set. Check if you set SIZE to NULL somewhere. Best, scuri > -----Original Message----- > From: iup-users-bounces@lists.luaforge.net > [mailto:iup-users-bounces@lists.luaforge.net] On Behalf Of > Jeremy Cowgar > Sent: domingo, 13 de abril de 2008 20:46 > To: IUP discussion list. > Subject: [Iup-users] IupList, Adding/Removing items resizes control > > I have an IupList and I set SIZE=100x50,EXPAND=VERTICAL. I > want it to be 50 wide regardless of it's content. > > Now, this works fine, but when I add or remove an item > to/from the list, the list control resizes itself to fit the > new lists "width" (which in all my testing has been smaller). > This makes things look pretty weird. > So, I found that I can do: > > IupStoreAttribute(hList, "SIZE", "100x50"); IupRefresh(hList); > > and that will put it back to normal. However, this causes the > whole dialog to resize all the controls. This happens in an > instant but it does create an annoying flash. > > Any ideas? > > Jeremy > > > _______________________________________________ > iup-users mailing list > iup-users@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users > From Pierrick0.Varin at laposte.net Wed Apr 30 20:38:04 2008 From: Pierrick0.Varin at laposte.net (Pierrick Varin) Date: Wed Apr 30 22:34:54 2008 Subject: [Iup-users] A problem with IupMatrix Message-ID: <4818F4CC.5070201@laposte.net> Hello ! I just subscribed to this list because of a problem I encounter with an IupMatrix control. I'm using freebasic headers (nope not C, nor lua :p ) and .. Well, lets me copy the message I sent on the freebasic forums here. I hope someone here will know what is happening ! Thanks. The post : /Hi ! I'm using IUP for a project i'm working on. To enter and visualize data, there's an IupMatrix object (defined in iupcontrols.bi). Everything was working nice and then, don't know what I did, now, the IupMatrix don't "want" to enter in EDIT_MODE (you know, like in excel, when you double click on a Cell, it becomes editable). I checked all my matrix attributes changes (made with IupSetAttribute) but nothing changes the problem. First, does someone ever used this control ? If yes, does someone have any idea of what I could do ? Posting code ? uh.. I can't post the entire code since it won't be open source but I could post some parts, don't know which though .. Here is the "Update Matrix" sub, the one in which i'm making the most numerous changes on the matrix : (In the next code, "Cells" is the variable containing the IupMatrix) / *Sub UpdateListing(List As Listing) IupSetAttributes(mainDlg,"TITLE=""Listing ["+List.FileName+"]") If CurrListing.nbStructures<1 Then Exit Sub '' Combien de lignes par onglet ? -------- Dim As Integer nbStructurePerType=0 For i As Integer = 1 To CurrListing.nbStructures If Val(List.Structure(i).StructureType_Int) = Val(ActiveTab) Then nbStructurePerType += 1 End If Next IupSetAttributes(Cells, "NUMLIN="+Str(nbStructurePerType)) '' Rien a afficher ? If nbStructurePerType = 0 Then IupSetAttributes(Cells, "REDRAW=ALL" ) IupSetAttributes(Onglets, "REPAINT=YES") '' Enleve un bug .. Exit Sub End If '' ----------------------------------- '' Remplir les lignes ----------- Dim As Integer CurrLine = 0 For i As Integer = 1 To CurrListing.nbStructures If Val(List.Structure(i).StructureType_Int) = Val(ActiveTab) Then CurrLine+=1 IupSetAttributes( Cells, Str(CurrLine)+":1="""+List.Structure(i).Nom+"""" ) IupSetAttributes( Cells, Str(CurrLine)+":2="""+List.Structure(i).Ville+"""") IupSetAttributes( Cells, Str(CurrLine)+":3="""+List.Structure(i).SiteWeb+"""" ) IupSetAttributes( Cells, Str(CurrLine)+":4="""+List.Structure(i).Mail+"""" ) IupSetAttributes( Cells, Str(CurrLine)+":5="""+List.Structure(i).Tel+"""" ) IupSetAttributes( Cells, Str(CurrLine)+":6="""+List.Structure(i).Adresse+"""" ) IupSetAttributes( Cells, Str(CurrLine)+":7="""+List.Structure(i).CodePostal+"""" ) End If Next '' ------------------------------------- IupSetAttributes(Cells, "REDRAW=ALL" ) IupSetAttributes(Onglets, "REPAINT=YES")* /Thanks ! btw, i'm using IUP v2.6.0/ Second post : /Some news ... Still not working .. And I noticed something really weird ! Now, the IupMatrix bugs even if I directly show the GUI without accessing at the cells at all. In fact I'm just rendering the GUI and nothing else, so it could mean the bugs comes from the GUI definitions I guess. BUT ! The thing worked perfectly before I changed *something* in the main code (and ONLY in the main code !). So, only showing the GUI without any access to the main code should work, no ?! Maybe is it an iup's bug ? Or headers bug ? Ergh, really don't know. /And to finish, a last precision : I just noticed the thing works in ONE precise case : The same IupMatrix object is "bounded" in 7 different IupTabs, And it works in the 7th tab (?!) but only in the 7th tab. Sorry for my english .. From scuri at tecgraf.puc-rio.br Wed Apr 30 22:38:20 2008 From: scuri at tecgraf.puc-rio.br (Antonio Scuri) Date: Wed Apr 30 22:44:15 2008 Subject: [Iup-users] A problem with IupMatrix In-Reply-To: <4818F4CC.5070201@laposte.net> References: <4818F4CC.5070201@laposte.net> Message-ID: <00E1864DB6AA4D318E7D7B0E3E5CC68F@antonio> I really don't know what's going on. The first thing to do in this case is to disable the callbacks. The worng return code in the callback can make the matrix abort the editing of the cell. Best, scuri > -----Original Message----- > From: iup-users-bounces@lists.luaforge.net > [mailto:iup-users-bounces@lists.luaforge.net] On Behalf Of > Pierrick Varin > Sent: quarta-feira, 30 de abril de 2008 19:38 > To: iup-users@lists.luaforge.net > Subject: [Iup-users] A problem with IupMatrix > > Hello ! > > I just subscribed to this list because of a problem I > encounter with an IupMatrix control. > > I'm using freebasic headers (nope not C, nor lua :p ) and .. > Well, lets me copy the message I sent on the freebasic forums > here. I hope someone here will know what is happening ! > > Thanks. > > The post : > > /Hi ! > > I'm using IUP for a project i'm working on. To enter and > visualize data, there's an IupMatrix object (defined in > iupcontrols.bi). > > Everything was working nice and then, don't know what I did, > now, the IupMatrix don't "want" to enter in EDIT_MODE (you > know, like in excel, when you double click on a Cell, it > becomes editable). I checked all my matrix attributes changes > (made with IupSetAttribute) but nothing changes the problem. > > First, does someone ever used this control ? If yes, does > someone have any idea of what I could do ? > > Posting code ? uh.. I can't post the entire code since it > won't be open source but I could post some parts, don't know > which though .. Here is the "Update Matrix" sub, the one in > which i'm making the most numerous changes on the matrix : > > (In the next code, "Cells" is the variable containing the IupMatrix) / > > *Sub UpdateListing(List As Listing) > > IupSetAttributes(mainDlg,"TITLE=""Listing > ["+List.FileName+"]") > > If CurrListing.nbStructures<1 Then Exit Sub > > '' Combien de lignes par onglet ? -------- > > Dim As Integer nbStructurePerType=0 > > For i As Integer = 1 To CurrListing.nbStructures > If Val(List.Structure(i).StructureType_Int) = > Val(ActiveTab) Then > > nbStructurePerType += 1 > > End If > Next > > IupSetAttributes(Cells, "NUMLIN="+Str(nbStructurePerType)) > > '' Rien a afficher ? > If nbStructurePerType = 0 Then > IupSetAttributes(Cells, "REDRAW=ALL" ) > IupSetAttributes(Onglets, "REPAINT=YES") '' > Enleve un bug .. > Exit Sub > End If > > '' ----------------------------------- > > '' Remplir les lignes ----------- > > Dim As Integer CurrLine = 0 > For i As Integer = 1 To CurrListing.nbStructures > If Val(List.Structure(i).StructureType_Int) = > Val(ActiveTab) Then > CurrLine+=1 > IupSetAttributes( Cells, > Str(CurrLine)+":1="""+List.Structure(i).Nom+"""" ) > IupSetAttributes( Cells, > Str(CurrLine)+":2="""+List.Structure(i).Ville+"""") > IupSetAttributes( Cells, > Str(CurrLine)+":3="""+List.Structure(i).SiteWeb+"""" ) > IupSetAttributes( Cells, > Str(CurrLine)+":4="""+List.Structure(i).Mail+"""" ) > IupSetAttributes( Cells, > Str(CurrLine)+":5="""+List.Structure(i).Tel+"""" ) > IupSetAttributes( Cells, > Str(CurrLine)+":6="""+List.Structure(i).Adresse+"""" ) > IupSetAttributes( Cells, > Str(CurrLine)+":7="""+List.Structure(i).CodePostal+"""" ) > End If > Next > > '' ------------------------------------- > > IupSetAttributes(Cells, "REDRAW=ALL" ) > IupSetAttributes(Onglets, "REPAINT=YES")* > > /Thanks ! > > > btw, i'm using IUP v2.6.0/ > > > > > > Second post : > > > /Some news ... > > Still not working .. And I noticed something really weird ! > Now, the IupMatrix bugs even if I directly show the GUI > without accessing at the cells at all. > > In fact I'm just rendering the GUI and nothing else, so it > could mean the bugs comes from the GUI definitions I guess. > > BUT ! The thing worked perfectly before I changed *something* > in the main code (and ONLY in the main code !). So, only > showing the GUI without any access to the main code should work, no ?! > > Maybe is it an iup's bug ? Or headers bug ? Ergh, really don't know. > > /And to finish, a last precision : > I just noticed the thing works in ONE precise case : The same > IupMatrix object is "bounded" in 7 different IupTabs, And it > works in the 7th tab > (?!) but only in the 7th tab. > > > > Sorry for my english .. > > > _______________________________________________ > iup-users mailing list > iup-users@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users > From jeremy at cowgar.com Wed Apr 30 22:54:47 2008 From: jeremy at cowgar.com (Jeremy Cowgar) Date: Wed Apr 30 23:01:51 2008 Subject: [Iup-users] A problem with IupMatrix In-Reply-To: <4818F4CC.5070201@laposte.net> References: <4818F4CC.5070201@laposte.net> Message-ID: <481914D7.8070804@cowgar.com> I've never used FreeBasic, but use IupMatrix all the time w/no problems. I use it both in C and in Euphoria. I did notice it looks like you have an unended " in the TITLE? IupSetAttributes(mainDlg,"TITLE=""Listing ["+List.FileName+"]") I am not sure how FreeBasic works, but is "" a begining quote? I do not then, see an ending quote. Again, have no idea if this means anything. Also, if your just setting 1 attribute, you can use (in C at least): IupStoreAttribute(mainDlg, "TITLE", "Listing [" + List.FileName + "]") The same thing for your NUMLIN. In C, we also have: IupMatStoreAttribute(Cells, "", Row, Col, "Value") Which might simplify your code further. In any coding, when I have a problem I cannot explain, I start simplifying as much as I can, hopefully the problem will disappear during one change, then I can figure it out, or other times I simply so much that the problem becomes very apparent. Sorry I could offer no concrete answer. But I do use IupMatrix all the time in some pretty heavily used applications w/no problem. Jeremy