[RkWard-devel] RKWard 0.2.6 /bug?

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Aug 30 09:16:31 UTC 2004


Hi,

> I just tried the new release and, well, it's beginning to look good!

Thanks!

> I've had a look at the code, and here is what I've understood:
> In rkward.cpp, we've got this when a new dataframe is created:
>
>  RObject *object = RKGlobals::rObjectList ()->createNewChild (name, true,
> true);
>  RKEditor *editor = RKGlobals::editorManager ()->editObject (object);
>  editor->syncToR (0);
>
> a new RKeditor object is created, which tries to open an R Object. This
> RKeditor object tries to get the list of variables names and fails, which
> results in internal variables not being set properly (col_map in
> rkeditordataframe.cpp has size 0 instead of number_of_variables which is I
> supposed to be the length of names(my.data)). It fails because R can't find
> the dataframe hence the error message, and R can't find the dataframe
> because it is not created until editor->syncToR(0).
> problem: you cannot sync before opening the object and cannot open it
> properly before it is synced and created... Am I completely out of my mind,
> or is that right? I am not familiar at all with the code, but I'll try to
> understand better what's happening. Hope this helps, though.

Yes, your analysis is correct. The real solution to the problem will be not to 
create a table with empty columns in the first place, or rather: The table 
should always have two or three trailing empty columns. Those will be 
inactive until you start entering data in them. Then a new object will be 
created for the column, and a new empty trailing column will be added. 
Something like this.
For now, the workaround is to simply create the missing objects for the empty 
columns while setting up the editor. I'm preparing a 0.2.6a-release with a 
quick-and-dirty fix to this (rather annoying) bug right now.

> 2. Small typo in the R-object list "Udpate" =>"Update"

Probably lots more of those around. This one is also fixed in 0.2.6a.

Thanks for the report and for tracking down the problem!

Thomas




More information about the Rkward-devel mailing list