Compilation on morphos

Find quick help here to get you started with Hollywood
delbourg
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Compilation on morphos

Post by delbourg » Wed Nov 08, 2017 10:26 am

I have managed to get my Hollywood program compiled on a pc and on a mac. Both use rapagui and I know where to place it in the directory. My question is associated with compilation on morphos running on a mac ppc. The question is in two parts.
1. Should I be using muiroyale or rapagui for morphos?
2. When I come to compiling it where do I place muiroyale or rapagui?
Sorry to be so dumb but I just could not figure out what to do. This shows I am a newbie.

User avatar
jPV
Posts: 141
Joined: Sat Mar 26, 2016 11:44 am
Location: RNO
Contact:

Re: Compilation on morphos

Post by jPV » Wed Nov 08, 2017 6:06 pm

1. I don't know if there is any performance difference, but otherwise I think it's just which happens to suit better for your project. If you already have a program using RapaGUI for other platforms, I guess it'd be easier to use the same code for MorphOS too. There might be some more operating system specific functions in MUI Royale, so at least I've been using it for the projects I don't intent to compile for non-amigaish platforms...

2. Plugins can be placed in SYS:Libs/Hollywood/ directory, and then they are always available no matter if you compile a program or run the script. Weren't they even copied there if you install the plugin with the installation script? They also do work if you have the plugin file in the same directory where you run the program, so you don't need to worry about installation on users' systems, just have the plugin file in the same dir with the executable. Here's the documentation link.

delbourg
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Compilation on morphos

Post by delbourg » Thu Nov 09, 2017 10:01 am

Thank you very much for your reply. But I am still unclear what version of rapagui I should download. There are columns for mac os x, windows, linux, android, etc. but no column for morphos. I can only assume it is for Amiga as that is the closest to morphos. Am I correct?

Thanks for telling me what directory I have to place rapagui.

p-OS
Posts: 89
Joined: Tue Nov 02, 2010 12:56 am

Re: Compilation on morphos

Post by p-OS » Thu Nov 09, 2017 12:57 pm

Yes, you have to download Amiga Archive. Despite Windows Archive this one includes an Installation Skript. At Installation it will ask you for which Amiga flavour (Amiga OS 3 68K, Amiga OS 4, MorphOS, AROS) you'd like to install.

delbourg
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Compilation on morphos

Post by delbourg » Fri Nov 10, 2017 9:39 am

Thank you all for your advice. This is a great forum.

zylesea
Posts: 169
Joined: Tue Feb 16, 2010 1:50 am
Location: Westfalen/Germany
Contact:

Re: Compilation on morphos

Post by zylesea » Sun Nov 12, 2017 5:31 pm

delbourg wrote: 1. Should I be using muiroyale or rapagui for morphos?

I switched from MUI Royale to RapaGUI. MUI Royale is a bit more finetuned to max out MUI features/functions, but I think, for most programs RapaGUI is just fine and hence I switched to that.

delbourg
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Compilation on morphos

Post by delbourg » Tue Nov 14, 2017 10:53 am

I am now in a quandary. When I open my program (which is basically a treeview) through Hollywood in morphos, I get no complaints. But all the writing and columns have disappeared. This is a complete mystery because the identical program works fine on a pc or a mac.

I do not understand what is going on because if i run the treeview example program with rapagui there is no such problem. I suspect the morphos version is not reading the asociated xml file properly.

p-OS
Posts: 89
Joined: Tue Nov 02, 2010 12:56 am

Re: Compilation on morphos

Post by p-OS » Tue Nov 14, 2017 1:03 pm

You are talking 'bout the XML file defining your GUI ?
Normally if it is corrupt, Hollywood would output an error message.

Don't know how you transfered your files. Maybe an automatic character set conversion occured ? The content of the file and the character set mentioned in the XML Header have to fit together (default is UTF-8).

User avatar
airsoftsoftwair
Posts: 2531
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Compilation on morphos

Post by airsoftsoftwair » Wed Nov 15, 2017 10:15 pm

delbourg wrote:I suspect the morphos version is not reading the asociated xml file properly.
In that case there would be an error message.

If you can't work out what's going wrong there, strip the program down to as few lines as possible and post the code here. Then I can take a look.

delbourg
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Compilation on morphos

Post by delbourg » Thu Nov 16, 2017 6:23 am

