Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
133 user(s) are online (102 user(s) are browsing Forums)

Members: 1
Guests: 132

orgin, more...

Headlines

 
  Register To Post  

String gadget
Home away from home
Home away from home


See User information
I'm trying to set a string gadget for user to type into. But when i try to compile it gives me an error. I have the same code in another project and works there. Has it something to do with the fact that i'm using gmake and the other i use make? Setting up the gadget is no porblem.
Here's the checking code and error message.

case GID_MAXNED:
snprintf(test,1024, "%s", ((struct StringInfo *)(gadgets[GID_MAXNED]->SpecialInfo))->Buffer);
printf("test=%s\n",test);
break;

error: request for member 'SpecialInfo' in '* gadgets[9]', which is of non-class type 'long unsigned int'


Any help here would be VERY helpfull for me.

X5000
Go to top
Re: String gadget
Just can't stay away
Just can't stay away


See User information
@Antique

Quote:
snprintf(test,1024, "%s", ((struct StringInfo *)(gadgets[GID_MAXNED]->SpecialInfo))->Buffer);

Use GetAttrs(gadgets[GID_MAXNED], STRINGA_TextVal,text,TAG_DONE); instead.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: String gadget
Not too shy to talk
Not too shy to talk


See User information
@Antique

Either you didn't #include <proto/intuition.h> or "gadgets" is not declared as struct Gadget ** or struct Gadget *[].

Also depending on what kind of gadget it is you should either use GadAttrs or GT_GetGadgetAttrs. Your method is only allowed if you use Kick 1.3 coding style, i.e. set up the struct Gadget yourself. In all other cases you should use the corresponding functions.

Bye,
Thomas

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project