[Iup-users] A problem with IupMatrix

Pierrick Varin Pierrick0.Varin at laposte.net
Thu May 1 07:32:16 GMT+2 2008


Hi !

I already tried to disable all the callbacks and it didn't change 
anything. But I'll check it again, maybe I forgot to disable a callback ..

Thanks :)



Antonio Scuri a écrit :
>  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 at lists.luaforge.net 
>> [mailto:iup-users-bounces at lists.luaforge.net] On Behalf Of 
>> Pierrick Varin
>> Sent: quarta-feira, 30 de abril de 2008 19:38
>> To: iup-users at 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 at lists.luaforge.net
>> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>>
>>     
>
>
> _______________________________________________
> iup-users mailing list
> iup-users at lists.luaforge.net
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>
>
>   




More information about the iup-users mailing list