IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Bruce Peaslee on January 26, 2007, 09:42:25 AM

Title: Linked List Issue
Post by: Bruce Peaslee on January 26, 2007, 09:42:25 AM
This works fine:


class MoveItemDialog:CDialog
{

   // Overridden Methods
   declare OnClose(),int;
   declare OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
   declare OnInitDialog(),int;
   // Public Methods
   declare SetSelectedText(string sText);
   // Member Variables
   string m_sSelectedItem;
}
...
MoveItemDialog::OnInitDialog(),int
{
   TREE_ITEM *node;
   TREE_ITEM *item;
   CListBox  *pListBox = GetControl(MD_LST_NODELIST);

   for(node = g_List.GetFirst(); node <> 0; node = g_List.GetNext(node))
   {
      item = g_List.GetData(node);
      pListBox->AddString(item->sText);
   }
   CenterWindow();
   return true;
}

MoveItemDialog::SetSelectedText(string sText)
{
   m_sSelectedItem = sText;
}


But if I try this (to reduce clutter), node = g_List.GetFirst() returns zero:


class MoveItemDialog:CDialog
{
   // Member Variables
   string m_sSelectedItem;
   // Overridden Methods
   declare OnClose(),int;
   declare OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
   declare OnInitDialog(),int;
   // Public Methods
   declare SetSelectedText(string sText) {m_sSelectedItem = sText;}
}
Title: Re: Linked List Issue
Post by: Ionic Wind Support Team on January 26, 2007, 03:17:20 PM
I don't see a correlation myself.  How about the rest of the code?
Title: Re: Linked List Issue
Post by: Bruce Peaslee on January 26, 2007, 04:51:17 PM
It's now almost 1300 lines. I could send it to you if you want.