On Nov 25, 2006, at 6:35 AM, Rubber Chicken Software Co. wrote:

At 04:36 PM 11/23/2006, you wrote:

> I'm kind of hijacking this thread a bit (forgive me), but how do
> you make the Row highlighted BEFORE the CellClick event ends? I
> often have code in the CellClick that creates a delay, and I think
> the user would want to at least see that he selected SOMETHING,
> instead of waiting for some operation to finish.

You could put your code in the action event of a timer and it would
then run after the event is finished. You would set the Mode of the
timer to 1 during the CellClick event.

I've been trying to clean up my programming styles (encapsulate, code reuse, comment well, be clear about variable names, write functions with clear purposes and not make them too long, etc.), but it's so frustrating when the development environment forces you to write unclear hacky code just to workaround an IDE kink.

Is it a "kink" or a feature?

But your point is taken, at least your idea works, which is good, but it's frustrating to have to work at cross-purposes.

The nice thing about Visual Basic is that even though you have a BASIC language thing and interpreted code, you pretty much have a completely open-ended system to where, if the IDE restricts you from something, you can use the Windows API using Declares or write a C++ DLL to do what you want. In this instance, you'd simply send a Windows message to the listbox forcing the selection to be made early in the CelLClick code. (But Windows/VB draws the selection before the event code anyway.)

In that case I would consider that a negative aspect of VB. One would have to go back and erase the selection if one wanted code to execute before it is done. At least, in Rb, you have an option to do the built-in routines yourself, call declares and avoid the IDE's built- in routines by returning true. To me, the ability to handle all aspects of the event is one of the nice things in Rb. This is on Mac, however, as I am not that familiar with how Rb works in Windows in this instance.

With RB there isn't that flexability; perhaps it's a Mac problem that you don't have these type of events to control objects. VB tends to use Windows-standard controls, I don't kow, perhaps RB uses their own and they aren't open to the Mac API sections.

As I said above, you have the option of doing everything yourself or responding after the event.

You can also use properties to set the flow of your code after the event has finished.

What do you mean by that?

Basically setting your own custom property values during the CellClick event that would then be read in the Timer's Action event to determine how it should execute. This is because you cannot *easily* transfer parameters to the timer itself.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to