NOT ready.doc_第1页
NOT ready.doc_第2页
NOT ready.doc_第3页
NOT ready.doc_第4页
NOT ready.doc_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Not Ready for Prime Time ComponentsThese components are experimental; the documentation is either missing or preliminary. Feel free to explore with them, but dont be surprised if they change in the near future.Table of Contents FusiontablesControl GameClient SoundRecorder VotingFusiontablesControlGoogle Fusion Tables lets you store, share, query and visualize data tables; this component lets you query, create, and modify these tables, using theFusion Tables SQL API.To use the component, define a query, call DoQuery to execute the query, and GotResult will hand you the result when it is ready.Note that you do not need to worry about encoding the query, but you do have to make sure it follows the syntax described in the reference manual, which means that things like capitalization for names of columns matters, and that single quotes need to be used around column names if there are spaces in them.The results of the query will generally be returned in CSV format, and can be converted to list format using the list from csv table or list from csv row blocks.PropertiesQuery: text (read-only)The query to send to the Fusion Tables API.For legal query formats and examples, see the Fusion Tables SQL API reference manual.Note that you do not need to worry about encoding the query, but you do have to make sure it follows the syntax described in the reference manual, which means that things like capitalization for names of columns matters, and that single quotes need to be used around column names if there are spaces in them.EventsGotResult(text result)Indicates that the Fusion Tables query has finished processing, with a result. The result of the query will generally be returned in CSV format, and can be converted to list format using the list from csv table or list from csv row blocks.MethodsDoQuery()Send the query to the Fusion Tables server.GameClientGameClient communicates with online game servers to support the implementation of multiplayer games. For information on the clients and servers and examples of games, see the MIT Masters Thesis by Bill Magnuson,Building Blocks for Mobile Gamesavailable at /misc/magnuson-meng-eecs-2010.pdf. There is an experimental game server running at , but this may be up only intermittently. For serious work, you will probably want to deploy your own game server on Google Appengine. The implementation is described in the thesis, and the code is available at /p/app-inventor-for-android/source/browse/#svn/trunk/app_inv_game_serverPropertiesInstanceId: text (read-only)The game instance id. Taken together,the game ID and the instance ID uniquely identify the game.InvitedInstances: list (read-only)The set of game instances to which this player has been invited but has not yet joined. To ensure current values are returned, first invoke GetInstanceLists.JoinedInstances: list (read-only)The set of game instances in which this player is participating. To ensure current values are returned, first invoke GetInstanceLists.Leader: text (read-only)The games leader. At any time, each game instance has only one leader, but the leader may change with time. Initially, the leader is the game instance creator. Application writers determine special properties of the leader. The leader value is updated each time a successful communication is made with the server.Players: list (read-only)The current set of players for this game instance. Each player is designated by an email address, which is a string. The list of players is updated each time a successful communication is made with the game server.PublicInstances: list (read-only)The set of game instances that have been marked public. To ensure current values are returned, first invoke GetInstanceLists.ServiceUrl: text (read-only)The URL of the game server.UserEmailAddress: text (read-write)The email address that is being used as the player id for this game client. At present, users must set this manually in order to join a game. But this property will change in the future so that is set automatically, and users will not be able to change it.EventsFunctionCompleted(text functionName)Indicates that a function call completed.GotMessage(text type, text sender, list contents)Indicates that a new message has been received.Info(text message)Indicates that something has occurred which the player should know about.InstanceIdChanged(text instanceId)Indicates that the InstanceId property has changed as a result of calling MakeNewInstance or SetInstance.Invited(text instanceId)Indicates that a user has been invited to this game instance.NewInstanceMade(text instanceId)Indicates that a new instance was successfully created after calling MakeNewInstance.NewLeader(text playerId)Indicates that this game has a new leader as specified through SetLeaderPlayerJoined(text playerId)Indicates that a new player has joined this game instance.PlayerLeft(text playerId)Indicates that a player has left this game instance.ServerCommandFailure(text command, list arguments)Indicates that a server command failed.ServerCommandSuccess(text command, list response)Indicates that a server command returned successfully.UserEmailAddressSet(text emailAddress)Indicates that the user email address has been set.WebServiceError(text functionName, text message)Indicates that an error occurred while communicating with the web server.MethodsGetInstanceLists()Updates the InstancesJoined and InstancesInvited lists. This procedure can be called before setting the InstanceId.GetMessages(text type, number count)Retrieves messages of the specified type.Invite(text playerEmail)Invites a player to this game instance.LeaveInstance()Leaves the current instance.MakeNewInstance(text instanceId, boolean makePublic)Asks the server to create a new instance of this game.SendMessage(text type, list recipients, list contents)Sends a keyed message to all recipients in the recipients list. The message will consist of the contents list.ServerCommand(text command, list arguments)Sends the specified command to the game server.SetInstance(text instanceId)Sets InstanceId and joins the specified instance.SetLeader(text playerEmail)Tells the server to set the leader to playerId. Only the current leader may successfully set a new leader.SoundRecorderMultimedia component that records audio.PropertiesnoneEventsAfterSoundRecorded(text sound)Provides the location of the newly created sound.StartedRecording()Indicates that the recorder has started, and can be stopped.StoppedRecording()Indicates that the recorder has stopped, and can be started again.MethodsStart()Starts recording.Stop()Stops recording.VotingThe Voting component communicates with a Web service to retrieve a ballot and send back users votes.The application should call the methodRequestBallot, usually in theInitializeevent handler, in order to get the ballot question and options from the Web service (specified by theServiceURLproperty). Depending on the response from the Web service, the system will raise one of the following three events:1. GotBallot, indicating that the ballot question and options were retrieved and the propertiesBallotQuestionandBallotOptionshave been set.2. NoOpenPoll, indicating that no ballot question is available.3. WebServiceError, indicating that the service did not provide a legal response and providing an error messages.After getting the ballot, the application should allow the user to make a choice from amongBallotOptionsand set the propertyUserChoiceto that choice. The application should also setUserIdto specify which user is voting. Often, this will be set to the propertyUserEmailAddress, which specifies the email address associated with the phone.Once the application has setUserChoiceandUserId, the application can callSendBallotto send this information to the Web service. If the service successfully receives the vote, the eventGotBallotConfirmationwill be raised. Otherwise, the eventWebServiceErrorwill be raised with the appropriate error message.PropertiesBallotOptionsThe list of ballot options.BallotQuestionThe question to be voted on.ServiceURLThe URL of the Voting serviceUserChoiceThe ballot choice to send to the server, which must be set beforeSendBallotis called. This must be one ofBallotOptions.UserEmailAddressThe email address associated with this device.UserIdA text identifying the voter that is sent to the Voting server along with the vote. This must be set beforeSendBallotis called.EventsGotBallot()Event indicating that a ballot was retrieved from the Web service and that the propertiesBallotQuestionandBallotOptionshave been set. This is always preceded by a call to the methodRequestBallot.GotBallotConfirmation()Event confirming that the Voting service received the ballot.NoOpenPoll()Event indicating that the service has no open poll.WebServiceError(text message)Event indicating that the communication with the Web service resulted in an error.MethodsRequestBallot()Send a request for a ballot to the Web service specified by the propertyServiceURL. When the completes, one of the following events will be raised:GotBallot,NoOpenPoll, orWebServiceError.SendBallot()Send a completed ballot to the Web service. This should not be called until the propertiesUserIdandUserChoicehave been set by the application.没有准备好总理时组件这些组件的实验;文档丢失或初步。随意与他们探讨,但并不感到惊讶,如果他们在不久的将来发生变化。目录表FusiontablesControlGameClientSoundRecorder投票FusiontablesControl谷歌融合表让您存储,共享,查询和可视化数据表;这个组件,您可以查询,创建和修改这些表,使用融合表SQL API。使用组件,定义查询,调用DoQuery来执行查询,并GotResult将让你的结果,当它准备好。请注意,您不必担心编码查询,但你有,以确保它遵循在参考手册中描述的语法,这意味着列事项的名称,如资本事情,需要使用单引号列名左右,如果有空格。查询的结果通常会在CSV格式返回,并且可以使用“从CSV表列表”或“从CSV行清单”块转换为列表格式。属性查询:文本(只读)查询发送到融合表API。法律查询格式和例子,看到了Fusion表SQL API参考手册。请注意,您不必担心编码查询,但你有,以确保它遵循在参考手册中描述的语法,这意味着列事项的名称,如资本事情,需要使用单引号列名左右,如果有空格。活动GotResult(文本结果)指示的融合表查询已完成处理结果。查询结果一般会在CSV格式返回,并可以使用“从CSV表列表”或“从CSV行清单”块转换为列表格式。方法DoQuery()融合表服务器发送查询。GameClientGameClient通信与网络游戏服务器,支持多人游戏的执行。有关客户端和服务器的信息和游戏的例子,请参阅条例草案“马格努森的麻省理工学院的硕士论文,在/misc/magnuson-meng-eecs-2010可用的手机游戏添砖加瓦。PDF。有一个实验性的游戏服务器在运行,但是这可能只是间歇性。对于严肃的工作,你可能会想要自己的游戏服务器上部署Google Appengine的。实施中描述的论断,代码可在/p/app-inventor-for-android/source/browse/SVN /中继/ app_inv_game_server属性INSTANCEID:文本(只读)本场比赛的实例ID。两者合计,游戏ID和实例ID唯一标识的游戏。InvitedInstances:列表(只读)尚未加入该球员已被邀请,但游戏的实例。为了确保当前值返回,首先调用GetInstanceLists。JoinedInstances:列表(只读)游戏实例,在这个球员参加。为了确保当前值返回,首先调用GetInstanceLists。负责人:文本(只读)游戏的领导者。在任何时候,每场比赛的实例只有一个领导,但领导者可能会随时间变化的。起初,领导者是游戏的实例的创建者。应用程序编写者确定领导者的特殊属性。更新领导者的价值是每一个成功的沟通是与服务器的时间。玩家:列表(只读)目前这个游戏实例的玩家。每个玩家所指定的电子邮件地址,这是一个字符串。球员名单更新每一个成功的沟通是与游戏服务器的时间。PublicInstances:列表(只读)游戏已标记的公共实例。为了确保当前值返回,首先调用GetInstanceLists。ServiceUrl:文本(只读)游戏服务器的URL。UserEmailAddress:文本(读写)这个游戏客户端的玩家ID正在使用的电子邮件地址。目前,用户必须设置手动,以加入游戏。但是,此属性将在未来改变,使自动设置,用户将无法改变它。活动FunctionCompleted(文本函数名)表示一个函数调用完成。GotMessage(文本类型,文本发件人列表,内容)表示,已收到新的消息。信息(文字信息)表示事情发生的球员应该知道。InstanceIdChanged(文本INSTANCEID)表示INSTANCEID财产已更改为调用MakeNewInstance或SetInstance的结果。邀请(文本INSTANCEID)指示用户已被邀请到这个游戏实例。NewInstanceMade(文本INSTANCEID)表示,成功一个新的实例创建后调用MakeNewInstance。NewLeader(文本战队最喜欢)表示这个游戏已经通过SetLeader指定一个新的领导人PlayerJoined(文本战队最喜欢)表示一个新的球员加入这个游戏实例。PlayerLeft(文本战队最喜欢)表示一个球员已经离开这个游戏实例。ServerCommandFailure(文本命令,列表参数)表示服务器命令失败。ServerCommandSuccess(文本命令,清单的答复)表示服务器命令成功返回。UserEmailAddressSet(文本EMAILADDRESS)表示用户的电子邮件地址已设置。WebServiceError(文本函数名,文本消息)指示,与Web服务器通信时发生错误。方法GetInstanceLists()更新的InstancesJoined和InstancesInvited清单。这个程序可以调用之前设置INSTANCEID的。GetMessages(文本类型,数量计数)获取指定类型的消息。邀请(文本playerEmail)邀请一个玩家到这个游戏实例。LeaveInstance()离开当前实例。MakeNewInstance(文本INSTANCEID,布尔makePublic)要求服务器创建一个新实例这个游戏。SendMessage消息(文本类型,列出收件人,列表内容)在收件人列表中的所有收件人发送加密消息。该消息将包括的内容列表。ServerCommand(文本命令,列表参数)将指定的命令发送到游戏服务器。SetInstance(文本INSTANCEID)设置INSTANCEID并加入指定的

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论