Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Its too late for VFP 7 - but suggestions for VFP 8
Message
From
26/06/2001 10:18:14
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00522770
Message ID:
00523562
Views:
11
Jess,

Look at it this way:

In the LOAD I have:
THISFORM.oConn = CREATEOBJECT("ADODB.CONNECTION")

In the INIT I have:
IF FILE('developer.wxy')

THISFORM.oConn = NEWOBJECT('textbox')

ELSE

THISFORM.oConn = NEOBJECT('timer')

ENDIF

In a custom method of the form what would popup in the intellisense window for THISFORM.oConn? What if the custom method was called from the load as well as the init?

You can't compare VB and VFP intellisense in this way. Because VB can declare "module" level variables they can do this.

Thanks,
Dan


>Craig,
>>Intellisense is not designed to work at runtime.
>That's what I want to emphasize and I agree with you.
>
>>As for scoping, remember that VB is not object oriented. You're getting data hiding in VFP, which creates better OOP applications.
>So you are saying that VFP being full OOP makes intellisense limited for that matter?
>
>Look, I have a VFP DLL registered as OLE SERVER. This component have lots of methods and properties and so, I have this This.oCustomer = CREATEOBJECT("COMOLESERVER.CustomerCls") in the init or load event of the form. If intellisense is available anywhere in the editor, object property calling and manipulation is seamless specifically during development time. Dropping the class in the form will do, but it will not work as an OLE COM SERVER. Instead, it will be treated as a standard COM embedded in the EXE if project is compiled. I might be mistaken but that's what I understand.
>
>>>Folks,
>>>
>>>Nope. Intellisense @ runtime is obviously useless I think. I expect intellisense to work just like in VB. I want to use a single connection in the entire form or project for that matter. General declarations in VB makes every single variable (private or public) available in the entire form or project with intellisense poping up.
>>>
>>>What I am doing in VFP is that I was forced to create an object to handle the ado object making it handy:
>>>
>>>
>>>init of the form:
>>>This.oConn = CREATEOBJECT("ADODB.CONNECTION")
>>>This.oConn.Open("ADODB.CONNECTION")
>>>This.oConn.CursorLocation = 2
>>>
>>>and somewhere in the click event of a button or somewhere else:
>>>
>>>oRS = Thisform.oConn.Execute("SELECT blah...blah")
>>>IF !oRS.EOF()
>>>   oRS.MoveFirst
>>>   DO WHILE !oRS.EOF()
>>>       blah...blah...
>>>   ENDDO
>>>ENDIF
>>>
>>>and it works fine but without intellisense available.
>>>Typing This.oConn. should have intellisense anywhere in the form not only ADO but other activex.
>>>
>>>That make sense to me but I expect others may disagree.
>>>
>>>>Intellisense does not work in Runtime. If you think about it, it makes sense. How many end users are writing code?
>>>>
>>>>
>>>>>Craig,
>>>>>
>>>>>What am I missing here??
>>>>>
>>>>>In the INIT method of the form,
>>>>>
>>>>>LOCAL oObj AS ADODB.CONNECTION
>>>>>oObj.OPEN("bbfsdsn","sa","")
>>>>>oObj.CursorLocation = 2
>>>>>
>>>>>This one does not work at runtime although intellisense popups during development time and within init only. Meaning, oObj. has no more intellisense popup in other methods.
>>>>>
>>>>>oObj = CREATEOBJECT("ADODB.CONNECTION")
>>>>>oObj.OPEN("bbfsdsn","sa","")
>>>>>oObj.CursorLocation = 2
>>>>>
>>>>>This one works, but no intellisense available in any method.
>>>>>
>>>>>Please educate me.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform