dragItems and resourceForks 
Author Message
 dragItems and resourceForks

Okay, now I want to be able to drag a document or application onto the
canvas, and have the canvas take the applications main icon (i.e. the one on
the desktop).  The only problem is, most of the resourceFork's built in
methods like geticl don't get the one I want.  Suggestions?  thanks

-Tyler Denniston



Thu, 10 Jun 2004 21:35:11 GMT  
 dragItems and resourceForks

Quote:

> Okay, now I want to be able to drag a document or application onto the
> canvas, and have the canvas take the applications main icon (i.e. the one on
> the desktop).  The only problem is, most of the resourceFork's built in
> methods like geticl don't get the one I want.  Suggestions?  thanks

Getting the icon shown by the Finder is an extremely hard problem, in
any language.  However, I believe there's a plug-in that does exactly
that and makes it easy (in RB).  It's called "FileIcon" or "FinderIcon"
or some such.

Good luck,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Fri, 11 Jun 2004 05:07:00 GMT  
 dragItems and resourceForks

Quote:

> Okay, now I want to be able to drag a document or application onto the
> canvas, and have the canvas take the applications main icon (i.e. the one on
> the desktop).  The only problem is, most of the resourceFork's built in
> methods like geticl don't get the one I want.  Suggestions?  thanks

If I remember correctly, I've got a plugin for that on my homepage.

<http://www.monkeybreadsoftware.de/realbasic/plugins>

Mfg
Christian

--
Heute: ALDI DOSen,  geruehrt oder geschuettelt
       garantiert aus unkontrolliertem Anbau
       1 kg DM 399,-
http://www.christians-software.de (Kostenlose Mac/Win Software)



Fri, 11 Jun 2004 07:23:07 GMT  
 dragItems and resourceForks
Okay, now how do I make sure obj is a folderItem?  I have this right now:

sub DropObject(obj as dragitem)
    dim f as folderItem
    if obj=folderitemavailable then
        f=obj
    end if
end sub

It gives me the 'type mismatch' error for 'f=obj'.  what's wrong?



Fri, 11 Jun 2004 07:29:43 GMT  
 dragItems and resourceForks

Quote:

> Okay, now how do I make sure obj is a folderItem?  I have this right now:

> sub DropObject(obj as dragitem)
>   dim f as folderItem
>   if obj=folderitemavailable then
>       f=obj
>   end if
> end sub

> It gives me the 'type mismatch' error for 'f=obj'.  what's wrong?

That should be:
sub DropObject(obj as dragitem)
  dim f as folderItem
  if obj.folderitemavailable then
      f=obj.folderitem
  end if
end sub

IIRC, anyways. I haven't used drag 'n drop for awhile.

-Owen



Fri, 11 Jun 2004 07:50:21 GMT  
 dragItems and resourceForks

on 12/23/01 6:50 PM:

Quote:


>> Okay, now how do I make sure obj is a folderItem?  I have this right now:

>> sub DropObject(obj as dragitem)
>> dim f as folderItem
>> if obj=folderitemavailable then
>> f=obj
>> end if
>> end sub

>> It gives me the 'type mismatch' error for 'f=obj'.  what's wrong?

> That should be:
> sub DropObject(obj as dragitem)
> dim f as folderItem
> if obj.folderitemavailable then
> f=obj.folderitem
> end if
> end sub

> IIRC, anyways. I haven't used drag 'n drop for awhile.

> -Owen

For those of you out there who have used the 'FileIcon' plugin, can you help
me?  this is what I have in the drop object event of a canvas:

sub DropObject(obj as dragitem)
    dim f as folderItem
    dim p as picture
    if obj.folderitemavailable then
        f=obj.folderitem
        p=fileIcon(f,32,32,0)
        me.backdrop=p
    end if
end sub

There are no errors, just it doesn't get the picture I want.  Can anybody
help?  thanks

-Tyler Denniston



Fri, 11 Jun 2004 21:37:37 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Working with a dragItem's folderItem property

2. DragItem HELP !

3. FolderItem.ResourceFork resfNum How ?

4. Writing to the resourcefork

5. ResourceFork

6. Resourceforks

7. Resourcefork help

8. How do create a File and add ResourceForks

9. Problems with ResourceFork Class

10. Using App.ResourceFork HELP!

 

 
Powered by phpBB® Forum Software