Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #4080 > unrolled thread

tellFinderAboutChange and window Rect

Started byvavruska@gmail.com
First post2018-01-04 06:30 -0800
Last post2018-01-05 06:37 -0800
Articles 8 — 6 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  tellFinderAboutChange and window Rect vavruska@gmail.com - 2018-01-04 06:30 -0800
    Re: tellFinderAboutChange and window Rect Marco Verpelli <mverpelli@libero.it> - 2018-01-04 07:08 -0800
      Re: tellFinderAboutChange and window Rect vavruska@gmail.com - 2018-01-04 07:54 -0800
    Re: tellFinderAboutChange and window Rect Kelvin Sherlock <email@domain.com> - 2018-01-04 11:41 -0500
      Re: tellFinderAboutChange and window Rect Chris Vavruska <vavruska@gmail.com> - 2018-01-04 08:55 -0800
        Re: tellFinderAboutChange and window Rect Antoine Vignau <antoine.vignau@laposte.net> - 2018-01-04 15:32 -0800
          Re: tellFinderAboutChange and window Rect David Schmidt <schmidtd@my-deja.com> - 2018-01-04 21:43 -0500
          Re: tellFinderAboutChange and window Rect Chris Vavruska <vavruska@gmail.com> - 2018-01-05 06:37 -0800

#4080 — tellFinderAboutChange and window Rect

Fromvavruska@gmail.com
Date2018-01-04 06:30 -0800
SubjecttellFinderAboutChange and window Rect
Message-ID<5e889b23-f6dc-45e7-9477-5a45dd5b49d7@googlegroups.com>
I am writing a finderExt and when I send the request tellFinderAboutChange sometimes it work, sometimes it doesn't. I tried moving the update so it happens during a finderSaysIdle since my send request was happening during a finderSaysKeyHit. I am thinking about just closing and opening the windows using tellFinderCloseWindow/tellFinderOpenWindow unless someone has a better idea.

Also, I am trying to get window rect of a finder window. If I look into the window.PortInfo I see a boundsRect but that has negative numbers in it. I understand that it is relations to the QuickDraw grid. I just can't seem to find out where (0,0) of the screen is so I can convert this to local coordinated.  I want to plug values in WhooshRect so that the WhooshRect goes from the outer rect of the window to the middle of the window.

Thanks for any insite.

[toc] | [next] | [standalone]


#4081

FromMarco Verpelli <mverpelli@libero.it>
Date2018-01-04 07:08 -0800
Message-ID<b54201df-e2a1-4d04-9198-fe81dec35826@googlegroups.com>
In reply to#4080
On Thursday, January 4, 2018 at 3:30:14 PM UTC+1, vavr...@gmail.com wrote:
> I am writing a finderExt and when I send the request tellFinderAboutChange sometimes it work, sometimes it doesn't. I tried moving the update so it happens during a finderSaysIdle since my send request was happening during a finderSaysKeyHit. I am thinking about just closing and opening the windows using tellFinderCloseWindow/tellFinderOpenWindow unless someone has a better idea.
> 
> Also, I am trying to get window rect of a finder window. If I look into the window.PortInfo I see a boundsRect but that has negative numbers in it. I understand that it is relations to the QuickDraw grid. I just can't seem to find out where (0,0) of the screen is so I can convert this to local coordinated.  I want to plug values in WhooshRect so that the WhooshRect goes from the outer rect of the window to the middle of the window.
> 
> Thanks for any insite.

I'm sorry here only DOS 3.2 or 3.3, PRODOS, UCSD System.
No finder, fancy GUI or other useless things.
Your clock is running too fast for us! We are still at 1023 Mhz 6502

Marco

[toc] | [prev] | [next] | [standalone]


#4082

Fromvavruska@gmail.com
Date2018-01-04 07:54 -0800
Message-ID<7070c6be-e312-4374-a91d-4d43a95e7324@googlegroups.com>
In reply to#4081
On Thursday, January 4, 2018 at 10:08:29 AM UTC-5, Marco Verpelli wrote:
> On Thursday, January 4, 2018 at 3:30:14 PM UTC+1, vavr...@gmail.com wrote:
> > I am writing a finderExt and when I send the request tellFinderAboutChange sometimes it work, sometimes it doesn't. I tried moving the update so it happens during a finderSaysIdle since my send request was happening during a finderSaysKeyHit. I am thinking about just closing and opening the windows using tellFinderCloseWindow/tellFinderOpenWindow unless someone has a better idea.
> > 
> > Also, I am trying to get window rect of a finder window. If I look into the window.PortInfo I see a boundsRect but that has negative numbers in it. I understand that it is relations to the QuickDraw grid. I just can't seem to find out where (0,0) of the screen is so I can convert this to local coordinated.  I want to plug values in WhooshRect so that the WhooshRect goes from the outer rect of the window to the middle of the window.
> > 
> > Thanks for any insite.
> 
> I'm sorry here only DOS 3.2 or 3.3, PRODOS, UCSD System.
> No finder, fancy GUI or other useless things.
> Your clock is running too fast for us! We are still at 1023 Mhz 6502
> 
> Marco

