home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11828 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  2.4 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!gatech!concert!rutgers!ub!niktow!chugh
  2. From: chugh@niktow.canisius.edu (Kevin Chugh)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: tvision question
  5. Summary: answers... i think
  6. Message-ID: <1939@niktow.canisius.edu>
  7. Date: 6 Jan 93 16:00:28 GMT
  8. References: <2B48F420.8547@ics.uci.edu>
  9. Organization: Canisius College, Buffalo NY. 14208
  10. Lines: 54
  11.  
  12. In article <2B48F420.8547@ics.uci.edu>, shi@ics.uci.edu (Edmond C. Shi) writes:
  13. > ...just started to work with turbovision about a month ago
  14. >    and ran into some questions i was hoping somebody could help
  15. >    out on.
  16. >      1)  when i run the tvision demo programs and access the
  17. >          help menu, i get an "assertion" error after closing
  18. >          the window.  it seems like the program is deleting
  19. >          an object when it shouldn't -- specifically, it seems
  20. >          to be occurring when deleting the help topic object?
  21. >          any body have an idea how i might resolve this problem
  22. >          since i am using some of it for my own code.
  23. >      2)  using the scrolling bar, is there a way i can modify it
  24. >          so that the window scrolls when the cursor is on the
  25. >          bottom line rather than the top line?
  26. > thanks,
  27. >      ed
  28.  
  29. the first problem is a known memory leak in tvision versions below 1.03-
  30. i believe borlandc has a patch for it- i may have it- if you have bc 3.1
  31. the problem should be fixed- if you want the patch, i can try to mail it
  32. to you directly- send me mail- 
  33.  
  34. for the second problem- i'm going to give a crack at answering- i know that
  35. conceptually i am right because this is what you do for all tv modifications-
  36. the specifics i'm pretty sure of -
  37.  
  38. what you want to do is create a class tMyScrollbar(or whatever) public 
  39. tScrollBar;
  40.  
  41. then override it's event handler (i'll give you pseudocode because i don't
  42. know the specifics of scrollbar)
  43.  
  44. tMyScrollBar::handleEvent(TEvent& event)
  45. {
  46. if position==1 and event.message.keydown==thedownarrowkey then scroll down 1;
  47. //consult tkeys.h in /tvision/include for the down arrow key, also, check
  48. out /tvision/source/tscrolle.cpp - this will give you the event handler 
  49. and the functions which actually do the scrolling, and the function which
  50. gives you the position
  51.  
  52. if you're unfamiliar with the event handler let me know and i'll give a 
  53. more detailed explanation- 
  54.  
  55. this should be enough to get you started- if not, let me know-  
  56. C
  57. hope this helps.
  58.  
  59.  
  60. kevin
  61. A
  62. C
  63. then override it's event handl
  64.