08 September 2014, 21:17 | #1 |
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); |
08 September 2014, 23:31 | #2 |
Registered User
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. |
09 September 2014, 01:57 | #3 |
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! |
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 |
|
|