Idle handlers and Text files

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Nov 6 08:06:54 EST 2007


Hi Jonathan,

It is recommended to use the send command instead of the idle handler.

on preOpenStack
   send "foo" to me in 0 millisecs
   pass preOpenStack
end preOpenStack

on foo
   -- do something here
   send "foo" to me in 200 millisecs
end foo

If the preOpenStack handler doesn't allow you to do this, you made a  
mistake somewhere, which needs to be corrected to avoid problems in  
the future.

If I understand you correctly, you can't send a mouseUp message  
automatically after opening the stack. That also means you made a  
mistake somewhere, which needs to be corrected. I don't think that  
using the idle handler, or send, is a good alternative in this case.  
My advice would be to find out why you can't send that mouseUp command.

The Finder simply updates open windows once in a while, including the  
desktop. It doesn't matter at which level in the hierarchy they are.  
However, if you add or remove a folder, the window gets updated  
instantly.  Not sure that it helps you, but if I do a test writing  
files to a folder or the desktop, I see the file appear instantly on  
my local disks, but not that quickly on network disks.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com


Op 6-nov-2007, om 9:14 heeft Jonathan Scott het volgende geschreven:

> Howdy,
> 	Thank you to everyone who pointed me towards my solutions.
> 	I still don't know exactly what is going on, but here are the  
> solutions I figured out after receiving your advice:
>
> openstack not functioning
> 	I just put in a new card with nothing on it (as the first card in  
> the stack).  In it's handler I put in an "on idle" handler that  
> does nothing but issue "send 'mouseUp'" statements and then moves  
> the user to another card afterward (to a place where there is no  
> "on idle" handler).
>
> text files not being written
> 	The big problem was that text files were actually being written.   
> I just couldn't find them for a few minutes sometimes.  Sometimes  
> I'd have to wait a very long time for the files to pop up on the  
> screen.  My assumption was that the finder's ability to update  
> every viewable portion of the hard drive can take a lot of time.   
> IOW, the file was there, it was just that the finder hadn't moved  
> in to update that part of the screen yet.  So, my workaround was to  
> have all files be saved to a folder on the desktop.  Because the  
> desktop is closer to the top of the hierarchical structure, it is  
> probably updated with much greater frequency.  I still don't know  
> if this is a good decision.  It works though, so I'm happy.
>
> 	Thanks again everybody.
>



More information about the use-livecode mailing list