manfred@kms1.kbs2.isei.jrc.it (manfred kohl) (09/14/90)
How can we pass a String array (char **) to value-clicklistV inset We tried calling value_SetStrArrayAndSize(<insetname>, <a marker> <int> but Ness compiler complains with: "argument 2 should have type unknown but is type marker". What to do? We compiled Andrew from the X11.4 distribution tape patch level ?. Manfred Kohl JRC of the EC
wjh+@ANDREW.CMU.EDU (Fred Hansen) (09/18/90)
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 <arbiterv.ih> #include <celv.ih> #include <cel.ih> + #include <value.h> /* for value_NEWVALUE */ #include <value.ih> #include <valuev.ih> #include <atom.ih> *************** *** 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.]