delete is a reserved keyword change it to Delete so it'll work
El 29/04/2009, a las 8:48, wouter99999 <firstname.lastname@example.org> escribió:
Hi, I've the following code:
showBusyCursor="true" destination="amfphp" source="node" id="node" >
<mx:method name="save" result="onSaved(event)"
<mx:method name="delete" result="onDeleted(event)"
But flexbuilder is complaining about the name="delete" (the save
method works fine). I cannot change the remote method name to
something else. What to do? Is this a bug in Flex? it is also
complaing about the corresponding node.delete(nid) in the
actionscript (delete turns blue and it gives a syntax error).
Apart from keywords, strictly speaking, it depends on the current class. You could name your member "selectedChild" in the following (though it would not be advisable), because Application does not have a member or method selectedChild. If you create a component with a root tag of ViewStack, you could not create your own variable selctedChild, unless perhaps you used override.
<?xml version="1.0" encoding="utf-8"?>
[Bindable] private var selectedChild:uint = 100;
Greg I don't think that's relevant here, I can even create an Application named Application, but a reserved keyword can't be used anywhere as a name for a var, class...
True, keywords are in a class of their own (no pun intended).
If you can't change the operation name, a work around might be to use ActionScript APIs to invoke the operation... something like this:
var op:Operation = myRemoteObject.getOperation("delete");