Path: utzoo!attcan!uunet!pyrdc!pyrnj!rutgers!orstcs!jacobs.CS.ORST.EDU!wayrynd
From: wayrynd@jacobs.CS.ORST.EDU (darin wayrynen)
Newsgroups: comp.sys.atari.st
Subject: Re: rsrc_gaddr()
Keywords: rsrc_gaddr, AES
Message-ID: <6600@orstcs.CS.ORST.EDU>
Date: 23 Sep 88 12:11:49 GMT
References: <577@hudson.acc.virginia.edu>
Sender: netnews@orstcs.CS.ORST.EDU
Reply-To: wayrynd@jacobs.CS.ORST.EDU.UUCP (darin wayrynen)
Organization: Oregon State University - CS - Corvallis Oregon
Lines: 27

In article <577@hudson.acc.virginia.edu> gl8f@bessel.acc.Virginia.EDU (Greg Lindahl) writes:
>I would like to change the contents of a string in a dialogue. I know
>how to find the address of a tree, but not the string. Tree numbers
>are unique, but item numbers are not unique between trees. My
>documentation for rsrc_gaddr() only lists two inputs: the item number
>and the type:
>
>	rsrc_gaddr( 0, TREE01, &adrs );	/* works as advertised */
>	rsrc_gaddr( 7, MYITEM, &adrs );	/* cannot be done?! */
>
>Can some expert explain the proper way to do this?
>
>Greg Lindahl                              internet:  gl8f@virginia.edu
>U Va Dept. of Astronomy                   bitnet:    gl8f@virginia.bitnet


To find the address of the string, you have to first find the address of the
dialog (I'll pretend you named it DIALOG in the resource construction set),
by using the call:
                     rsrc_gaddr(R_TREE,DIALOG,&dialog);
R_TREE is 0 like you have, and dialog is an OBJECT pointer.
 
If you wanted to assign the address of the string with name MYITEM to the
character pointer named 'string', you could do so with the follwing assignment

                     string = dialog[MYITEM].ob_spec;