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

RE: double linked glists




here goes:

GList *Key_SSN_List;   <-- a global

void goto_next_record(GtkNotebook *data)
{
  gint page = -1;
 
  page = gtk_notebook_get_current_page(GTK_NOTEBOOK(data)):
  if (page == SSN_BARRED_PG)
    {
       Key_SSN_List = g_list_next(Key_SSN_List);
       if (Key_SSN_List == NULL)
         printf("No more records in that direction\n");
       else
         show_record((int)(Key_SSN_List->data));
    }
}

the goto_prev() function is exactly the same except it uses the
g_list_previous() call.  




-----Original Message-----
From: Havoc Pennington [mailto:rhp@zirx.pair.com]
Sent: Monday, June 07, 1999 3:30 PM
To: 'gtk-app-devel-list@redhat.com'
Subject: Re: double linked glists



On Mon, 7 Jun 1999, BIRCH, JANET M wrote:
> 
>   is the correct behavior of these lists to stop traversing when they
reach
> their limit ?
>  I mean if I'm going forward through my list and I reach my last entry, I
> should then be able to 
> prev back to the front, right ?    well, mine aren't doing that.  they
stop
> going any direction.  
> 
> am I doing something wrong, or I am I just expecting a behavior that isn't
> there ?
> 

Can you post your code? (The relevant part anyway.) 

Havoc


-- 
         To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

	Mailing list concerns should be mailed to <listmaster@redhat.com>



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