Reputation: 247
I have a lot of strange info in my project in Flash Builder, why ?
"Type was not found or was not a compile-time constant" and "Access to undefined property", "Call to a possibly undefined method "
When i go to those class and make space " " and save, parrent class is ok, cleaning doesnt help for long time.
What is the problem ?
code-example:
import utils.DbUtils;
....
....
public function afterDbInit():void{
personsCollection = DbUtils.getAllObjects();
calendarViewId.loadDefaultCalendar();
}
but its not problem with CODE, it Flash Builder iSSUE, when i found DbUtils Class File, and opne it, made one space more and save, issue gone.
Project is compiling but i cannot use ctrl+lpm to go to the selected class file, compiler doesnt seen it
personsCollection = DbUtils.getAllObjects();
but after few debbuggging runs, this exlamation icon, and orange dot appear again
<fx:Script>
<![CDATA[
import database.DBConnection;
import database.Database;
import database.DatabaseEvent;
import database.DatabaseResponder;
i have all imports there
Upvotes: 5
Views: 3184
Reputation: 46
The approach to specify the full qualified class name worked also for me.
Thus, i change the class definition from
public class NumberInputBase extends TextInput
to
public class NumberInputBase extends mx.controls.TextInput
Upvotes: 0
Reputation: 21
I found something interesting about my "Access to Undefined Property" warnings that might help someone.
I was working on a module (ofcMtc.mxml and ofcMtc.as) of which I later decided I didn't like the design. So I renamed both the mxml and action script files to a different name in order to save off the work (ofcMtcOLD.mxml and ofcMtcOLD.as).
Then I recreated that same module using the original file names for both the mxml and action script.
Now keep in mind the OLD version still had a line of code in the mxml associating the original action script file name (mx:script source="ofcMtc.as") - and it was picking this up in the compiling - causing the warnings to appear in my new version.
By removing the mx:script code from the OLD mxml file - the warnings went away in the new version.
Hope this helps someone.
Upvotes: 2
Reputation: 1642
I had the same issue with a class that contains a public variable. It showed up as "undefined property" when trying to access the property even though the code works well. The Quick Fix / Assist (Ctrl + 1) asked to create the property, so i tabbed and pressed enter to have the code completion help me with that. The editor removed the warning, but did no changes to my class.
I'd say this is a weird bug, and just wanted to let anyone else that gets this issue that the Quick Fix / Assist can actually help out with this issue.
Upvotes: 1
Reputation: 13899
If DataBaseEvent is an external class, not the one bundled with Flex, you could try referencing it by it's full name.
For example, i got the same error with custom implementation of JSON (package vk.api.serialization.json)
I had to change all lines like
JSON.encode(data)
to
vk.api.serialization.json.JSON.encode(data)
It helped.
Upvotes: 0
Reputation: 25489
You haven't imported the DatabaseEvent type. On a Windows PC, Ctrl+Shift+O should organise your imports.
Upvotes: -1