Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop down does not show real text BUT [object Object] #656

Open
T-San001 opened this issue Jan 6, 2020 · 11 comments
Open

Drop down does not show real text BUT [object Object] #656

T-San001 opened this issue Jan 6, 2020 · 11 comments
Assignees

Comments

@T-San001
Copy link
Contributor

T-San001 commented Jan 6, 2020

With the following markup/function declaration, the drop down does not show

001: Partner A
002: Partner B
003: Partner C

Instead, shows the following.

[object Object]
[object Object]
[object Object]

=====================================================

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.apache.org/royale/mx"
xmlns:s="library://ns.apache.org/royale/spark">
fx:Script
<![CDATA[

		import mx.collections.ArrayCollection;

		public function getPartners():ArrayCollection{
			var source:Array = [
									{'id':1, value:'001: Partner A'},
									{'id':2, value:'002: Partner B'},
									{'id':3, value:'003: Partner C'}
			]

			return new ArrayCollection(source);
		}

	]]>
</fx:Script>
	<s:Group>
		<s:Button x="1813" y="1034" width="80" height="26" label="Return" tabIndex="90"/>
		<s:Panel id="pa" x="19" y="134" width="1324" height="100" title="Search Condition">
			<s:Label id="partner" x="58" y="24" width="100" height="20" color="#000000" text="Partner Name:"/>
			<s:DropDownList id="partnerNameList" x="189" y="22" width="199" height="24" tabIndex="75" requireSelection="true"
							dataProvider="{getPartners()}" labelField="value"/>
			<s:Label x="430" y="27" text="Plan ID:"/>
			<s:TextInput id="insurancePlanSearchId" x="554" y="22" width="119" tabIndex="15"/>
			<s:Button id="searchBtn" x="1116" y="18" width="80" height="26" tabIndex="20" label="Search"/>
		</s:Panel>
	</s:Group>

</s:Application>

@yishayw
Copy link
Contributor

yishayw commented Jan 7, 2020

This is working for me. Are you using the nightly build?

@T-San001
Copy link
Contributor Author

T-San001 commented Jan 7, 2020

Yishay, thanks for your taking time.
I used almost the latest JS only version (January 6, 2020).

May be, my build options are not appropriate. Would you please advise me your build way?
I'm attaching my asconfig.json for your reference.
asconfig.txt

@yishayw
Copy link
Contributor

yishayw commented Jan 8, 2020

Try changing

"config": "royale",

to

"config": "flex",

This should tell the compiler to use the emulation components.

@T-San001
Copy link
Contributor Author

T-San001 commented Jan 8, 2020

Yishay, thank.

I changed as advised, however, no change in the output.

@yishayw
Copy link
Contributor

yishayw commented Jan 8, 2020

Oops, I was running the wrong example. I can reproduce it now.

@yishayw yishayw self-assigned this Jan 8, 2020
yishayw added a commit that referenced this issue Jan 9, 2020
@yishayw
Copy link
Contributor

yishayw commented Jan 9, 2020

Should work with 20b0b89

@yishayw yishayw closed this as completed Jan 9, 2020
@yishayw yishayw reopened this Mar 27, 2020
@yishayw
Copy link
Contributor

yishayw commented Mar 27, 2020

Looks like 20b0b89 was removed with 19124aa .

@aharui , was that intentional? It seems to have regressed.

@yishayw
Copy link
Contributor

yishayw commented Mar 28, 2020

Oh, this test case is actually working. I'll try to come up with a different one that shows the problem.

@yishayw
Copy link
Contributor

yishayw commented Mar 28, 2020

Looks like the initializer for mx:ComboBox's dropdown does not have its labelField set in time.

@aharui
Copy link
Contributor

aharui commented Mar 29, 2020

What does the new test case look like?

@yishayw
Copy link
Contributor

yishayw commented Mar 29, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants