gl8f@bessel.acc.Virginia.EDU (Greg Lindahl) (09/23/88)
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
wayrynd@jacobs.CS.ORST.EDU (darin wayrynen) (09/23/88)
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;
kclenden@silver.bacs.indiana.edu (Kevin Clendenien) (12/11/89)
I'm uploading this for a friend. I'll relay any replies to him. Thanks. Conf : Atari ST Programming Msg# : 272 Lines: 13 Read: 7 Sent : Dec 8, 1989 at 8:20 PM To : ALL From : LEN LOGTERMAN Subj : rsrc_gaddr() I need a little help with the use of the function rsrc_gaddr(). As I understand it, I should be able to use it to get the address of various objects in a tree. Say I have a tree, ATREE, which has an editable text field in it called MYTEXT. Here is what I normally to do to get the address of the text field: OBJECT *atree; rsrc_gaddr(0, ATREE, &atree); text_ptr = ((TEDINFO *)atree[MYTEXT].ob_spec->te_ptext; I should be able to get text_ptr with a call to rsrc_gaddr. What are the arguments that I should use? -------------------------------------------------------------------------- kclenden@silver.bacs.indiana.edu Kevin Clendenien BLoomington Atari ST users group BLAST, President BLAST BBS - (812) 332-0573 FNET node #141 "Of course any opinions or views stated above do not necessarily represent the official position of any person, or organization other that of Kevin Clendenien." --------------------------------------------------------------------------