Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Property is not found
Message
From
31/07/2019 02:24:32
 
 
To
27/07/2019 13:22:03
General information
Forum:
Visual Studio
Category:
Troubleshooting
Miscellaneous
Thread ID:
01669781
Message ID:
01669832
Views:
38
What is the reference to lo_line in CreateLines()? Is the error happening in lo_line.discount = a_soimp.disc?

In that case check in runtime with a messagebox to see which class/library that object is instantiated from.
PROCEDURE createlines
		*-- Create lines for each of the order lines in this file.

		        */BarryT 07-17-2019 12:37:17 PM START
		        lo_line.discount = a_soimp.disc
		        lo_line.discode = a_soimp.discode
		       
		        *\BarryT 07-17-2019 12:37:19 PM END 

	ENDPROC
>Thanks Thomas, I take your point.
>Below is the relevent code.
>Notice that "discount" is in the class constructor, and occurs in SetupData() and CreateLines() respectively.
>It does not complain in SetupData() which executes first but, but throws an exception in CreateLines() which executes immediately afterwards.
>But only in runtime does it throw an exception.
>
>
>DEFINE CLASS tdbflink AS tmessagelink
>
>	saveenvtries = 0
>	*/BarryT 07/17/2019 09:46:32 AM START 
>	discode = ""
>	discount = 0.00
>	*\BarryT 07/17/2019 09:46:35 AM END 
>	Name = "tdbflink"
>
>	PROCEDURE set
>		*-- we are on a new order, so create what we need, and save the info that we want
>		this.setupdata()
>		*-- Create all the necessary line items.
>		 this.createlines()
>
>	 ENDPROC
>
>
>	PROCEDURE setupdata
>		*-- Setupdata()
>		*-- get the standard stuff
>
> 		*/BarryT 07-17-2019 11:22:44 AM START
>		THIS.discode = Alltrim(a_soimp.discode)
>		THIS.discount = a_soimp.disc
>		*\BarryT 07-17-2019 11:22:45 AM END 
>
>	ENDPROC
>
>
>	PROCEDURE createlines
>		*-- Create lines for each of the order lines in this file.
>
>		        */BarryT 07-17-2019 12:37:17 PM START
>		        lo_line.discount = a_soimp.disc
>		        lo_line.discode = a_soimp.discode
>		        *\BarryT 07-17-2019 12:37:19 PM END 
>
>	ENDPROC
>
>ENDDEFINE
>
>
>Not just hypothetically, but observed was different behavior in debug due to either or both timing or event sequence/order differences.
>Extremely difficult withou seeing actual code to say, but improbable as reason in normal code.
>Testing in advance on existing object / property with type() possible.
>
>Impolite IMO not to reveal error creating code if asked often. Line 2 should be interpreted as another prod.
>
>>Just treat this as hypothetical question. Why would a property be available in dev mode ( Version(2)# 0 ) but not at runtime ( Version(2)= 0 )?
>>
>>I appreciate your kind attention to this my question and dilema, I restate the question:
>>I have class called "MyClass". It has two properties, "MyClass.Foo" defined as string and MyClass."Foo1" defined as a numeric (o mage to Calvin Hsia).
>>When i execute my app in dev mode and step through the code where these properties are assigned values:
>>MyClass.Foo = ""
>>MyClass.Foo1 = 0.00
>>life is good.
>>
>>Next i run the app without debugging assuming the best and these property assignments are made without issue.
>>
>>Now i am ready to execute my app in run time and my code fails at this line:
>>MyClass.Foo1 = 0.00
>>
>>The error is: "Property "Foo1 is not found."
>>
>>As I said, it is not a property.
>>
>>If it were a property then a reason would be, you are instantiating a different class than you thought. We really didn't see your actual code piece including instantiation of the object.
>>
>>>Your being too literal.
>>>Why would a property be there in dev mode but not at runtime?
>>>has that ever happened to you?
>>>
>>>>I have class called "MyClass". It has two properties, "Foo" defined as string and "Foo1" defined as a numeric (o mage to Calvin Hsia).
>>>>When i execute my app in dev mode and step through the code where these properties are assigned values:
>>>>Foo = ""
>>>>Foo1 = 0.00
>>>>life is good.
>>>>
>>>>Next i run the app without debugging assuming the best and these property assignments are made without issue.
>>>>
>>>>Now i am ready to execute my app in run time and my code fails at this line:
>>>>Foo1 = 0.00
>>>>The error is: "Property "Foo1 is not found."
>>>>
>>>>VFP 8 by the way.
>>>>
>>>>Any clues?
>>>
>>>
>>>Foo =  ""
>>>Foo1 = 0.00
>>>
>>>
>>>This is not a property assignment. You are assigning values to memory variables.
>>>
>>>
>>>Foo1 = 0.00 
>>>
>>>giving an error about property is nonsense, again it is not a property assignment but a memory variable. Are you sure those don't have a . (dot) prefix and included inside a with ... endwith block?
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform