[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Coroutines (Was: FasterGenerator (#66

Ross Bamford

2/16/2006 11:59:00 PM

On Thu, 2006-02-16 at 22:52 +0900, Jim Weirich wrote:
> Ross Bamford wrote:
> > Hi,
> >
> > Well, I've snapped a string on my guitar and my computer won't play MP3s
> > today for some reason,
>
> I've come to believe that having a backup set of guitar strings is
> nearly as important as having a backup for your hard disk.

I've been lulled by living two minutes walk away from a well stocked
music shop that, as it transpires, is closed Wednesday afternoon and
Thursday morning.

Definitely got a backup set now, though :)

--
Ross Bamford - rosco@roscopeco.REMOVE.co.uk



4 Answers

BeeJ

10/28/2013 10:42:00 PM

0

After serious thinking ObiWan wrote :
>
>> Doing that. See my last previous post for a little other Nothing
>> question.
>
> hmm... given that you DID NOT declare the form instance "as New" <g>
> what you asked is a no-brainer; the "modal" form will raise the
> unloading event right before being unloaded and the unload will
> complete as soon as you'll exit your event handler, so setting the
> reference to nothing isn't needed; then ok, if you want to ensure to
> clean up after yourself you may add some "set ... nothing" code inside
> your "main form" unload event

Maybe a little tutorial on different ways to instantiate a form then
how to make sure it is unloaded from memory when through with it would
be helpful.

All launched from frmMain.

i.e. use a form like this
(1)
Method
frmChild.Show

or
(2)
' Declarations
Private fChild As frmChild

' Method
Set fChild = New frmChild
fChild.Show

or
(3)
' Declarations
Private WithEvents fChild As frmChild

' Method
Set fChild = New frmChild
fChild.Show

or
(4)
Method
Dim fChild As New frmChild
fChild.Show

or ???

Then how to close each if it was Modal or non-modal?

How to clear each from memory?


BeeJ

10/29/2013 6:58:00 PM

0

Arne Saknussemm laid this down on his screen :
>>> hmm... given that you DID NOT declare the form instance "as New" <g>
>>> what you asked is a no-brainer; the "modal" form will raise the
>>> unloading event right before being unloaded and the unload will
>>> complete as soon as you'll exit your event handler, so setting the
>>> reference to nothing isn't needed; then ok, if you want to ensure to
>>> clean up after yourself you may add some "set ... nothing" code
>>> inside your "main form" unload event
>
>> Maybe a little tutorial on different ways to instantiate a form then
>> how to make sure it is unloaded from memory when through with it
>> would be helpful.
>
> Internet is that way --> and there you may find plenty of infos and
> tutorials, given that you'll use a bit of your time to search, read and
> understand; just to add a bit, you should consider a VB6 form like a
> class with a GUI this means that you may deal with a form just like you
> do with a class module (add and use properties, methods and events),
> sure, a Form may have a slightly different lifecycle since a user may
> decide to close it (it isn't possible with a class) but it shouldn't be
> difficult dealing with that

Oh. Show me a link or two to compares and contrasts the different
methods I outlined.


BeeJ

10/29/2013 7:07:00 PM

0

After serious thinking Arne Saknussemm wrote :
>>> hmm... given that you DID NOT declare the form instance "as New" <g>
>>> what you asked is a no-brainer; the "modal" form will raise the
>>> unloading event right before being unloaded and the unload will
>>> complete as soon as you'll exit your event handler, so setting the
>>> reference to nothing isn't needed; then ok, if you want to ensure to
>>> clean up after yourself you may add some "set ... nothing" code
>>> inside your "main form" unload event
>
>> Maybe a little tutorial on different ways to instantiate a form then
>> how to make sure it is unloaded from memory when through with it
>> would be helpful.
>
> Internet is that way --> and there you may find plenty of infos and
> tutorials, given that you'll use a bit of your time to search, read and
> understand; just to add a bit, you should consider a VB6 form like a
> class with a GUI this means that you may deal with a form just like you
> do with a class module (add and use properties, methods and events),
> sure, a Form may have a slightly different lifecycle since a user may
> decide to close it (it isn't possible with a class) but it shouldn't be
> difficult dealing with that

Also, I respect the gurus in this group more that the wild internet so
if I cannot find an answer on the web I come here. Even when I find an
answer I still may ask here for their sage advice.


Coder X

10/29/2013 11:32:00 PM

0


"BeeJ" <spamnot@nospam.com> wrote in message
news:l4p10q$ojj$1@speranza.aioe.org...

> Also, I respect the gurus in this group more that the wild internet so if
> I cannot find an answer on the web I come here. Even when I find an
> answer I still may ask here for their sage advice.

Ha! Translation: I found something I don't understand, because advanced
programming is lost on me, so I'll have my favorite list of suckers explain
it to me.