How to dynamically add Radio items, and a page.

Discuss GUI programming with the RapaGUI plugin here
User avatar
airsoftsoftwair
Posts: 5668
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: How to dynamically add Radio items, and a page.

Post by airsoftsoftwair »

Ok, this seems like a RapaGUI bug. It seems to be related to the fact that the objects are to be inserted into a Pageview object. I was able to work around the problem by using another group child within the Pageview page. When doing it like that, the radio widget finally shows but unfortunately using this workaround seems to trigger another bug because now the layout of the sliders is wrong so I guess I need to fix several things here ;)

Anyway, here's my code, at least it shows the radio widget with this code:

XML:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
	<window title="Rogue Football Cardgame" id="window" width="400">
		<vgroup>
			<vspace height="2"/>

			<pageview id = "mainpages">
				
				<hgroup title="Volume">
					<colgroup columns="2">
						<label>Sounds:</label>
						<slider min="0" max="100" level="50"/>

						<label>Music:</label>
						<slider min="0" max="100" level="50"/>
					</colgroup>
				</hgroup>
				
				<vgroup title="Test" id="test">
					
					<hgroup frametitle="Yo" id="testgroup" frame="true">					
						<rectangle/>
					</hgroup>
				</vgroup>
			</pageview>
			<hgroup>
				<button id="button_start">START</button>
			</hgroup>
		</vgroup>
	</window>
</application>
Hollywood code:

Code: Select all

@VERSION 9,0
@OPTIONS {DPIAware = True}
@REQUIRE "RapaGUI"

@FILE 1, "RapaGuiPart.xml"

moai.CreateApp(ReadString(1))
amigaresolutions = {}

RadioStart$ = [[
<radio id="printer">
<item>HP Deskjet</item>
<item>NEC P6</item>
<item>Okimate 20</item>
</radio>
]]

moai.CreateObject(RadioStart$, "testgroup")

moai.DoMethod("testgroup", "initchange")
moai.DoMethod("testgroup", "append", "printer")
moai.DoMethod("testgroup", "exitchange")

Repeat
	WaitEvent
Forever
Bugala
Posts: 1329
Joined: Sun Feb 14, 2010 7:11 pm

Re: How to dynamically add Radio items, and a page.

Post by Bugala »

Thanks. Good to know it was a bug and not a skill issue then. Was wondering that how cant I figure out how this thing works, but being a bug explains it.
Post Reply