Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do this in .NET
Message
From
15/04/2005 14:33:35
Walter Meester
HoogkarspelNetherlands
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01004810
Message ID:
01005272
Views:
30
Hi Martin,

>>>Before going into much detail about the idea of converting the code, can you clearly explain what's the purpose of that? I'm not sure I'll apply the same approach at all.
>>
>>The idea is that when I design a form, I want to specify the object which receives focus when adding a record, just by setting a property to .T. I do want to avoid writing code doing that.

>Ok. I thought it was this, but I wanted to be sure that was the requirement. I'm sorry I didn't have time to go back to this, as I'm quite busy right now. Anyway, I see that some people offered interesting approaches already.

>My take, anyway, would be probably to handle this by raising an event to which the control you designated would subscribe (to keep your idea of just switching a bit on). I don't do so much user interface stuff on my own these days, so I didn't have to resolve this particular problem, but I could write the example later for you. I just have to find some time in the middle of a few tasks I have to finish first.

I like the idea of subscribing to an event. Of course, I have no idea how this should be implemented (time for MSDN again..), but I would guess that you can raise an event to which a control with the SetFocusAtAdd should subscribe. essentially publishing the event is very simple, however on the control side there is some more work to do. It then is not as simple as adding a property to a control and that is it, and this is a job you have to do for each class you add the property to. So still no silver bullet here, but personally I like the idea of subscribing to events.

Though I now have been fed with some ideas, I have to admit that I'm still finding the VFP solution to be more straightforward and more elegant, though OO purists might object to that (but I've never agreed to OO purist anyways < g > )

>In any case, Walter, I guess that as curious and motivated as you are, you should try learning .NET, not with a "conversion" idea, but just to get to new ideas that you always could apply to VFP or any other tool. I'm sure you'd enjoy the ride.

To be honest I'm not in the stage of learning .NET. I'm just looking for detailed information and knowledge on how this fits together. Esspecially the things that are related to the flexibility of VFP. The issue of static and dynamically typing is an interesting key in the discussion and has added more arguments to both sides of the coin. Seeing how .NET deals with static typed issues is interesting and valuable information for future judgement on what it means to do database development as I have envisioned.

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform