English Amiga Board


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

 
 
Thread Tools
Old 16 May 2014, 02:52   #1
mritter0
Registered User
 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 52
Posts: 204
Wait()

I am writing a ReAction based program. All is going good. But now I want to listen for IDCMP_DISKINSERTED and IDCMP_DISKREMOVED. The ReAction method of Wait() doesn't listen for them, only WMHI_ class tags.

How do I listen for the "other" IDCMP flags and the ReAction WMHI flags with one loop?

Code:
	GetAttr(WINDOW_SigMask,MainWindowObject,&SignalsMask);

	while(!done)
	{
		Signals=Wait(SignalsMask);

		if (Signals & SignalsMask)
		{
			while((Result=RA_HandleInput((Object *)MainWindowObject,&Code)) != WMHI_LASTMSG)
			{
				switch(Result & WMHI_CLASSMASK)
				{
					case WMHI_GADGETUP:
						switch(Result & WMHI_GADGETMASK)
						{
	                        case GAD_PATH:
		                        break;

					        case GAD_SIDEPANEL:
						        break;

		                    case GAD_LISTBROWSER:
			                    break;
						}
						break;

					case WMHI_CLOSEWINDOW:
						done=TRUE;
						break;
				}
			}
		}
	}
I have
Code:
WA_IDCMP,				IDCMP_DISKINSERTED | IDCMP_DISKREMOVED,
specified in my WindowObject.

I can get it to "respond" when hit window close gadget. Too late then.
mritter0 is offline  
Old 17 May 2014, 18:59   #2
mritter0
Registered User
 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 52
Posts: 204
Thomas, thanks for the email. But your site is down so I can't access them.
mritter0 is offline  
Old 17 May 2014, 19:14   #3
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,022
It's up and it has never been down. Must be your ISP.

Anyway here are the files:
Attached Files
File Type: lha buttons.lha (18.4 KB, 225 views)
File Type: c disklist.c (7.5 KB, 222 views)

Last edited by thomas; 17 May 2014 at 19:19.
thomas 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
ASM: Wait for Vertical Blank Asman Coders. Tutorials 75 01 October 2019 12:11
Removing the IDE Wait on Kickstart 3.1 Zetr0 support.Hardware 26 16 June 2010 08:31
timed wait using CIAs jotd support.Other 3 23 March 2008 14:55
HD won't boot now..wait failed returncode? Amigan25 project.ClassicWB 2 08 June 2007 18:21
Wait a sec - what about Macs? Computolio Amiga scene 10 02 June 2004 07:23

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 01:36.

Top

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