Finder 6.0 questions

Finder 6.0 questions

Post by Nathan Mat » Fri, 21 Apr 1995 04:00:00



I just completed a section of code that does the following with the
Finder 6.0x

1) Gets current selection
2) Sets selection to a disk entry
3) Calls the menu item 'Put Away' (aka eject)
4) Restores the selection from (1)

   Looking at my Sys 6 reference, tellFinderGetSelectedIcons ($8004)
notes this: "The returned stringList handle is yours to deal
with. When you're done with it, you must call DisposeHandle on it."
There's no such note on the SetSelectedIcons ($8005), where I have
to pass a handle to the Finder.

   My question is this: how soon after SetSelectedIcons can I dispose
the handle I pass to the Finder. Does the Finder copy the handle I
created, so I can dispose of my copy immediately, or what? Right now,
I'm disposing the handles I used in 1) and 4) immediately after 4),
and it seems to work. Can I count on this behavior in Finder 6.0 and
6.0.1 (only tested in 6.0.1), and the future, or what?

Nathan Mates

--
<*> Nathan Mates http://www.ugcs.caltech.edu/~nathan/      <*>
# And he said to them, "To you has been given the secret of the
# Kingdom of God, but for those outside, everything comes in
# parables" Mark 4:11, NRSV

 
 
 

Finder 6.0 questions

Post by Steven McQue » Sat, 22 Apr 1995 04:00:00



Quote:Mates) writes:

>   My question is this: how soon after SetSelectedIcons can I dispose
>the handle I pass to the Finder. Does the Finder copy the handle I
>created, so I can dispose of my copy immediately, or what? Right now,
>I'm disposing the handles I used in 1) and 4) immediately after 4),
>and it seems to work. Can I count on this behavior in Finder 6.0 and
>6.0.1 (only tested in 6.0.1), and the future, or what?

My admittedly uninformed gut instinct is that you should NOT dispose of
the handle that you pass to SetSelectedIcons, since I would assume that
this function would do it for you. Since the handle was once valid and
has not been re-used, your code is working but not really doing
anything. Try a CheckHandle call to ensure that the handle is still
valid before issuing your DisposeHandle. If the CheckHandle call
returns an error code (probably $0201) then the Finder is disposing of
the handle for you.

Steve

 
 
 

Finder 6.0 questions

Post by Nathan Mat » Mon, 24 Apr 1995 04:00:00




>My admittedly uninformed gut instinct is that you should NOT dispose of
>the handle that you pass to SetSelectedIcons, since I would assume that
>this function would do it for you.

   Hmmm. Just checked; it seems as if the handle I made and provided
to the Finder is not disposed of at all. The one that the Finder
originally gave me, and I then passed back is sorta resized down to a
size of 2 bytes (!) when I've exited my CDA and checked on it from
NiftyList.  Some clarification from the Apple folks would be
appreciated.

Nathan Mates
--
<*> Nathan Mates http://www.ugcs.caltech.edu/~nathan/      <*>
# And he said to them, "To you has been given the secret of the
# Kingdom of God, but for those outside, everything comes in
# parables" Mark 4:11, NRSV

 
 
 

Finder 6.0 questions

Post by David A Lyon » Sun, 30 Apr 1995 04:00:00




>   My question is this: how soon after SetSelectedIcons can I dispose
>the handle I pass to the Finder. [...]

You can dispose it right away.

The Finder just uses your handle for a source of information.  It
actually does all the selecting an unselecting (by modifying its own
"icon objects") before returning from the SetSelectedIcons request.
(I suppose the original documentation could have been clearer...sorry!)

Dave Lyons
Mr Tangent

 
 
 

1. Finder 6.0 Questions

Just got done installing system 6.0 on my Vulcan and I've noticed a couple of
oddities:

When I access the "colors" menu, the 16 color boxes stay on the screen instead
of erasing when that menu closes.

Some icons that I used before are not active. The default type is shown, even
though I've re-ordered them with ProSel with my own icons on top.

Anyone noticed these things or have any idea what causes these?

2. External Cable Run Supplier

3. 3D Finder icons ** in Finder 6.0

4. Left handed

5. Octagon font?? anyone??? i need it

6. A trivial question about Finder 6.0

7. Clean up residue of missing programs (not uninstalled)

8. Setting icon selections in Finder 6.0

9. 5.0.4 Finder with system 6.0?

10. Bug in Finder 6.0

11. Finder 6.0 Problem (again)

12. FINDER 6.0