home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!gatech!concert!rutgers!ub!niktow!chugh
- From: chugh@niktow.canisius.edu (Kevin Chugh)
- Newsgroups: comp.os.msdos.programmer
- Subject: Re: tvision question
- Summary: answers... i think
- Message-ID: <1939@niktow.canisius.edu>
- Date: 6 Jan 93 16:00:28 GMT
- References: <2B48F420.8547@ics.uci.edu>
- Organization: Canisius College, Buffalo NY. 14208
- Lines: 54
-
- In article <2B48F420.8547@ics.uci.edu>, shi@ics.uci.edu (Edmond C. Shi) writes:
- > ...just started to work with turbovision about a month ago
- > and ran into some questions i was hoping somebody could help
- > out on.
- >
- > 1) when i run the tvision demo programs and access the
- > help menu, i get an "assertion" error after closing
- > the window. it seems like the program is deleting
- > an object when it shouldn't -- specifically, it seems
- > to be occurring when deleting the help topic object?
- > any body have an idea how i might resolve this problem
- > since i am using some of it for my own code.
- > 2) using the scrolling bar, is there a way i can modify it
- > so that the window scrolls when the cursor is on the
- > bottom line rather than the top line?
- >
- > thanks,
- > ed
-
- the first problem is a known memory leak in tvision versions below 1.03-
- i believe borlandc has a patch for it- i may have it- if you have bc 3.1
- the problem should be fixed- if you want the patch, i can try to mail it
- to you directly- send me mail-
-
- for the second problem- i'm going to give a crack at answering- i know that
- conceptually i am right because this is what you do for all tv modifications-
- the specifics i'm pretty sure of -
-
- what you want to do is create a class tMyScrollbar(or whatever) public
- tScrollBar;
-
- then override it's event handler (i'll give you pseudocode because i don't
- know the specifics of scrollbar)
-
- tMyScrollBar::handleEvent(TEvent& event)
- {
- if position==1 and event.message.keydown==thedownarrowkey then scroll down 1;
- //consult tkeys.h in /tvision/include for the down arrow key, also, check
- out /tvision/source/tscrolle.cpp - this will give you the event handler
- and the functions which actually do the scrolling, and the function which
- gives you the position
-
- if you're unfamiliar with the event handler let me know and i'll give a
- more detailed explanation-
-
- this should be enough to get you started- if not, let me know-
- C
- hope this helps.
-
-
- kevin
- A
- C
- then override it's event handl
-