I'm sorry, I thought the Apple IIgs was an Apple II computer and since this is for Apple 2 programming I thought this was the place for such topics. If your not interested in the topic then can you please kindly ignore it rather than adding no useful information.

[toc] | [prev] | [next] | [standalone]


#4083

FromKelvin Sherlock <email@domain.com>
Date2018-01-04 11:41 -0500
Message-ID<p2llgc$gcv$1@dont-email.me>
In reply to#4080
tellFinderAboutChange was nopped as of 6.0.1 (in favor of GS/OS's 
volume change notifications). Of course ProDOS only has 1 second file 
time granularity so it doesn't work all the time.


On 2018-01-04 14:30:14 +0000, vavruska@gmail.com said:

> I am writing a finderExt and when I send the request 
> tellFinderAboutChange sometimes it work, sometimes it doesn't. I tried 
> moving the update so it happens during a finderSaysIdle since my send 
> request was happening during a finderSaysKeyHit. I am thinking about 
> just closing and opening the windows using 
> tellFinderCloseWindow/tellFinderOpenWindow unless someone has a better 
> idea.
> 
> Also, I am trying to get window rect of a finder window. If I look into 
> the window.PortInfo I see a boundsRect but that has negative numbers in 
> it. I understand that it is relations to the QuickDraw grid. I just 
> can't seem to find out where (0,0) of the screen is so I can convert 
> this to local coordinated.  I want to plug values in WhooshRect so that 
> the WhooshRect goes from the outer rect of the window to the middle of 
> the window.
> 
> Thanks for any insite.

[toc] | [prev] | [next] | [standalone]


#4084

FromChris Vavruska <vavruska@gmail.com>
Date2018-01-04 08:55 -0800
Message-ID<dfb2f0d2-e3f3-480c-940d-17f0d3548bf8@googlegroups.com>
In reply to#4083
According to the documentation tellFinderAboutChange

"Informs the Finder that the contents of a directory have changed.  If there is an open window for this directory, the Finder re-reads the directory’s contents and brings the window up to date"

So what does that I have to do with the ProDOS 1 second file granularity?  Shouldn't it update update the entire window no matter what has changed or not?  I am not doubting you I just must be missing something. 

[toc] | [prev] | [next] | [standalone]


#4085

FromAntoine Vignau <antoine.vignau@laposte.net>
Date2018-01-04 15:32 -0800
Message-ID<ef4d7c65-b391-48fd-a761-0e897d674d8a@googlegroups.com>
In reply to#4084
Here is what Kelvin was saying:

";.....................................................................
;
; tFinderInformOfChange -- tell the finder that the xxx path has changed
; (handle tellFinderAboutChange)
;
;.....................................................................

tFinderInformOfChange procname
	import UpdateWindow		;input=<wind
	IMPORT finderDPage
	IMPORT matchWindName
	IMPORT walkWindow
	IMPORT WStringCopy

*** 21-Aug-92 DAL -- replace code with return-no-error (Volume Changed events should be enough)
	lda #0
	clc
	rts
"

This is part of the Finder source code, file request.aii

More to come soon,
Antoine

[toc] | [prev] | [next] | [standalone]


#4086

FromDavid Schmidt <schmidtd@my-deja.com>
Date2018-01-04 21:43 -0500
Message-ID<p2moni$bbv$1@dont-email.me>
In reply to#4085
On 1/4/2018 6:32 PM, Antoine Vignau wrote:
> Here is what Kelvin was saying:
> 
> *** 21-Aug-92 DAL -- replace code with return-no-error (Volume Changed events should be enough)
> 	lda #0
> 	clc
> 	rts

Dave Lyons FTW

[toc] | [prev] | [next] | [standalone]


#4087

FromChris Vavruska <vavruska@gmail.com>
Date2018-01-05 06:37 -0800
Message-ID<27f392e5-4756-40a8-b298-e624e0552405@googlegroups.com>
In reply to#4085
On Thursday, January 4, 2018 at 6:32:56 PM UTC-5, Antoine Vignau wrote:
> Here is what Kelvin was saying:
> 
> ";.....................................................................
> ;
> ; tFinderInformOfChange -- tell the finder that the xxx path has changed
> ; (handle tellFinderAboutChange)
> ;
> ;.....................................................................
> 
> tFinderInformOfChange procname
> 	import UpdateWindow		;input=<wind
> 	IMPORT finderDPage
> 	IMPORT matchWindName
> 	IMPORT walkWindow
> 	IMPORT WStringCopy
> 
> *** 21-Aug-92 DAL -- replace code with return-no-error (Volume Changed events should be enough)
> 	lda #0
> 	clc
> 	rts
> "
> 
> This is part of the Finder source code, file request.aii
> 
> More to come soon,
> Antoine

I guess they didn't count on a directory changing more than once during a clock minute. If I wait until the the next minute before updating the directory again then it updates the folder correctly every time. If they had just left this code in then it would have been possible to work around this limitation. 
I guess I could look at the parent directory modification time before updating the files to see if it is the same time as now and if it is then I could close the window and re-open it to force the update.  Ugly, but a workaround. Unless of course someone has a better idea.

Thanks,

Chris

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2.programmer


csiph-web