English Amiga Board


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

 
 
Thread Tools
Old Today, 05:58   #1
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,448
Events not Emitted/Propagated in ReAction Virtual Group

Hi there!

I'm writing this GUI using ReAction and I'm facing a surprising (to me!) problem. When I "insert" a VirtualGroup, events on the gadgets in the virtual groups are not emitted/propagated and, thus, not received by the main loop.

Here is a piece of my code in which, if I comment out the lines marked VIRTUAL, my code works fine, events are emitted/propagated...
If I uncomment these lines, no event (mouse clicks) is received by my main loop

Code:
PAGE_Add, NewObject(
	LAYOUT_GetClass(),  NULL,
	GA_TabCycle,        TRUE,
	LAYOUT_Orientation, LAYOUT_VERTICAL,
	LAYOUT_SpaceOuter,  TRUE,
	LAYOUT_AddChild, NewObject(
		VIRTUAL_GetClass(), NULL,      // VIRTUAL
		VIRTUALA_Scroller,  TRUE,      // VIRTUAL
		VIRTUALA_Contents,  NewObject( // VIRTUAL
		LAYOUT_GetClass(),  NULL,
		LAYOUT_Orientation, LAYOUT_VERTICAL,
		LAYOUT_AddChild, NewObject(
			LAYOUT_GetClass(),  NULL,
			LAYOUT_Orientation, LAYOUT_VERTICAL,
			LAYOUT_SpaceOuter,  TRUE,
			LAYOUT_BevelStyle,  GroupFrame,
			LAYOUT_AddChild,    (*ui_object)->CKB_prefs_save_prefs_on_exit = NewObject(
			...
			LAYOUT_AddChild,    (*ui_object)->CKB_prefs_should_skip_if_all_rating_low = NewObject(
				CHECKBOX_GetClass(), NULL,
				GA_ID,               PREFS_SKIP_MODULES_WHEN_ALREADY_RATED_TOO_LOW,
				GA_RelVerify,        TRUE,
				GA_Text,             GetString( MSG_MUI_SKIPMODULESWHENALREADYRATEDTOOLOW ),
				CHECKBOX_TextPlace,  PLACETEXT_RIGHT,
				CHECKBOX_Checked,    prefs_should_skip_if_all_rating_low(),
				TAG_END),
				TAG_END),
				...
			TAG_END),
		TAG_END),
		TAG_END), // VIRTUAL
What am I missing or doing wrong?
Tygre
tygre is offline  
Old Today, 06:42   #2
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,697
Does every event get ignored or just the first one?
Minuous is offline  
Old Today, 07:59   #3
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,065
I dont know C.
But what is this?
MSG_MUI_SKIPMODULESWHENALREADYRATEDTOOLOW
ReAction or MUI ?
Don_Adan is offline  
Old Today, 08:05   #4
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,363
Isn't that the point of virtual objects, namely that they "do not really exist" and are just placeholders for arranging screen estate? I'm not quite clear what you expect here, i.e. by creating virtual objects.
Thomas Richter is online now  
Old Today, 09:50   #5
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,697
Presumably he wants more gadgets than will fit in the window; virtual.gadget lets you create such layouts with attached scrollers so that the entire layout can be viewed on a small screen.

The likely cause of the issue is that GA_RelVerify, TRUE needs to be set for the virtual.gadget itself.

There is also a minor bug in the current OS release whereby the first click is ignored; this has been fixed for the next release.

Last edited by Minuous; Today at 09:59.
Minuous is offline  
Old Today, 13:16   #6
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,448
Hi all!

Thanks for your quick replies! Here are few answers:

- @Minuous, no events are received by my main loop: I can click the buttons in the virtual object several times, but I didn't receive anything.

- @Don, the MSG_MUI_... is a constant for localisation, which I reuse from the MUI GUI.

- @Thomas, exactly: I expected to receive the events from the buttons in the virtual object as if they were in the parent layout. (Like in MUI)

- @Minuous, you're right , I just added GA_RelVerify to the virtual object, and I receive the events now! Thanks a lot!

Cheers!
Tygre
tygre 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
ReAction RequestScreenMode jabbadude Coders. System 3 14 July 2024 13:28
Norwich Amiga Group - News & Events Graham Humphrey News 22 04 March 2024 00:03
installing Classact and Reaction on 3.1.4 dschallock support.Other 8 06 February 2020 19:19
Proper ReAction coding mritter0 Coders. C/C++ 3 24 April 2014 07:34
amiga podcast group's skypecast (virtual talk-back radio) tom_a_sparks News 0 28 May 2006 04:15

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 15:19.

Top

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