Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!CS.WM.EDU!csrobe From: csrobe@CS.WM.EDU (Chip Roberson) Newsgroups: comp.sys.atari.st Subject: Argh! MWC Resource & TEDINFO Message-ID: <8909140457.AA22627@cs.wm.edu> Date: 14 Sep 89 04:57:44 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 66 I am trying to create a simple form with editable strings, such as: Name: ______________________ using MWC's Resource construction set. I was able to create the complete form and even test it using Resource. The cursor moved from field to field just as it should and it even let me type in dummy text. However, when I compiled the program, form_do() wouldn't let me type in a single character. So I go back and forth between my code and Resource and I can't figure out why. The template looks correct: "Name: XXXXXXXXXXXXXXXXXXXX" and the text is blank ("": I don't want anything in there that I have to erase before I type in my input. I want a virgin field!). No go! form_do() only lets me type in as much text as is in the te_ptext field. (This makes since form_do() seems to use the same place to store the new input.) Ok, so I see the following in the MWC lexicon pp. 357-8: "te_ptext points to a string to be displayed within the object. The text typed by the user will be written over this string. [The first time I read this I thought "written" meant "on the screen" not "in memory". -csr] If you do not want text to be displayed, replace it with a string of `@' characters as long as the maximum length of the string of input." Seems reasonable, just get back into Resource and put 20 @'s in the text field of NAME. But NO! Resource won't let me enter @'s into the text field. Ok, I'll do it the long way. I'll decompile the .rsc using Resdecom edit it manually and then compile it back using Rescomp. I go to recompile my source and it bombs out saying it doesn't know the name of my EXIT Button. What!?! So I look at the .h file and the last 6 or 7 objects in the form have all had their C Names changed to things like BTN_027C! Whydju do that? I didn't tell you to do that! Ok, back to Resource to put my names back in. I check on the object with the @-signs in it, but I don't see them. I go down to the text field and try typing a few characters in frustration. Hey wait a minute! The @'s are there. I can see them as I type, Resource just doesn't want to show them to me. Can I type '@'s in now? NO! Ok, so I cancel and get out and compile the damn thing. Well, the underscores are still there indicating that nothing is in the field. I try typing. It takes the text. Oh Boy, no what!?! The underscores and the characters of the text merge into a new character set. The underscores aren't going away as I over them! So what the farce am I to do now? I'm tired. I'm frustrated. And I'm not in a very good mood. Now I know this can be done because I have some resource files that do exactly what I'm trying to do. I even put one into Resource and their object looks identical to mine! How do I get around this stupid problem? How do I give the object the storage for the string and still get an empty field? Why isn't this straight-forward? Please somebody give me a simple answer that will fix this prolem. Thanks for listening. -c | Chip Roberson ARPANET: csrobe@cs.wm.edu | | VA Remote Sensing Study | | Dept of Comp. Sci. csrobe@icase.edu | | College of William and Mary | | Williamsburg, VA 23185 UUCP: ...!uunet!cs.wm.edu!csrobe |