NO

Author Topic: Structures and member list  (Read 4272 times)

BlackRose

  • Guest
Structures and member list
« on: August 23, 2005, 11:29:37 AM »
Hello!

I want to ask how to declare and define structures and variables to see allways their members in memberlist when variable is used in several source files.

For example:
Code: [Select]

//file helper.h
struct tag_MyStruct
{
    int Item1;
    int Item2;
};

typedef tag_MyStruct MyStruct

//file helper.c
#include "helper.h"

MyStruct varMyStr;

void Test1(void)
{
    varMyStr. //here it works
}

//file main.h
#include "helper.h"
extern MyStruct varMyStruct

//file main.c
#include "main.h"
void Test2(void)
{
    varMyStr. //here I cannot get proper member list
}



BlackRose

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Structures and member list
« Reply #1 on: August 23, 2005, 07:40:36 PM »
I havn't (yet) tested your example - but generally speaking, with the definition in one file and the usage in one or more other files, you have to build the project for the browse database to be updated.

When editing a source file, I will only try to scan that single file automatically - no #include files.

( Possibly also use 'Update all dependencies' to make sure the #include file is part of the project. )

Pelle
/Pelle

BlackRose

  • Guest
Structures and member list
« Reply #2 on: August 23, 2005, 10:00:23 PM »
I know that project must built. It is done. I define and declare structure then it is successfully built. And after this I try to reference to structure's item and no member list is shown :(

I tried this in IDE v3.00 - should this be a problem or my definition of structure is not OK?

BlackRose

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Structures and member list
« Reply #3 on: August 23, 2005, 10:41:32 PM »
Quote from: "BlackRose"
I know that project must built. It is done.

OK, sorry - not all people seem to be aware of this.

The problem is that it's not working for global variables right now (as reported by Frankie) - I'm working on it...

Pelle
/Pelle

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Structures and member list
« Reply #4 on: August 23, 2005, 11:21:15 PM »
Could you please try the version of pobr.dll attached in the following topic?

http://smorgasbordet.com/phpBB2/viewtopic.php?p=3339#3339

Your example works with it here at least...

Pelle
/Pelle

BlackRose

  • Guest
Structures and member list
« Reply #5 on: August 24, 2005, 06:42:47 AM »
Great, that works as for global structure variable, as for local one.
(I have tested on IDE v4.00 Beta#3).

Thank You very much!

Can I use this dll version also with IDE v3.00?

BlackRose

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Structures and member list
« Reply #6 on: August 24, 2005, 02:34:05 PM »
Very good - thanks!

I have only tested the DLL with v4.00. It will probably work, but because of changes in the IDE for v4.00 beta 3, it will most likely not improve anything (for structures)...

Pelle
/Pelle