Refresh? (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: REALbasic-NUG Digest #7445
Next thread: Re: Slow Tip window on powerbooks (iBook for me !)


[OT] more Carbon shared library tales   -   Hadley, Joshua
  Refresh?   -   Robert Boeckman
   Re: Refresh?   -   Terry Ford
   Re: Refresh?   -   Eric M. Williams
    Re: Refresh?   -   Steve Goodman
     Re: Refresh?   -   Dennis Birch
     Re: Refresh?   -   Terry Ford
     Re: Refresh?   -   Eric M. Williams
     Re: Refresh?   -   Terry Ford
     Re: Refresh?   -   Frank Bitterlich
   Re: Refresh?   -   Terry Ford
    Re: Refresh?   -   Ricardo Rojas
     Re: Refresh?   -   Tony Spencer

Refresh?
Date: 13.12.02 20:43 (Fri, 13 Dec 2002 13:43:08 -0600)
From: Robert Boeckman
How do I force the finder to update when I create a new file? If I
create a new text file it often doesn't show up until I quit my
application...........

TNX, Rob

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Refresh?
Date: 13.12.02 21:32 (Fri, 13 Dec 2002 12:32:30 -0800)
From: Terry Ford
Robert Boeckman wrote:

>How do I force the finder to update when I create a new file? If I
>create a new text file it often doesn't show up until I quit my
>application...........
>
>TNX, Rob
>

Assuming you are creating a new instance of a previously defined
window, in your File-NEW menu handler:

Dim w As TextWindow //TextWindow is the name of your window

w = NEW TextWindow
w.show//bring to the front (i.e. Make it Window(0) )

HTH :-)

Re: Refresh?
Date: 13.12.02 21:34 (Fri, 13 Dec 2002 12:34:44 -0800)
From: Eric M. Williams
>>Robert Boeckman wrote:
>>
>>>How do I force the finder to update when I create a new file? If I
>>>create a new text file it often doesn't show up until I quit my
>>>application...........
>>>
>>>TNX, Rob
>>>
> Oops! missed the thread again.
>
>I've also noticed that it often takes several seconds for many copy
>and create events to update in folders.

I have the answer to this, after an hour of frustration
AppleScripting the Finder:

tell application "Finder"
update folder "Folder"
end

In OS X, this causes the Finder to (obviously) update the folder in
question. You have to do this after certain operations, especially
when working on server volumes, because the new Finder isn't as
responsible about updating its own windows as the OS 9 Finder.

Eric

Re: Refresh?
Date: 13.12.02 22:48 (Fri, 13 Dec 2002 15:48:41 -0600)
From: Steve Goodman
For those more fond of Apple Events

Sub UpdateFolder(f as folderItem)
dim ae as appleevent

ae=newappleEvent("fndr","fupd","MACS")
ae.folderItemParam("----")ð if not ae.send then
msgBox "Error updating "+f.absolutePath
end

End Sub

Steve Goodman

> From: "Eric M. Williams" <<email address removed>>
> Reply-To: "REALbasic Network Users
> Group"<<email address removed>>
> Date: Fri, 13 Dec 2002 12:34:44 -0800
> To: "REALbasic Network Users Group" <<email address removed>>
> Subject: Re: Refresh?
>
>>> Robert Boeckman wrote:
>>>
>>>> How do I force the finder to update when I create a new file? If I
>>>> create a new text file it often doesn't show up until I quit my
>>>> application...........
>>>>
>>>> TNX, Rob
>>>>
>>>
>> Oops! missed the thread again.
>>
>> I've also noticed that it often takes several seconds for many copy
>> and create events to update in folders.
>
> I have the answer to this, after an hour of frustration
> AppleScripting the Finder:
>
> tell application "Finder"
> update folder "Folder"
> end
>
> In OS X, this causes the Finder to (obviously) update the folder in
> question. You have to do this after certain operations, especially
> when working on server volumes, because the new Finder isn't as
> responsible about updating its own windows as the OS 9 Finder.
>
> Eric
> --
>
> Eric M. Williams
> Oxalyn
> Seattle, WA
>
> Virtual Volume Manager: THE way to manage Virtual Volumes!
> http://software.oxalyn.com/
>
> ---
> A searchable archive of this list is available at:
> <http://dbserver.realsoftware.com/KBDB/search.php>
> Unsubscribe:
> <mailto:<email address removed>>
> Subscribe to the digest:
> <mailto:<email address removed>>

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Refresh?
Date: 13.12.02 23:32 (Fri, 13 Dec 2002 14:32:15 -0800)
From: Dennis Birch
Thanks. You just saved me the work of figuring it out myself.

