From: mp on
A million thanks to Ulrich for his awesome cFileSearch class!!!

I'm trying to make a little back up prog for my code files due to working on
laptop at home, desktop at work, and usb harddrive to port from one to the
other back and forth
so sometimes i'm working on any of the 3, and i'm trying to make a quick way
to make sure the lastest version is on all 3 drives.

so i search certain folders using cFileSearch in a class i created which
compares dates and raises events
RaiseEvent FirstFileNewer(Filename)
RaiseEvent SecondFileNewer(Filename)
etc
a form receives the events to display filename in appropriate listboxes
that works, but now i want more info to display in listview row

Ulrich gathers the data into a udt
'defined in public bas module
Public Type TFileData
Name As String
Size As Currency
Attributes As Long
CreationTime As Date
LastWriteTime As Date
LastAccessTime As Date
End Type

so i wanted to pass the whole udt in an event instead of just the filename
Event FirstFileNewerUDT(Firstname As String, INFO As TFileData)
!!!-can't do that - "Only public types in public objects can be used as arg
etc etc - error msg"

So i guess i'll just create a new little class to hold the elements and pass
the object instead of the udt???
or create the event to pass multiple args instead of just one object?

any thoughts on best practice?
thanks
mark



From: Dee Earley on
On 18/03/2010 12:52, mp wrote:
> A million thanks to Ulrich for his awesome cFileSearch class!!!
>
> I'm trying to make a little back up prog for my code files due to working on
> laptop at home, desktop at work, and usb harddrive to port from one to the
> other back and forth
> so sometimes i'm working on any of the 3, and i'm trying to make a quick way
> to make sure the lastest version is on all 3 drives.
>
> so i search certain folders using cFileSearch in a class i created which
> compares dates and raises events
> RaiseEvent FirstFileNewer(Filename)
> RaiseEvent SecondFileNewer(Filename)
> etc
> a form receives the events to display filename in appropriate listboxes
> that works, but now i want more info to display in listview row
>
> Ulrich gathers the data into a udt
> 'defined in public bas module
> Public Type TFileData
> Name As String
> Size As Currency
> Attributes As Long
> CreationTime As Date
> LastWriteTime As Date
> LastAccessTime As Date
> End Type
>
> so i wanted to pass the whole udt in an event instead of just the filename
> Event FirstFileNewerUDT(Firstname As String, INFO As TFileData)
> !!!-can't do that - "Only public types in public objects can be used as arg
> etc etc - error msg"
>
> So i guess i'll just create a new little class to hold the elements and pass
> the object instead of the udt???
> or create the event to pass multiple args instead of just one object?

Can't you move the type into the class file?

I can never remember the limitations on classes and types until I come
accross them.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems
From: Dee Earley on
On 18/03/2010 13:02, Dee Earley wrote:
> On 18/03/2010 12:52, mp wrote:
>> A million thanks to Ulrich for his awesome cFileSearch class!!!
>>
>> I'm trying to make a little back up prog for my code files due to
>> working on
>> laptop at home, desktop at work, and usb harddrive to port from one to
>> the
>> other back and forth
>> so sometimes i'm working on any of the 3, and i'm trying to make a
>> quick way
>> to make sure the lastest version is on all 3 drives.

Or use DropBox :)
https://www.dropbox.com/referrals/NTI5MzE3MzE5

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems
From: mp on
I sent this at 8 am but it never showed up, i wonder if replying will show
up?

"mp" <nospam(a)thanks.com> wrote in message news:...
>A million thanks to Ulrich for his awesome cFileSearch class!!!
>
> I'm trying to make a little back up prog for my code files due to working
> on laptop at home, desktop at work, and usb harddrive to port from one to
> the other back and forth
> so sometimes i'm working on any of the 3, and i'm trying to make a quick
> way to make sure the lastest version is on all 3 drives.
>
> so i search certain folders using cFileSearch in a class i created which
> compares dates and raises events
> RaiseEvent FirstFileNewer(Filename)
> RaiseEvent SecondFileNewer(Filename)
> etc
> a form receives the events to display filename in appropriate listboxes
> that works, but now i want more info to display in listview row
>
> Ulrich gathers the data into a udt
> 'defined in public bas module
> Public Type TFileData
> Name As String
> Size As Currency
> Attributes As Long
> CreationTime As Date
> LastWriteTime As Date
> LastAccessTime As Date
> End Type
>
> so i wanted to pass the whole udt in an event instead of just the filename
> Event FirstFileNewerUDT(Firstname As String, INFO As TFileData)
> !!!-can't do that - "Only public types in public objects can be used as
> arg etc etc - error msg"
>
> So i guess i'll just create a new little class to hold the elements and
> pass the object instead of the udt???
> or create the event to pass multiple args instead of just one object?
>
> any thoughts on best practice?
> thanks
> mark
>
>
>


From: Nobody on
"mp" <nospam(a)thanks.com> wrote in message
news:uyUbzXrxKHA.2432(a)TK2MSFTNGP04.phx.gbl...
>I sent this at 8 am but it never showed up, i wonder if replying will show
>up?

It showed up for me using ms news server. There are 2 replies by Dee Earley.

news://msnews.microsoft.com/microsoft.public.vb.general.discussion