function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cbyrnecbyrne 

Flex Toolkit r3_6 in Eclipse 3.2.2 - samples won't compile / run

Hi, I've been trying to use the Flex Toolkit for Apex as a plug-in to eclipse 3.2. I have tried versions R3_5[1] and R3_6 of the toolkit and I cannot get either to compile or run the sample salesforce.mxml. I have followed the quick start steps, but eclipse does not seem to be compiling the output files to the target directory and gives an error that it could not find the the file bin/salesforce.html.
 
There is one error which appears in eclipse for salesforce.mxml:
 
"1067: Implicit coercion of a value of type Array to an unrelated type String. FlexTest salesforce.mxml line 175"
 
which refers to the code line:
 
apex.retrieve(fields,"Account", ids,
Any thoughts?
 
Incidentally, I can't get the DayPlanner sample to run either.
 
Many thanks for any help, Chris
JBallJBall
Hi Chris,

I encountered this when I tried out the newer versions of the demo, too.  To fix a bug in the retrieve function, the retrieve function now takes a String as the first argument, but the demo hasn't been corrected.  The fields variable hasn't been changed from an Array of Strings to a single String of API field names (although not specified in the docs, it should be comma separated values).  To correct the error, simply change the variable declaration for fields in function retr_queryResult as i have:

var fields:String = 'Name';

the demo is a great tool for testing API calls by altering the code to suit your purposes. 

good luck,
John
Ron HessRon Hess
thanks, i've checked in the change to make the demo code work again, look for this in the next release of the lib, not sure when.

it's a simple change if you don't want to wait

looks like this now
    apex.retrieve("Name,BillingCity", "Account" ...

   

Message Edited by Ron Hess on 06-26-2007 01:29 PM

JashuganJashugan
I did this:


apex.retrieve(fields.join(','),"Account", ids,


BTW, is there anyway we can have some RSS feed regarding when the Flex Toolkit gets updated?
JBallJBall
fair enough. you could just use the toString method for class Array, as the default separator is a comma.  I made the explicit change in the demo code to reinforce that's how the call works now, but continuing to use an array has obvious advantages.
cbyrnecbyrne
Thanks for the replies. Much appreciated.
Ron HessRon Hess
in source forge you can sign up to be emailed when the toolkit releases are pushed.
JashuganJashugan
Found an RSS feed for file updates off the source forge page. Thanks.