English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 19 September 2014, 03:06   #1
mritter0
Registered User
 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 52
Posts: 204
Object width

I decided to update my gadgets from
Code:
struct Gadget *MyGad;
to
Code:
Object *Objects[GAD_MYGAD];
style. All is working fine until I want to get the width of the gadget:
Code:
MyGad->Width
What is the correct way for an object?
mritter0 is offline  
Old 19 September 2014, 19:02   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Have you tried "upcasting" the pointer?

Code:
(struct Gadget *)MyGad->width;
edit

...or maybe it's:

Code:
((struct Gadget *)MyGad)->width;
Samurai_Crow is offline  
Old 19 September 2014, 23:06   #3
mritter0
Registered User
 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 52
Posts: 204
Already tried them both, no luck.
mritter0 is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBrowser column width mritter0 Coders. C/C++ 1 08 August 2017 07:03
Get Gadget Width mritter0 Coders. C/C++ 2 11 June 2014 02:27
Width adjustment stopped working on 1084S-P2. e5frog support.Hardware 3 17 April 2014 23:16
Missing Object Disk.1 Djay project.WHDLoad 15 06 December 2010 00:32
Decent fixed width fonts. killergorilla request.Other 29 02 February 2007 19:16

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:15.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10051 seconds with 13 queries