Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Create From Usage issue

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
luggage Posted - Nov 04 2009 : 10:32:30 AM
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!
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 12 2009 : 7:31:30 PM
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.
luggage Posted - Nov 04 2009 : 10:59:23 AM
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.
luggage Posted - Nov 04 2009 : 10:47:02 AM
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. :(

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000