Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Create From Usage issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

luggage
New Member

3 Posts

Posted - Nov 04 2009 :  10:32:30 AM  Show Profile  Reply with Quote
Hello

Loving the create from usage feature but I can't quite get it to work.

Using 10.5.1738.0 built 2009.10.01

In the header file I have...
#ifndef __TEST_H
#define __TEST_H

typedef struct  
{
     BOOL	plop;
}Test, *pTest;

#endif


In the source file I have...
Test t;

t.newElement = Layout_FindElement();


If I right click newElement and Create From Usage it asks me to create a new member. I click ok but don't get any other options and it whacks it at the bottom of the header file rather than in the structure definition. Like so...


#ifndef __TEST_H
#define __TEST_H

typedef struct  
{
     BOOL	plop;
}Test, *pTest;

#endif

pLayoutItem newElement;


If that could work I'd be the happiest coder!

luggage
New Member

3 Posts

Posted - Nov 04 2009 :  10:47:02 AM  Show Profile  Reply with Quote
Just to add.

If I change my header file so it's like...

#ifndef __TEST_H
#define __TEST_H


typedef struct _test Test, *pTest;

struct _test
{
     BOOL	plop;
};

#endif

It's happy and puts the new element in the right place. Up till now I've favoured the lazier way though. :(
Go to Top of Page

luggage
New Member

3 Posts

Posted - Nov 04 2009 :  10:59:23 AM  Show Profile  Reply with Quote
More info. If the header is...
typedef struct _test
{
     BOOL     plop;

}Test, *pTest;


And the code is...

Test t;

t.newElement = TRUE;

Then that doesn't work but...
_test t;

t.newElement = TRUE;

does.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Nov 12 2009 :  7:31:30 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=2492

VA can have problems when the name of a structure is not given at the "start" of the structure, and only at the end, as you have worked out.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000