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

Re: [MiNT] Window with toolbar and redraw messages



Remember that the userdef code is executed by the AES. If you have lot of local data in the userdef the AES might run out of stack. It's better to allocate space for this outside the userdef code

Jo Even



-------- Original message --------
From: "J. F. Lemaire" <jflemaire@skynet.be>
Date:
To: mint <mint@lists.fishpool.fi>
Subject: Re: [MiNT] Window with toolbar and redraw messages


On 2 December 2013 09:31, Jo Even Skarstein <joska@online.no> wrote:
> I'm not sure what you mean. I have only on USERDEF in my own dialog
> library, this draws the tabs and frames for a tabbed object. The only
> global (well, global to the userdef functions atleast) data is the VDI
> parameter block. ub_parm points to a structure containing the data for
> the actual object.

When I did that (ub_parm pointing to a (largish) structure) the app
crashed. Once I had declared the structure outside the redrawing
function, and ub_parm simply pointed to the workstation handle, it no
longer crashed; so I figured pointing ub_parm to large structures was
problematic.

But since it's just a pointer anyway I don't think it makes much of a
difference, now that I think about it. I'll need to test this more.

Cheers,
JFL
--
Jean-François Lemaire