Results 1 to 13 of 13

Thread: Editor in turboc

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Editor in turboc

    Quote Originally Posted by Gopala Krishna View Post
    Your advice may be perfect for me but not my other classmates since they really don't know anything other than turboc for now. That is the only IDE familiar to them which involves nice context help built in. So doing a small functional editor(similar to edit) will sprout interest in them , atleast that is what my teacher assumes.
    That's exactly what I mean. I think this assumption is wrong I don't say students shouldn't use turbo c, I'm saying they shouldn't implement such things with it, especially if they are new to the language.

    So they cant think about portability at this stage.
    It's not about thinking about portability. It's about knowing there are different architectures, not only x86/Win32. Using such concepts as programming interrupts as the basic of the C course seems very strange, based on the fact that for modern operating systems you'll never touch any interrupt handler, because they are hidden and well protected. Of course, again, this doesn't apply if you code a device driver, but that doesn't seem to be the case when using Turbo C

    One more advantage for starters will be , some understanding on how events are generated and how to handle them.
    What kind of events? I never heard of any events in TurboC.

    I didn't want to be odd one out and so joined to help others too.
    I'm not blaiming you. I'm just saying your teacher had a weird idea making his students implement a text editor as a starters project from C.

    My idea is to do something special in this. For example i have better idea to handle the events and catch interrupts at right place. I am trying to be perfectionist in as many areas as possible and also would like to learn advanced data structures.
    This is purely academical "perfection" - you'll never put that knowledge into practical use.

    By frame buffer i meant accesing cga memory directly as in http://en.wikipedia.org/wiki/Pointer...apped_hardware
    I understand that. What operating system are you using? Emulation of DOS, right? Do you have DOS on your desktop computer? Have you tried using the framebuffer directly inside WinXP or Vista for a non DOS-based application?

    That's one of the reasons I graduated CS on a technical university instead of a theoretical one

  2. #2
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    37
    Thanked 53 Times in 40 Posts

    Default Re: Editor in turboc

    Though we are going off topic this discussion is interesting.

    Quote Originally Posted by wysota View Post
    That's exactly what I mean. I think this assumption is wrong I don't say students shouldn't use turbo c, I'm saying they shouldn't implement such things with it, especially if they are new to the language.
    They are not very new to language but ofcourse to data structures. You are right but we are just supposed to get a working editor with no fancy things and so that shouldn't be a big problem.

    It's not about thinking about portability. It's about knowing there are different architectures, not only x86/Win32. Using such concepts as programming interrupts as the basic of the C course seems very strange, based on the fact that for modern operating systems you'll never touch any interrupt handler, because they are hidden and well protected. Of course, again, this doesn't apply if you code a device driver, but that doesn't seem to be the case when using Turbo C
    True, this was ofcourse informed. Think this to be a system software

    What kind of events? I never heard of any events in TurboC.
    Can we call this over influence of Qt ? Actually i meant interrupts.


    This is purely academical "perfection" - you'll never put that knowledge into practical use.
    But since i have already been committed to this i don't bother whether this will be really useful. Playing with pointers is fun and ofcourse not everything will be waste.

    I understand that. What operating system are you using? Emulation of DOS, right? Do you have DOS on your desktop computer? Have you tried using the framebuffer directly inside WinXP or Vista for a non DOS-based application?

    That's one of the reasons I graduated CS on a technical university instead of a theoretical one
    Very true. As i said before, this is meant to be introductory and my friends have learned basic 'C'. Experimenting so much with other subjects to study will be tough to manage. Getting a simple editor working will be enough as of now.
    And also the practical part is in our hands and its our duty/curiosity to experiment
    Well actually its worth to know the theory behind too.
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Editor in turboc

    Quote Originally Posted by Gopala Krishna View Post
    Playing with pointers is fun
    That's what you say. I'm not a masochist

  4. #4
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    37
    Thanked 53 Times in 40 Posts

    Default Re: Editor in turboc

    Quote Originally Posted by wysota View Post
    That's what you say. I'm not a masochist
    I am sorry. May be you are just looking at faults rather than trying to help. Well i don't want to say anything more and thanks for answering in this thread.
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  5. #5
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    37
    Thanked 53 Times in 40 Posts

    Default Re: Editor in turboc

    Sorry wysota, i guess i lost my cool for no reason
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Editor in turboc

    No problem. By the way, I thought of something yesterday, but I forgot to write it here

    You wanted something regarding scrolling. If you can read the frame buffer, you can implement scrolling by reading the chunk of data that represent all the visible lines of the editor but one (the one that'll fall out of the screen) and writing it back again at a different offset. This way you'll have to recalculate and draw only a single line (first or last, depending on the scroll direction). I don't know if that helps, but maybe it'll give you something to start with.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.