Xojo Conferences
XDCMay2019MiamiUSA

Re: [MBS] Images in subfolders (was:no subject) (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] 4.0dr5
Next thread: [MBS] how to detect (x-plat) the default browser?


Re: [MBS] (no subject)   -   Christian Schmitz
  Re: [MBS] Images in subfolders (was:no subject)   -   Christopher Rosado
   Re: [MBS] Images in subfolders (was:no subject)   -   Christian Schmitz
    Re: [MBS] Images in subfolders (was:no subject)   -   Christopher Rosado
     Re: [MBS] Images in subfolders (was:no subject)   -   Christian Schmitz

Re: [MBS] Images in subfolders (was:no subject)
Date: 23.01.04 20:01 (Fri, 23 Jan 2004 14:01:47 -0500)
From: Christopher Rosado
Sorry Christian!

I Was referencing your run method code in "Slideshow for Erik". I don't
fully understand your code (yet) but am learning bit by bit.

From my original post:
One particular piece I'm trying to better understand is Christian's
indexing of images:
dim i,c as integer
dim f as FolderItem

c=g.Count
for ito c
f=g.TrueItem(i)

if f<>nil and f.Directoryúlse and f.IsPictureFileMBS then
files.Append f
end if
next

index getnext 1
showcurrent

What would have to be done to index images in subfolders as well?

--Christopher

On Jan 23, 2004, at 1:34 PM, Christian Schmitz wrote:

> Christopher Rosado <<email address removed>> wrote:
>
>> Hi All,
>>
>> I've been going through some of Christian's examples, particularly his
>> slideshow, to gain a better understanding of his code, plugin use, and
>> RB in general.
>
> Which example is this?
> (I've got over 400)
>
> Mfg
> Christian
>
> --
> Six thousand functions in one REALbasic plug-in. The MBS Plugin.
> <http://www.monkeybreadsoftware.de/realbasic/plugins.html>
> --
> Web8REALbasic mailing list
> <email address removed>
> http://mail.huynh.de/mailman/listinfo/web8realbasic
>

-

Re: [MBS] Images in subfolders (was:no subject)
Date: 24.01.04 00:43 (Sat, 24 Jan 2004 00:43:07 +0100)
From: Christian Schmitz
Christopher Rosado <<email address removed>> wrote:

> Sorry Christian!
>
> I Was referencing your run method code in "Slideshow for Erik". I don't
> fully understand your code (yet) but am learning bit by bit.
>
> What would have to be done to index images in subfolders as well?

You have to put the for loop into a method (g as parameter) and call it
from there.
And if you find a directory you need to call it again recursively with f
as parameter.

Mfg
Christian

Re: [MBS] Images in subfolders (was:no subject)
Date: 26.01.04 16:30 (Mon, 26 Jan 2004 10:30:34 -0500)
From: Christopher Rosado
Hi Christian-

Thanks for your response. I spent the better part of the weekend trying
to figure this out to no avail.
Could you give me a little more to go on or, better yet, direct me to
an example of this?

Much appreciated,

--Christopher

On Jan 23, 2004, at 6:43 PM, Christian Schmitz wrote:

> Christopher Rosado <<email address removed>> wrote:
>
>> Sorry Christian!
>>
>> I Was referencing your run method code in "Slideshow for Erik". I
>> don't
>> fully understand your code (yet) but am learning bit by bit.
>>
>> What would have to be done to index images in subfolders as well?
>
> You have to put the for loop into a method (g as parameter) and call it
> from there.
> And if you find a directory you need to call it again recursively with
> f
> as parameter.
>
> Mfg
> Christian
>
> --
> Six thousand functions in one REALbasic plug-in. The MBS Plugin.
> <http://www.monkeybreadsoftware.de/realbasic/plugins.html>
> --
> Web8REALbasic mailing list
> <email address removed>
> http://mail.huynh.de/mailman/listinfo/web8realbasic
>

Re: [MBS] Images in subfolders (was:no subject)
Date: 26.01.04 20:11 (Mon, 26 Jan 2004 20:11:28 +0100)
From: Christian Schmitz
Christopher Rosado <<email address removed>> wrote:

> Hi Christian-
>
> Thanks for your response. I spent the better part of the weekend trying
> to figure this out to no avail.
> Could you give me a little more to go on or, better yet, direct me to
> an example of this?

The changes are:

Sub Checkfolder(g as folderitem)
dim i,c as integer
dim f as FolderItem

c=g.Count
for ito c
f=g.TrueItem(i)

if f<>nil then
if f.Directory then
Checkfolder f // call recursivly
elseif f.IsPictureFileMBS then
files.Append f
end if
end if
next
End Sub

and

Sub run(g as folderItem)
Checkfolder g

if UBound(files)then
MsgBox "No pictures in this folder!? ("+g.DisplayName+")"
close
Return
end if

index getnext 1
showcurrent
End Sub

I just moved the loop to a method so I can call it recursivly.

Mfg
Christian