nopuklic@ndsuvax.UUCP (Blayne Puklich) (06/15/88)
One more posting today before I go home. I have what I think may be a problem with the MPW C glue for the Toolbox routine SetItemCmd (IM vol V). What I see happen is when I pass it a short having the value $1B to tack on a hierarchical menu (for the third parameter, a Pascal character), the glue pushes a byte onto the stack, which is the $1B. When SetItemCmd comes to MOVE.B the character into place, it grabs the byte just after the $1B. This happens no matter how I declare the short. I have even tried to use a char, *char, *short, almost anything logical I could think of. What the heck am I missing? According to what I found in the MPW C manual I'm supposed to use a short in place of Pascal characters, and I tried that. But I shouldn't have to worry about it when the glue should be taking care of it for me. The MPW C header for the routine (in Menus.h) shows that it should be a char. I've tried to use a char, it doesn't work. This is pretty frustrating because there is nothing I can do short of DelMenuItem and InsMenuItem, redoing the whole menu item. I should be able to get by with just stuffing that byte into the MenuInfo record using SetItemCmd, but it just doesn't work. Matter of fact, when I use GetItemCmd to see if the state the user left the menu in had hierarchical menus, I have to play with some address arithmetic. What am I supposed to use for a type with these routines? char doesn't work, neither does short, nor does a pointer to any of these types. Show me what I'm missing so I can feel like an idiot for a few days... Thanks! ||+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|| || Blayne Puklich ndsuvax!nopuklic || || NDSU Student ACM use this-> NU087763@NDSUVM1.bitnet || || Chairperson North Dakota State University, Fargo, ND || || || || "Everyone should have a Corvette, I think." || ||-------------------------------------------------------------------------||