English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 08 September 2014, 21:17   #1
mritter0
Registered User
 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 52
Posts: 204
Request 2

OS3.9 requester.class

I open a string requester with a chooser gadget with 2 options:
Code:
	
        if (!(Requester=NewObject(RequesterClass,NULL,
		REQ_TitleText,					Title,
		REQ_Type,						2,
		REQ_BodyText,					VABuffer,
		REQ_GadgetText,					Gadgets,
		REQS_Buffer,					StrBuffer,
		REQS_MaxChars,					MaxChars,
		REQS_ChooserArray,				ChooserArray,
		REQS_ChooserActive,				ChooserActive,
	TAG_END)))
		return(-99);
	Result=DoMethod(Requester,RM_OPENREQ,NULL,Window,NULL);
	DisposeObject(Requester);
I can't find out what the choice is for the chooser gadget. My variable ChooserActive never changes. Is this a bug?
mritter0 is offline  
Old 08 September 2014, 23:31   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,000
By specifying REQS_ChooserActive on the NewObject call, you set the current active entry.

In order to get the current entry, you have to call GetAttr(REQS_ChooserActive,Requester,&ChooserActive) after DoMethod returns.

BTW, the question if it is a bug is silly. Think about it. This is C, not C++. C uses value parameters everywhere. If you give a variable to a subroutine, the subroutine only ever gets its value, it can never change the contents of the variable. If the subroutine shall be able to change the contents, the parameter has to be a pointer to the variable, not the variable itself.
thomas is online now  
Old 09 September 2014, 01:57   #3
mritter0
Registered User
 
Join Date: Sep 2013
Location: Bettendorf, IA, USA
Age: 52
Posts: 204
Point well taken.

I couldn't find any example using the GetAttr() call.

Thank you again!
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
a request kkgarbod request.UAE Wishlist 2 03 June 2011 16:37
My request please ;) Kitty request.Old Rare Games 10 06 November 2009 17:28
request!!! DMKnights request.Old Rare Games 2 08 March 2006 06:20
Request nnever2000 project.SPS (was CAPS) 6 21 January 2004 12:40

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 08:37.

Top

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