As a matter of fact, it does. Well, its super-class does.

org.apache.flex.jquery.staticControls.RadioButton extends
org.apache.flex.html.staticControls.RadioButton which has initModel. I'll
try adding it to the jQuery version and have it call the super method.

-peter

On 5/7/13 11:26 AM, "Alex Harui" <aha...@adobe.com> wrote:

>Does your RadioButton have a method called initModel?  The base classes
>don't implement it by default.
>
>
>On 5/7/13 7:38 AM, "Peter Ent" <p...@adobe.com> wrote:
>
>> I'm trying to programmatically create a RadioButton to test and create a
>> jQuery version. My ActionScript code works well:
>> 
>> 
>> public function createNewRadioButton() : void
>> 
>> {
>> 
>> var rb:RadioButton = new RadioButton();
>> 
>> rb.initModel();
>> 
>> rb.initSkin();
>> 
>> rb.text = "New Radio";
>> 
>> rb.groupName = "group1";
>> 
>> rb.x = radioXpos;
>> 
>> rb.y = 290;
>> 
>> rb.value = radioXpos;
>> 
>> this.addChild(rb);
>> 
>> radioXpos += 100;
>> 
>> }
>> 
>> However, after compiling with Falcon JX and running the Javascript
>>version,
>> this code causes the browser to complain "TypeError: rb.initModel is
>>not a
>> function". I guess I'm confused about how to bring the model from
>>ActionScript
>> over to Javascript. Since normal HTML <input type="radio"> elements do
>>not
>> require group management (on our part), I didn't need anything like
>>that when
>> I created the HTML RadioButton, but even without thinking about jQuery,
>> programmatically creating a RadioButton requires - I think - using
>> rb.initModel().
>> 
>> --peter
>
>-- 
>Alex Harui
>Flex SDK Team
>Adobe Systems, Inc.
>http://blogs.adobe.com/aharui
>

Reply via email to