Here is my xml file...

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
					
	<window id="win" title="Treeview" height="600" width="800">
		<vgroup>
			<treeview id="tv" hrules="True" vrules="True">
				<column title="BIRIOTI ANCESTRY" width="200"/>
				<column title="Lifespan" width="100"/>
				<column title="Married" width="100"/>
				<column title="Photograph" width="100"/>
				<column title="Information" width="100"/>
				
						<node name="GREATGRANDPARENTAGE">
							<leaf>
								<item>Senior Birioti</item>
								<item>(18??-18??)</item>
								<item>Senora Benghiat</item>
								<item>-</item>
								<item>-</item>
							</leaf>
								<node name="GRANDPARENTAGE">
									<leaf>
										<item>Albert Birioti</item>
										<item>(188?-196?)</item>
										<item>Grazia Picciotto</item>
										<item>Grazia1955.jpg</item>
										<item>AlbertInfo.doc</item>
									</leaf>	
									<leaf>
										<item>Julia Barki...</item>
										<item>(189?-19??)</item>
										<item>-</item>
										<item>FamilyGroup1946.jpg</item>
										<item>JuliaInfo.doc</item>
									</leaf>	
									<leaf>
										<item>Fortunee Birioti</item>
										<item>(189?-19??)</item>
										<item>-</item>
										<item>BarkiFamilyGroup1956.jpg</item>
										<item>FortuneeInfo.doc</item>
									</leaf>
									<leaf>
										<item>Rosa Birioti...</item>
										<item>(1890-1970)</item>
										<item>Jacques Barki</item>
										<item>JacquesRosa.jpg</item>
										<item>RosaBInfo.doc</item>
									</leaf>
										<node name="PARENTAGE">
											<leaf>
												<item>Edgard Raphael Barki...</item>
												<item>(19??-20??)</item>
												<item>Victorine X</item>
												<item>-</item>
												<item>see BARKI</item>
											</leaf>
											<node name="COUSINS">
												<leaf>
													<item>  Jack Barki</item>
													<item>(1969-20??)</item>
													<item>Shari X</item>
													<item>-</item>
													<item>see BARKI</item>
												</leaf>	
												<leaf>
													<item>  Rosita Barki</item>
													<item>(19??-20??)</item>
													<item>Daniel Nigbur</item>
													<item>-</item>
													<item>see BARKI</item>
												</leaf>																				
											</node>		
											<leaf>
												<item>Isaac Barki...</item>
												<item>(19??-20??)</item>
												<item>Nellie Pereira</item>
												<item>-</item>
												<item>see BARKI</item>
											</leaf>
											<node name="COUSINS">
												<leaf>
													<item>  Jacquie Barki</item>
													<item>(1969-20??)</item>
													<item>X Arcaro</item>
													<item>-</item>
													<item>see BARKI</item>
												</leaf>	
												<leaf>
													<item>  Loretta Barki</item>
													<item>(19??-20??)</item>
													<item>Bruce Patterson</item>
													<item>-</item>
													<item>see BARKI</item>
												</leaf>																				
											</node>		
											<leaf>
												<item>Yvette Barki...</item>
												<item>(1912-2002)</item>
												<item>Sabatino Delbourgo</item>
												<item>Yvette.jpg</item>
												<item>see BARKI</item>
											</leaf>
										</node>	
									<node name="PRESENTDAY">
										<leaf>
											<item>Roger Delbourgo...</item>
											<item>(1937-20??)</item>
											<item>Francoise Valois</item>
											<item>-</item>
											<item>see ISAACDEL</item>
										</leaf>	
										<node name="NEPHEWS">
											<leaf>
												<item>  Gerald Delbourgo</item>
												<item>(1970-20??)</item>
												<item>Alison X</item>
												<item>-</item>
												<item>see ISAACDEL</item>
											</leaf>											
										</node>
										<leaf>
											<item>Rita Delbourgo...</item>
											<item>(1945-20??)</item>
											<item>Jean Charlatte</item>
											<item>-</item>
											<item>see ISAACDEL</item>
										</leaf>
										<node name="NEPHEWS">
											<leaf>
												<item>  Patrick Charlatte</item>
												<item>(1969-20??)</item>
												<item>-</item>
												<item>-</item>
												<item>see ISAACDEL</item>
											</leaf>	
											<leaf>
												<item>  Brice Charlatte</item>
												<item>(1971-20??)</item>
												<item>-</item>
												<item>-</item>
												<item>see ISAACDEL</item>
											</leaf>																				
										</node>										<leaf>
											<item>Robert Delbourgo...</item>
											<item>(1941-20??)</item>
											<item>Elizabeth Mary Wilkinson</item>
											<item>-</item>
											<item>see ISAACDEL</item>
										</leaf>	
									</node>	
									<node name="PROGENY">
										<leaf>
											<item>Tino Delbourgo</item>
											<item>(1969-20??)</item>
											<item>-</item>
											<item>-</item>
											<item>-</item>
										</leaf>	
										<leaf>
											<item>Daniel Delbourgo</item>
											<item>(1971-20??)</item>
											<item>Kathrine Roberts</item>
											<item>-</item>
											<item>-</item>
										</leaf>	
									</node>																			
						</node>	
					</node>			
			</treeview>
			
			<hgroup>
				<button id="collapse">Collapse</button>
				<button id="expand">Expand</button>
				<button id="Photo">View Photo</button>
				<button id="Info">View Information</button>
				<button id="Close">Close window</button>
			</hgroup>
		</vgroup>
	</window>