At 3:48 PM -0600 12/13/02, Steve Goodman wrote:
>For those more fond of Apple Events
>
>Sub UpdateFolder(f as folderItem)
> dim ae as appleevent
>
> ae=newappleEvent("fndr","fupd","MACS")
> ae.folderItemParam("----")ð> if not ae.send then
> msgBox "Error updating "+f.absolutePath
> end
>
>End Sub

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Refresh?
Date: 13.12.02 23:46 (Fri, 13 Dec 2002 14:46:19 -0800)
From: Terry Ford
>Thanks. You just saved me the work of figuring it out myself.
>
>At 3:48 PM -0600 12/13/02, Steve Goodman wrote:
>>For those more fond of Apple Events
>>
>>Sub UpdateFolder(f as folderItem)
>> dim ae as appleevent
>>
>> ae=newappleEvent("fndr","fupd","MACS")
>> ae.folderItemParam("----")ð>> if not ae.send then
>> msgBox "Error updating "+f.absolutePath
>> end
>>
>>End Sub

Question 1: Will this apple event work in both OS 9 and OS X?
Question 2: Does anyone know if this is also an issue in Win32 builds?
-

Re: Refresh?
Date: 13.12.02 23:58 (Fri, 13 Dec 2002 14:58:27 -0800)
From: Eric M. Williams
>>>Sub UpdateFolder(f as folderItem)
>>> dim ae as appleevent
>>>
>>> ae=newappleEvent("fndr","fupd","MACS")
>>> ae.folderItemParam("----")ð>>> if not ae.send then
>>> msgBox "Error updating "+f.absolutePath
>>> end
>>>
>>>End Sub
>
>Question 1: Will this apple event work in both OS 9 and OS X?
>Question 2: Does anyone know if this is also an issue in Win32 builds?

1) Yes.

2) You've got the wrong idea: the issue is with the OS X Finder, not
RB. The new Finder doesn't update its windows as frequently as the OS
9 version, and leads to some confusion when a saved file doesn't
immediately appear. This lagging effect is visible with all OS X
applications.

Eric
-

Re: Refresh?
Date: 14.12.02 00:35 (Fri, 13 Dec 2002 15:35:22 -0800)
From: Terry Ford
>>
>>Question 2: Does anyone know if this is also an issue in Win32 builds?
>
>2) You've got the wrong idea: the issue is with the OS X Finder, not
>RB. The new Finder doesn't update its windows as frequently as the
>OS 9 version, and leads to some confusion when a saved file doesn't
>immediately appear. This lagging effect is visible with all OS X
>applications.
>
>Eric
>--
>
Thanks for the answer to the first question.
What I was asking in Question 2 was if anyone had any experience with
a similar type of problem when they build their apps for Windows.

Re: Refresh?
Date: 16.12.02 14:06 (Mon, 16 Dec 2002 14:06:27 +0100)
From: Frank Bitterlich
Hi Terry,

AFAIK the Windows Explorer (which you use to view files) doesn't refresh
at all unless you press F5 to give the Refresh command. So the users are
used to not seeing any changes until they refresh. (This might have
changed with the new Windows versions, I don't do no XP :)

Cheers,
Frank+++

Terry Ford wrote:
>
> >>
> >>Question 2: Does anyone know if this is also an issue in Win32 builds?
...
> Thanks for the answer to the first question.
> What I was asking in Question 2 was if anyone had any experience with
> a similar type of problem when they build their apps for Windows.

Re: Refresh?
Date: 13.12.02 21:44 (Fri, 13 Dec 2002 12:44:04 -0800)
From: Terry Ford
>Robert Boeckman wrote:
>
>>How do I force the finder to update when I create a new file? If I
>>create a new text file it often doesn't show up until I quit my
>>application...........
>>
>>TNX, Rob
>>
>Assuming you are creating a new instance of a previously defined
>window, in your File-NEW menu handler:
>
>Dim w As TextWindow //TextWindow is the name of your window
>
>w = NEW TextWindow
>w.show//bring to the front (i.e. Make it Window(0) )
>
>HTH :-)
>
>--
>Terry Ford
>
Oops! missed the thread again.

I've also noticed that it often takes several seconds for many copy
and create events to update in folders.

Re: Refresh?
Date: 14.12.02 00:43 (Fri, 13 Dec 2002 19:43:41 -0400)
From: Ricardo Rojas
Robert Boeckman, <email address removed>, wrote:

>How do I force the finder to update when I create a new file? If I
>create a new text file it often doesn't show up until I quit my
>application...........

Hi Robert. In Matt's book (pg 442, 1st Edition) he suggests using a
timer with a short period (100), so that the finder has time to update
itself.

HTH,
>>>®<<

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Refresh?
Date: 14.12.02 22:03 (Sat, 14 Dec 2002 22:03:20 +0100)
From: Tony Spencer
OS X does seem to take considerably longer to update than OS 9. The
question I suppose is whether the Finder's database is updated any
quicker than the window redraw. If not, in the space of those several
seconds, you could get a nil object to a file you've just written.
Several seconds is way to long to have your app waiting for the Finder.

On Saturday, December 14, 2002, at 12:43 am, Ricardo Rojas wrote:

> Hi Robert. In Matt's book (pg 442, 1st Edition) he suggests using a
> timer with a short period (100), so that the finder has time to update
> itself.

Tony Spencer
St Etienne du Grès, (13) France
<email address removed>
http://homepage.mac.com/tonyspencer/

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>