Re: Question Re: WorkbookControlGUI object.



On Mon, Sep 06, 2004 at 04:54:41PM +0900, Nakai wrote:

I think you'll get better answer from others, but I write mine from Japanese
standard 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.

While that is true I would not advocate doing that for two reasons.

1) There is no guarantee that there is > 0 views and controls
2) In the future there will be other types of control (eg corba)

the WORKBOOK_FOREACH_{VIEW,CONTROL} macros are the safe way to walk
those data structures.  In the future we'll need to consider how to
associate a wbc with the execution of a python routine.



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