Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!ANDREW.CMU.EDU!wjh+ From: wjh+@ANDREW.CMU.EDU (Fred Hansen) Newsgroups: comp.soft-sys.andrew Subject: Re: Problems Ness calling value Message-ID: Date: 18 Sep 90 14:34:04 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 50 Excerpts from internet.info-andrew: 14-Sep-90 Problems Ness calling value manfred kohl@kms1.kbs2.i (339) > How can we pass a String array (char **) to value-clicklistV inset. One way to do this is with the ness functions value_SetArraySize and value_SetArrayElt as documented in $ANDREWDIR/doc/atk/ness/nessfunc.doc. But first you have to fix the bug I just discovered. The changes will appear on a forthcoming patch, but not patch 7. Unofficially you just need to add two lines to atk/ness/objects/nevent.c (The line numbers may incorrect because r1.22 is later than patch level 7): diff -c -r1.22 nevent.c *** /tmp/,RCSt1000326 Tue Sep 18 10:15:09 1990 --- nevent.c Tue Sep 18 10:00:59 1990 *************** *** 29,34 **** --- 29,35 ---- #include #include #include + #include /* for value_NEWVALUE */ #include #include #include *************** *** 570,575 **** --- 569,575 ---- XXX never freed */ sar = (unsigned char **)value_GetStringArray(vobj); sar[index] = s; + value_NotifyObservers(vobj, value_NEWVALUE); } break; case 'v': /* value_setnotify(obj, bool) */ /* NSP = unstackBool(NSP, iar, &v); */ To try out the test below, empower the Ness and select DoMain from the Ness menu card. This should make three options appear in the currently empty clicklistV (but only after the repair to nevent.c noted above). A click on an option in the clicklistV will echo in the message line. Fred Hansen [An Andrew ToolKit view (celview) was included here, but could not be displayed.] [An Andrew ToolKit view (nessview) was included here, but could not be displayed.]