Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling all rendering until page is full loaded



I was hoping that I wouldn't need to subclass the webcontrol - Doh !!!.

The idea is leave what the webcontrol is presently displaying, then disable
all updates until it full loaded and then do a full and complete draw. So I
guess I've leave the else part of drawRect empty.

I guess I need to do [yourWebViewSubclass setNeedsDisplay:NO], when we start
to load the next page, and a [yourWebViewSubclass setNeedsDisplay:YES], when
fully loaded ???.

Sorry, but I'm still learning AppKit() if sounds basic.

Thanks
Mark.

> If you want it blank rather than invisible, you could perhaps do
> something like the following in a subclass of WebView?
> 
> @interface YourWebViewSubclass
> 
> - (void)drawRect:(NSRect)aRect
> {
> if (pageHasFinishedLoading)
> [super drawRect:aRect];
> else
> {
> [[NSColor whiteColor] set];
> NSRectFile(aRect);
> }
> }
> 
> @end
> 
> You might need to call [yourWebViewSubclass setNeedsDisplay:YES] when
> you get your delegate notification.
> 
> Best wishes,
> Hamish
> 
> On Apr 6, 2005, at 17:47, Mark Thomas wrote:
> 
>> The problem with this I think, that this would remove the control from
>> view,
>> and then re-appear so I could end up with a flash depending on how
>> quick the
>> page loads and Window Manager notices there's a update required.
>> 
>> Unless I've missed something.
>> 
>> Thanks
>> Mark.
>> 
>>> A WebView is an NSView, so perhaps you could try [yourWebView
>>> setHidden:YES]?
>>> 
>>> Best wishes,
>>> Hamish
>>> 
>>> On Apr 6, 2005, at 16:55, Mark Thomas wrote:
>>> 
>>>> Hi,
>>>>   Is there a way to get the web control not to do any
>>>> drawing/rendering
>>>> until, it has full loaded the the page and associated images ???.
>>>> The
>>>> control and window are on the screen, so I cannot move them off
>>>> screen
>>>> temporary, as I want to do all pages this way so it looks better.
>>>> 
>>>>   I already track the request that the page is changing, and when the
>>>> page
>>>> has finished loading delegates, but not sure How to stop the
>>>> rendering
>>>> in
>>>> between them :-(.
>>>> 
>>>>   Would this be a standard Cocoa thing, or something extra I need to
>>>> make
>>>> the web control do ???.
>>>> 
>>>> Any ideas,
>>>> 
>>>> Thanks in advance
>>>> 
>>>> Mark.
>>>> 
>>>>  _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webkitsdk-dev mailing list      (email@hidden)
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webkitsdk-dev/
>>>> email@hidden
>>>> 
>>>> This email sent to email@hidden
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Disabling all rendering until page is full loaded (From: Hamish Allan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.