Re: Question Re: WorkbookControlGUI object.



Thanks for the help, fellows.

Jon:
Where is gtk.MessageDialog defined?  I am writing in 'analysis-tools.c', I tried '#include 
<gtk/gtkmessagedialog.h>', aswell as <gui-util.h>, but still make claims gtk, messagedialog and such are 
undeclared.


Nakai:
I tried - 
        Workbook *wb = val->v_range.cell.a.sheet->workbook;
        WorkbookView *wbv = g_ptr_array_index (wb->wb_views, 0);
        WorkbookControlGUI *wbcg = (WorkbookControlGUI) g_ptr_array_index (wbv->wb_controls, 0);

to get the WorkbookGUI object, but I get make claiming I am 'dereferencing pointer to incomplete type', and 
'conversion to non-scalar type requested' for the two lines respectivly.


Am I doing something stupid?


Thanks again,
Don Permezel
djper1 student monash edu au



----- Original Message -----
From: hellan acm org (Jon Kåre Hellan)
Date: Monday, September 6, 2004 5:35 pm
Subject: Re: Question Re: WorkbookControlGUI object.


G'day All,

I'm working with Dr. Twardy on a 'tool' for Gnumeric to implement 
the MML clustering algorthym Vanilla Snob.

In this tool, if inappropriate data is entered I wish to be able 
to pop up a message instructing the user what is wrong and why, 
though the use of the function - 'gnumeric_notice (wbcg, 
GTK_MESSAGE_INFO, msg)'


The problem I have is - while I have the current workbook object 
(thanks to help from Andreas Guelzow), I dont have the 
'WorkbookControlGUI' object for the current workbook which 
'gnumeric_notice' requires.


Can anyone point me in the right direction as to how I get it? Or 
am I coming at things from completly the wrong angle?

You're right. We really should have a method Workbook.get_gui(). Can
you bugzilla this?

But once you got the wbcg, you would notice that gnumeric_notice isn't
wrapped from Python, either. I don't think we're going to wrap
it at all. Just use.

gtk.MessageDialog(parent=None, 
                 flags=gtk.DIALOG_MODAL,
                 buttons=gtk.BUTTONS_CLOSE, 
                 message_format="Put your message here")

You can do this right now.  If Workbook.get_gui() had been 
implemented,you would change parent to 
"workbook.get_gui().get_window()". That
would make the dialog stay on top of Gnumeric and be iconized and
deiconized with it. Nice, but not terribly important.

Hope this helps

Jon Kåre



----- Original Message -----
From: Nakai <ynakai redhat com>
Date: Monday, September 6, 2004 5:54 pm
Subject: Re: Question Re: WorkbookControlGUI object.


I think you'll get better answer from others, but I write mine from 
Japanesestandard time zone. :)

Workbook has GPtrArray* wb_views member, it's a WorkbookView array.
In session.c,  it gets pointer at index 0:
 wb_view = g_ptr_array_index (wb->wb_views, 0);
WorkbookView has GPtrArray* wb_controls member, it's a 
WorkBookControl array.
And you can cast WorkBookControl to WorkBookControlGUI.

That's what I know.

--
Nakai

On Mon, 06 Sep 2004 15:57:23 +1000
Donald Permezel <djper1 student monash edu> wrote:

G'day All,

I'm working with Dr. Twardy on a 'tool' for Gnumeric to implement 
the MML clustering algorthym Vanilla Snob.

In this tool, if inappropriate data is entered I wish to be able 
to pop up a message instructing the user what is wrong and why, 
though the use of the function - 'gnumeric_notice (wbcg, 
GTK_MESSAGE_INFO, msg)'


The problem I have is - while I have the current workbook object 
(thanks to help from  Andreas Guelzow), I dont have the 
'WorkbookControlGUI' object for the current workbook which 
'gnumeric_notice' requires.


Can anyone point me in the right direction as to how I get it?  
Or am I coming at things from completly the wrong angle?


Many Thanks,
Don Permezel
djper1 student monash edu au



_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list
_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list





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