</application>
And here is my hws file...

Code: Select all

/****************************************************************
**                                                             **
** Name:        WilkinsonTreeview                              **
** Author:      Robert Delbourgo                               **
** Version:     1.0                                            **
** Date:        05/09/17                                       **
** Interpreter: Hollywood 6.1                                  **
** Licence:     Sample program                                 **
** Function:    Demonstrates creation of a geneological        **
**              with multiple columns, based on GRANDPARENTAGE **
**                                                             **
**                                                             **
****************************************************************/

/*
** Make sure we have at least Hollywood 6.1!
*/
@VERSION 6,1

/*
** This script requires the RapaGUI plugin
*/
@REQUIRE "RapaGUI"

/* Function for extracting items at a node, separated by symbol | */
Function p_ExtractItems(id$)
    Local found, t = moai.DoMethod(id$, "GetEntry", "Active", "Active")
   	If found = True
 		e$ = IIf(t.Node = True, "+", "") .. Concat(t.items, "|")	
   	EndIf	
EndFunction


/* Function for parsing the five items at a node */
Function p_ParseItems(MyString$)
	e1 = FindStr(MyString$, "|", 0)
	Item1$ = LeftStr(MyString$, e1)
	MyString$ = RightStr(MyString$, StrLen(MyString$)-e1-1)
	e2 = FindStr(MyString$, "|", 0)
	Item2$ = LeftStr(MyString$, e2)
	MyString$ = RightStr(MyString$, StrLen(MyString$)-e2-1)
	e3 = FindStr(MyString$, "|", e2+1)
	Item3$ = LeftStr(MyString$, e3)
	MyString$ = RightStr(MyString$, StrLen(MyString$)-e3-1)
	e4 = FindStr(MyString$, "|", e3+1)
	Item4$ = LeftStr(MyString$, e4)
	Item5$ = RightStr(MyString$, StrLen(MyString$) -StrLen(Item4$)-1)
EndFunction

/*
** Handles all incoming events
*/
Function p_EventFunc(msg)
	
	Switch msg.action
	Case "RapaGUI":
		Switch msg.attribute
		Case "Pressed":
			Switch msg.id
			Case "collapse":
				moai.DoMethod("tv", "close", "active")
			Case "expand":
				moai.DoMethod("tv", "open", "active", True)
			Case "Photo":
				p_ExtractItems("tv")
				p_ParseItems(e$)
				If Item4$<>"" then Execute(Item4$)
			Case "Info":
				p_ExtractItems("tv")
				p_ParseItems(e$)
				If Item5$<>"" then Execute(Item5$)
			Case "Close":
				End			
			EndSwitch										
 		EndSwitch
	EndSwitch

EndFunction

; dynamically create GUI from an external *.xml file definition
moai.CreateApp(FileToString("BiriotiTreeview.xml"))

; listen to these events!
InstallEventHandler({RapaGUI = p_EventFunc})

moai.DoMethod("tv", "open", "root", True)

; main loop!
Repeat
	WaitEvent
Forever
I have not included the other files required to view the contents of course as they are private.
Why this works perfectly on pc and mac, but not on morphos has me stumped.

Post Reply