[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KSpread DCOP question & crash in 1.3beta1
From:       "Pascal A. Niklaus" <Pascal.Niklaus () unibas ! ch>
Date:       2003-04-22 10:12:03
[Download RAW message or body]

Thanks for your answer. It would be nice if you could give me a brief 
overview of the hierarchy of DCOP objects browsable in KSpread. For 
example, how do you know which docs are open, their names, and the names 
of their individual sheets?

In your example, you access 0x8176220... how'd you know what that one is?

BTW: KSpread 1.3beta1 still crashes when I call QString text() for the 
first of this 0xYYYYYYY objects. Here's the backtrace, btw:

[New Thread 16384 (LWP 26686)]
0x40eb8cf7 in waitpid () from /lib/libpthread.so.0
#0  0x40eb8cf7 in waitpid () from /lib/libpthread.so.0
#1  0x4061f315 in KCrash::defaultCrashHandler(int) ()
   from /usr/local/kde/lib/libkdecore.so.4
#2  0x40eb7895 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x41a13370 in KSpreadCluster::lookup(int, int) const ()
   from /usr/local/kde/lib/kde3/libkspreadpart.so
#5  0x4196c39c in KSpreadSheet::cellAt(int, int, bool) ()
   from /usr/local/kde/lib/kde3/libkspreadpart.so
#6  0x41a0b02e in KSpreadCellIface::text() const ()
   from /usr/local/kde/lib/kde3/libkspreadpart.so
#7  0x41a4bd7d in KSpreadCellIface::process(QCString const&, 
QMemArray<char> const&, QCString&, QMemArray<char>&) ()
   from /usr/local/kde/lib/kde3/libkspreadpart.so
#8  0x406cdbd1 in DCOPClient::receive(QCString const&, QCString const&, 
QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) ()
   from /usr/local/kde/lib/libDCOP.so.4
#9  0x406c7217 in DCOPProcessInternal(DCOPClientPrivate*, int, unsigned 
long, QMemArray<char> const&, bool) () from /usr/local/kde/lib/libDCOP.so.4
#10 0x406c6a4d in DCOPProcessMessage(_IceConn*, void*, int, unsigned 
long, int, IceReplyWaitInfo*, int*) () from /usr/local/kde/lib/libDCOP.so.4
#11 0x406d6ad7 in KDE_IceProcessMessages ()
   from /usr/local/kde/lib/libDCOP.so.4
#12 0x406cea6e in DCOPClient::processSocketData(int) ()
   from /usr/local/kde/lib/libDCOP.so.4
#13 0x406cfd20 in DCOPClient::qt_invoke(int, QUObject*) ()
   from /usr/local/kde/lib/libDCOP.so.4
#14 0x4098f253 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#15 0x4098f326 in QObject::activate_signal(int, int) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#16 0x40c5ea68 in QSocketNotifier::activated(int) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#17 0x409aa24d in QSocketNotifier::event(QEvent*) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#18 0x40930b56 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#19 0x4093030f in QApplication::notify(QObject*, QEvent*) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#20 0x405a39d2 in KApplication::notify(QObject*, QEvent*) ()
   from /usr/local/kde/lib/libkdecore.so.4
#21 0x4090ab8e in QEventLoop::activateSocketNotifiers() ()
   from /usr/local/qt/lib/libqt-mt.so.3
#22 0x408e96e4 in QEventLoop::processEvents(unsigned) ()
   from /usr/local/qt/lib/libqt-mt.so.3
#23 0x409442ab in QEventLoop::enterLoop() ()
   from /usr/local/qt/lib/libqt-mt.so.3
#24 0x40944194 in QEventLoop::exec() () from /usr/local/qt/lib/libqt-mt.so.3
#25 0x40930e10 in QApplication::exec() () from 
/usr/local/qt/lib/libqt-mt.so.3
#26 0x406e604f in main () from /usr/local/kde/lib/kspread.so
#27 0x0804cb7a in launch(int, char const*, char const*, char const*, 
int, char const*, bool, char const*, bool, char const*) ()
#28 0x0804d74e in handle_launcher_request(int) ()
#29 0x0804dc10 in handle_requests(int) ()
#30 0x0804e8cb in main ()
#31 0x4100e8ae in __libc_start_main () from /lib/libc.so.6

Pascal

Holger Schröder wrote:

>Hi,
>
>you already get the idea:
>in kspread we don´t provide a special layer for accessing stuff from outside 
>of kspread, but we make the methods callable from outside, so you have to 
>collect the information the way you described.
>
>to get access to a cell, you have to do the following:
>
>have a kspread open, then enter this on the command line:
>
>sh-2.05b$ dcop
>...
>kspread-2669
>...
>sh-2.05b$ dcop kspread-2669
>qt
>0x8176220
>Application
>Document-0
>Document/Map/unnamed
>KoApplicationIface (default)
>MainApplication-Interface
>View-0
>kspread-mainwindow#1
>ksycoca
>sh-2.05b$ dcop kspread-2669 0x8176220
>
>[a lot of functions will be listed]
>
>sh-2.05b$ dcop kspread-2669 0x8176220 text
>call failed
>sh-2.05b$
>
>ahem, for koffice 1.2.1 it always crashes on me, but i don´t have 1.3_beta1 at 
>hand, but i guess it will works there...
>(bugreport already written.)
>
>i am quite confident that, even if kspread-1.3_beta1 would have that bug, it 
>will be fixed quite soon.
>
>Holger
>
>On Monday 21 April 2003 16:48, Pascal.Niklaus@unibas.ch wrote:
>  
>
>>Hi,
>>
>>I'd like to port an application I've originally written for Windows to KDE.
>>It uses DDE to read and manipulate Excel spreadsheet cells.
>>
>>What I need to do is:
>>
>>- get a list of all open KSpread documents/sheet names
>>- read the current selection (range of cells)
>>- read and write specific cells
>>- create a new document or sheet in an existing document
>>
>>I had a browse with dcop but wasn't sure what the best way to achieve my
>>task was.
>>
>>Get all KSpread-<PID> and call KoApplicationIFace/getDocuments(), then call
>>url() for all docs? Or is there an easier way? How do I get to the
>>individual sheets and read/write to them?
>>
>>Thanks for your help
>>
>>Pascal
>>    
>>

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic