View Single Post
Old 09 August 2020, 23:10   #1
Warty
Registered User

 
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 95
ClassAct/Reaction & Eclipse/GCC Cross Chain

Background:
- I haven't programmed BOOPSI, ClassAct, or Reaction previously (No taglist experience). I have worked with the KS 1.3 style "busy work yourself to death" widgets.
- I just got Bebbo's awesome GCC cross chain working this week; previously was using VBCC; have no experience using Lattice C on Amiga.

Goal:
- Getting ready for AmigaOS 3.2 dev by getting up to speed on BOOPSI > Reaction widgets/layout.

Challenge:
- Do not have 3.2 or 3.9, so don't have an SDK/WB combo that has reaction-style widgets

Workaround #1:
- Found a post here indicating that GCC includes can be tweaked to us CA instead of RA, and then in combination with ClassAct 3 which is on Aminet, can program against it. Made copies where relevant, so I didn't mangle my reaction headers, and that seemed pretty straightforward. Found a few places where it was still CA_ anyway


BUT....

Problem #1: Eclipse doesn't seem to like the macros for list building, which only include a starting (, not the close (which gets supplied later by a different macro). Well, I'm not sure if that's what it is objecting to, but that's what the warning involves.

Example code:

objects[OID_MAIN] = IIntuition->NewObject(WindowClass, NULL,
/* objects[OID_MAIN] = WindowObject, */
WA_ScreenTitle, "ClassAct",
WA_Title, "ClassAct Window Example",
WA_Activate, TRUE,
WA_DepthGadget, TRUE,
WA_DragBar, TRUE,
WA_CloseGadget, TRUE,
WA_SizeGadget, TRUE,
WA_Width, 200,
WA_Height, 150,
WINDOW_IconifyGadget, TRUE,
WINDOW_IconTitle, "Example",
WINDOW_AppPort, AppPort,
WINDOW_Position, WPOS_CENTERMOUSE,
WINDOW_ParentGroup, VLayoutObject,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_DeferLayout, TRUE,
EndGroup,
EndWindow;


Eclipse gives a warning of "Missing ')' in parameter list of macro: NewObject"

On compile, I get an error like this:
../src/classact_test1.c:176:0: error: unterminated argument list invoking macro "NewObject"

I checked the macros, and as far as I can tell, it does seem like they are visible, and getting resolved at the preprocessor step. For example, NewObject is that rather long thing; and EndWindow eventually resolves to 0.

---
#define NewObjectA(___classPtr, ___classID, ___tagList) \
LP3(0x27c, APTR, NewObjectA , struct IClass *, ___classPtr, a0, CONST_STRPTR, ___classID, a1, const struct TagItem *, ___tagList, a2,\
, INTUITION_BASE_NAME)

---
#define End TAG_END)
---
#define TAG_END (0L) /* synonym for TAG_DONE */
---


there's another challenge I need help with, with the hook, but I'll save that for another post.
Warty is offline  
 
Page generated in 0.06391 seconds with 11 queries