[TxMt] Question on tm_dialog: NIB as table editor

Hans-Joerg Bibiko bibiko at eva.mpg.de
Wed Feb 13 13:23:02 UTC 2008


On 13 Feb 2008, at 13:53, Charilaos Skiadas wrote:

> On Feb 13, 2008, at 7:32 AM, Hans-Joerg Bibiko wrote:
>
>> On 12 Feb 2008, at 20:12, Chris Thomas wrote:
>>> I don't think there's a way to set the number of columns in an  
>>> NSTableView via bindings. If you can live with a static number of  
>>> columns, the rest is easy. You'll need to rewrite the tab- 
>>> delimited data as entries in an array of dictionaries for the plist:
>>>
>>> {nameOfColumn1 => row1valueForColumn1
>>> ...
>>> Many thanks for the hint. My concern was whether this is possible  
>>> in general ;)
>> Regarding to the static numbers of columns, I could live with it,  
>> but a nib file contains three 'simple' plist files. Maybe it would  
>> be possible to modify these files at runtime. I don't know whether  
>> it works but at least I'll try it ;-O
>
> I would expect that once the NIB is in memory, changing those files  
> won't have a direct effect. However, you can make the change, close  
> the nib and load it again, and thus give the illusion of a variable  
> number of columns (presumably the user would have to ask to add a  
> column via a button or something? Then you can do this work in the  
> callback)
With 'at runtime' I mean that I try to change the nib files BEFORE I  
load it with tm_dialog. The number of columns will be calculated by  
looking into the data file.


>
> Just guessing, but is this for basic data entry for the R bundle?
;) Yes - as matrix/vector/data frame editor. But it could also be  
good for other purposes.
Within the current Rdaemon bundle one can find a solution (marked by  
β) using an HTML form as table editor which works quite good, but for  
large matrices it is too slow.

--Hans




More information about the textmate mailing list