Re: [gtk-list] Re: z80 Assembly IDE



Matthew D Allen wrote:

> >looking for this bug for like 10 hours or so now, and I was wondering if
> >anyone out there knows of a better way to do what I am trying to do. A
> >notebook would work, but I kinda like the way it looks right now. Any
> >input on this issue would be appreciated.
>
> You could use linked lists, but isn't that kind of overkill?  Say you
> wanted to keep track of the widgets corresponding to the different pages,
> or structures of your own that contain the widgets and the filenames and
> so on.  Just put a ceiling on the number of files they can have open at a
> time.  Like, choosing an arbitrary number, say, 32.  If you know somebody
> who likes to edit more than 32 files simultaenously, increase it.  :)
> Then just use an array of pointers to whatever you need to store.  The
> only difference is that you would have a slight amount of wasted space, ie
> however many pages the user wasn't using times the sizeof the pointer,
> which should be pretty small.
>
> That way, you always have the info, and a straight index into the array,
> which is quicker than searching through a linked list for an object.
> (Although with the number of things you're probably working with the speed
> difference would be negligible.)
>
> David Allen
> http://opop.nols.com/ Free Software Development
> Der Horizont vieler Menschen ist ein Kreis mit Radius Null -- und das
> nennen sie ihren Standpunkt.
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

Thanks a lot man. I kind of thought about that originally, but I left it alone
in order to save mem. This application is probably not going to be used by
more than like 10 people, so i dont really have to worry about people who dont
have tons of mem (128 is what most of my buddies have), so that should never
be a problem.
This will make things _much_ easier.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]