discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions about NSMatrix and NSTableView


From: Benoit Astruc
Subject: Questions about NSMatrix and NSTableView
Date: Fri, 11 Feb 2005 11:19:32 +0100

Hi,

First let me present myself, I am a french Mac OS X user (and developer). I came to GNUstep by reading the articles of Nicolas Roard in Linux Magazine. I have developed a few little apps that I want to port on GNUstep. The first of them is WRP (http://benoit.astruc.free.fr/weymery/WRP/index.html), a little support app for players of Weymery (http://www.weymery.com), a french pbem.

Well, I have been able to recompile the whole app on GNUstep but I have troubles with the GUI.

In my app I use some NSTableView, on Mac OS X, without coding anything the user can move from one cell to the other simply by pressing the down or up key. But on GNUstep it doesn't work :-(. So my question : will NSTableView in GNUstep one day have this enable by default and if not how can i do enable it ?

I have another issue with NSMatrix, I use some NSMatrix in my app with code like that :
------------------------------
        /*
         *      On affiche les informations du système sélectionné
         */
        if([defaults boolForKey: @"displayRevenus"])
        {
                /*
                 *      Revenus
                 */
                [matriceStatus addRow];
                if ([theSysteme revolte])
                {
                        [matriceStatus putCell:
                                [[[NSCell alloc] initImageCell: ledRouge] 
autorelease]
                                                                                
         atRow: i
                                                                                
        column: 0];
                }
                else
                {
                        [matriceStatus putCell:
                                [[[NSCell alloc] initImageCell: ledVerte] 
autorelease]
                                                                                
         atRow: i
                                                                                
        column: 0];
                }
                [matriceDivers addRow];
                tx = ([theSysteme revenus100]*100)/[rapport revenus100Total];
                [matriceDivers putCell:
                        [[[NSCell alloc] initTextCell:
                                [NSString stringWithFormat: @"%i %%",tx]] 
autorelease]
                                                                                
 atRow: i
                                                                                
column: 0];
                [matriceSysteme addRow];
                [matriceSysteme putCell:
                        [[[NSCell alloc] initTextCell: @"Revenus :"] 
autorelease]
                                                                                
        atRow: i
                                                                                
 column: 0];
                [matriceSysteme putCell:
                        [[[NSCell alloc] initTextCell: [theSysteme revenus2]] 
autorelease]
                                                                                
        atRow: i
                                                                                
 column: 1];
                
                i++;
        }
----------------------

This code create the cells for one row, and in the same manner I create cells for others rows if the user prefs ask for them. You can see the result on Mac OS X here : http://benoit.astruc.free.fr/weymery/WRP/WRPsys0.4.7.png

But on GNUstep all the NSCell are created but all on the bottom of the NSMatrix and only the first created appears ??? What can I do ?


Well enough of my problems for this mail, one thing which hurt GNUstep is the lack of applications. One way to have more apps would be to port a lot of them from Mac OS X to GNUstep, so I think it would be a good idea to make it easy for Mac OS X developers to port their apps.

Benoit Astruc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]