Re: Forcing AU window to redraw
Re: Forcing AU window to redraw
- Subject: Re: Forcing AU window to redraw
- From: Marc Poirier <email@hidden>
- Date: Tue, 4 Feb 2003 16:12:29 +0100 (CET)
Although there is still the question of whether or not Logic 6's drawing
is in fact broken and in need of fixing... I reported this as a bug in
Logic 6 a while ago (because I saw the problem exhibited in many AUs), but
was told that it was not a bug in Logic but a bug in the AUs (some other
AUs were working correctly). After looking into it more, I'm pretty sure
that the problem is with the AUs because, if you use the
AUCarbonViewControl class, the CarbonControlValue is not initialized in
the constructor or in Bind(). As I've said, all that's required to
address this and properly initialize the values is to add this to the end
of AUCarbonViewControl::Bind()
Update(true);
If you don't do this, then you have to hope that the host triggers some
sort of update event that will result in triggering
AUCarbonViewControl::ParamToControl to happen. I don't know the internal
details, but most hosts to cause this to happen when opening AUViews, but
Logic 6 does not. Anyway, I was skeptical at first ("it's beta software
and every other host works differently!"), but now I am leaning towards
Emagic in agreeing that it is a plugin bug, which can easily be addressed
in AUCarbonViewControl::Bind
Marc
On Mon, 3 Feb 2003, Bill Stewart wrote:
>
As Logic 6 isn't completed yet, it seems to me that the correct fix is
>
to have Logic fix their drawing... Why hack around bugs in a beta
>
version:)
>
>
Bill
>
>
On Wednesday, January 29, 2003, at 07:00 AM, Marc Poirier wrote:
>
>
>> With the release of the latest AudioUnits SDK this week I'm finding
>
>> that
>
>> under the Logic 6.0 beta my PictureControls and BevelButtons are not
>
>> drawing until they receive a screen update event from the system (by
>
>> bringing another application to the foreground). Everything works fine
>
>> under Logic 5.5.
>
>>
>
>> How can I get the Carbon Window to update? I've tried
>
>> InvalWindowRect(mCarbonWindow, rect) but this doesn't help.
>
>
>
> Yes, a lot of peoples AU GUIs are not working correctly in Logic 6,
>
> but I
>
> think that most of you will solve your problems if you simply add this
>
> to
>
> the end of AUCarbonViewControl::Bind()
>
>
>
> Update(true);
>
>
>
> That will set the CarbonControl value of your controls as you embed
>
> them
>
> into your GUI. The default behaviour is that those control values are
>
> not
>
> set until some update occurs, which works fine in most hosts, but not
>
> Logic 6.
>
>
>
> But if that doesn't help you, you can try Control Manager routines like
>
> UpdateControls or Draw1Control (for each each control). Another
>
> hackish
>
> trick that works (but I wouldn't recommend) is to call SizeWindow at
>
> the
>
> end of your CreateUI and give some totally wrong dimensions (this is
>
> why
>
> the Emagic AU SDK examples work ;). Logic will just resize the window
>
> back to the correct size anyway so you won't do any real damage, but in
>
> the process your window will get an update.
>
>
>
> Marc
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.