OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xmile message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Draft Specification Defaults


Here is the complete (I hope) list of defaults found in the draft XMILE standard, formatted in a XMILE <style> block.  Where the default could not be represented in the <style> block, I added a comment and in one place I made up a tag so I would not have to repeat all the defaults for all display objects.

From Bobby's comments, I am guessing Billy expanded these some - I did not carefully look at the defaults there.  Note that I specifically left out defaults for things like min and max because they really ought to be specified, usually with the range of the variable (not 0 and 1 and Bobby alluded to the other day).

In general, if there is no default in the Draft Specification, it is something
a) that is not required (and has no effect if not there, e.g., documentation), or
b) that needs to be specified as no generally useful default exists.

There are a number of "show" bools that could just as easily be "hide" bools, but note that show_name does not always default to true.  Indeed, soem defaults change based on the object being represented to reflect what is most common for that object.  [And then there is text-align which also changes - with very good reason - with the name position.]

There are also other bools that we could recast to default to false instead of true, but a couple that would lose their meaning if we did.

I did not observe that all integers could default to 0 with no ill effect.  In many cases, they do not want to be 0 by default as it would almost never be the correct value.  The purpose of the defaults is to avoid having to be pedantic about every single option so we want default values that match the most common case, not default values that make it simple to program.

Karim
<!-- a number of attributes have "none" as their defaults, i.e., that attribute does not exist, so would not appear here -->

<style>
	<sim_specs method="Euler" time_units="time" pause="INF" run_by="all">
		<dt reciprocal="false">1</dt>
	</sim_specs>
	
	<import type="CSV" enabled="true" frequency="automatic" orientation="vertical"/>
	
	<export type="CSV" enabled="true" frequency="automatic" orientation="vertical" interval="0">
		<table use_settings="false"/>
	</export>
	
	<model run="false"/>					<!-- why is run default opposite to the normal case? -->
	
	<stock autoexport="false">
		<conveyor discrete="false" batch_integrity="false" one_at_a_time="true" exponential_leak="false"/>
	</stock>
	
	<flow autoexport="false">
		<leak leak_start="0" leak_end="1"/>	<!-- why isn't leak_integers an attribute (false by default)? -->
	</flow>

	<aux autoexport="false" flow_concept="false"/>

	<gf type="continuous"/>
	
	<group run="false" locked="false"/>		<!-- same problem w/run; spec says locked default is true probably b/c iThink did that, but should be false -->

	<event_poster>
		<threshold direction="increasing" repeat="each">
			<event sim_action="pause"/>
		</threshold>
	</event_poster>
	
	<display page_rows="1" page_cols="1" orientation="portrait" page_order="row" show_pages="false" scroll_x="0" scroll_y="0" zoom="100.0">	<!-- page_width and page_height default to current printer settings -->
		<!-- size appears only if width and height do not -->
		<!-- text-align matches name position or is "left" if object has no name position -->
		<!-- border-color matches object's color (note this is not the same as matching the default color) -->
		<any_display_object size="medium" label_side="bottom" color="black" background="white" text-decoration="none"
				font-family="sans-serif" font_size="9" font_style="normal" font-weight="normal" font-color="black"
				border_style="solid" border-width="thin" padding="2" margin="2" z-index="0"/>
		<scale auto="false"/>
		<format scale_by="1" display_as="number" delimit_000s="false"/>	<!-- precision default is auto based on variable scale -->

		<stock label_side="top"/>
		<group locked="false" show_name="true" show_image="false"/>
		<connector type="normal"/>
		
		<stacked_container visible_index="0"/>
		<!-- time-series graphs only default "from" to STARTTIME and "to" to STOPTIME -->
		<graph type="time_series" locked="false" show_grid="true" plot_numbers="false" comparative="false"
				hide_detail="false" time_precision="0.01">
			<plot pen_width="1" pen-style="solid" show_y_axis="true"/>
		</graph>
		
		<table orientation="vertical" interval="1" report_balances="beginning" report_flows="instantaneous"
				locked="false" comparative="false" hide_detail="false" time_precision="0.01" wrap_text="false"
				header-font-family="sans-serif" header-font_size="9" header-font_style="normal" header-font-weight="normal"
				header-font-color="black" header-text-align="left" header-text-decoration="none" header-border-color="black"
				header-border_style="solid" header-border-width="thin" header-padding="2" header-margin="2">
			<item type="variable" text-align="right"/>
		</table>
		
		<numeric_display show_name="true" retain_ending_value="true"/>
		<!-- note show_name is FALSE by default unlike other cases - lamps do not have names (in general) -->
		<lamp show_name="false" show_number="true" size="large" retain_ending_value="true" flash_on_panic="true">
			<zones>
				<zone type="normal" color="black"/>
			</zones>
		</lamp>
		<gauge show_name="true" show_number="true" retain_ending_value="true" flash_on_panic="true"/>
			<zones>
				<zone type="normal" color="black"/>
			</zones>
		</gauge>
		
		<!-- slider and knob min/max default to variable's minimum and maximum values -->
		<slider show_name="true" show_number="true" show_min_max="true"/>
		<knob show_name="true" show_number="true" show_min_max="true"/>
		<switch show_name="true" switch_style="toggle" clicking_sound="false"/>
		<options layout="vertical" horizontal_spacing="2" vertical_spacing="2"/>
		<numeric_input show_name="true"/>
		<!-- list_input's column_width defaults to half the width of the list input -->
		
		<image size_to_parent="false"/>
		<video size_to_parent="false"/>
		<link zoom="100.0" to_black="false"/>
		<popup visible="false"/>
		<textbox appearance="opaque" vertical_scrollbar="false"/>
		<graphics_frame fill="none"/>
		<button appearance="opaque" style="square" clicking_sound="true">
			<menu_action all="false"/>	<!-- only for import_now and export_now menu actions -->
		</button>
	</display>
	
	<!-- interface includes all display options - the options below unique to the interface and would have to be generalized now -->
	<interface home_page="1">
		<simulation_speed>0</simulation_speed>
		<entity eqn_on="false"/>	<!-- value has default only if controlled entity is constant and then defaults to that value -->
	</interface>
</style>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]