PDA

View Full Version : Delphi XE and TMS iPhone Controls



ehp_kz6597
پنج شنبه 17 شهریور 1390, 10:30 صبح
Delphi XE and TMS iPhone Controls
Delphi XE includes IntraWeb XI, a third-party WYSIWYG web development framework.TMS Software (http://www.tmssoftware.com/) offers a number of IntraWeb components, including a special TMW IntraWeb iPhone controls pack, which we’ll cover here for iPhone and iPad web application development.
TMS IntraWeb iPhone Controls Pack
For this section, I’ve used version v1.5.0.0 (Jan 27, 2011) of the TMS IntraWeb iPhone Controls pack, available from http://www.tmssoftware.com/site/tmsiwiphone.asp.These controls can work with IntraWeb 10.0.x and 11.0.x, and work with Delphi 7, 2006, 2007, 2009, 2010 and XE.Obviously, I’ll use them with IntraWeb XI in Delphi XE here.
After installation, the TMS IW iPhone components can be found in the Tool Palette of Delphi XE with the following alphabetical list of component names and icons:

http://www.drbob42.com/gif/examnD4d.png All components have the TTIWiPhone prefix in their classname. Below, I will first give a short description of each of these iPhone controls, before building a first little demo application showing these iPhone controls in practice.
After the first demo, which is just build to demonstrate the most important features and properties of the TMS IntraWeb iPhone controls, we’ll see a more useful example application for the iPhone: my weblog and the game of tic-tac-toe.
TTIWiPhoneButton
The TTIWiPhoneButton is a button in the iPhone style, with optionally rounded corners, which can respond to synchronous or asynchronous click events.Apart from Round, the button can also be Square or in the shape of a Back button.The TIWiPhoneButton can respond to the OnButtonClick but also the asynchronous OnAsyncButtonClick events.
TTIWiPhoneEmailLabel
The TTIWiPhoneEmailLabel is a special label control that will turn into a “hot” hyperlink if we assign values to the EmailAddress and optionally CCAddress, BCCAddress, Subject and Body properties.When you click on it during runtime, the standard iPhone e-mail application will be started, and all specified property values will be passed on to the e-mail application.
TTIWiPhoneFooter
The TTIWiPhoneFooter is a special footer control for the bottom of your iPhone form, which can hold a footer caption and optionally two images (left and right), for which you can write click events.
TTIWiPhoneGeolocation
The TTIWiPhoneGeolocation component can be used to determine the current location of the iPhone.It has one useful event: OnAsyncLocationRetrieved that can be used to provide feedback if the location is retrieved.Warning: if you have no or limited internet connection, then using this component will show down the rendering of the page!
TTIWiPhoneHeader
The TTIWiPhoneHeader is a special header control for the top of your iPhone form, which can contain a caption and two buttons (left and right), for which you can write click events, for either synchronously or asynchronously button clicks.
TTIWiPhoneList
The TTIWiPhoneList is a list control in the iPhone style (in standard list mode and settings mode), where each item can have an image, a value, a main caption and a subtext (notes).We can asynchronously insert or delete items from the list, and respond to click events in a synchronous and asynchronous way using OnItemClick, OnImageClick as well as OnAsyncItemClick and OnAsyncImageClick.Apart from these click events, there are also OnAsyncLoadExtraItems, OnAsyncExtraItemsLoaded, and OnRenderListItem events. The individual items of type TiPhonelistItem have Caption, Data (TStringList), Detail, Image, Name, Notes, Section and Value properties.The events are triggered at the parent side, passing the ItemIndex of the item or image that was clicked.
The detail information for the items can be shown using the TIWiPhonePageFlip component.
TTIWiPhoneLocationLabel
The TTIWiPhoneLocationLabel is a special label control that will turn into a “hot” hyperlink if we assign values to the predefined Location (Latitude and Longitude) and optionally Destination.When you click on it during runtime, the iPhone maps application will be started, showing your current location and optionally the destination.
TTIWiPhoneMenu
The TTIWiPhoneMenu is a special footer control that can contain a collection of menu items with images and text, plus the iPhone style status indicators.We can update the status of the menu items, and respond to a user click, both synchronous and asynchronous. The Items property of the TIWiPhoneMenu control holds the TiPhoneMenuItems which each contain properties for Caption, Image, IndicatorCaption, IndicatorVisible, Name, and SelectedImage.
The individual items do not have a click event of their own, but the parent TTIWiPhoneMenu has the OnItemClick or OnAsyncItemClick events, passing the ItemIndex of the button that was clicked (starting to count at 0).
TTIWiPhoneOnOffButton
The TTIWiPhoneOnOffButton is a special iPhone style button with an “On” mode and an “Off” mode, that can be displayed in three styles: normal, system and custom.We can use the asynchronous events to update the button and to respond to the click events.Using the OffCaption and OnCaption you can translate the Off and On captions on this button. The actual state of the TTIWiPhoneOnOffButton can be retrieved or set using the ButtonState property, which can be bsOff or bsOn.
TTIWiPhonePageFlip
The TTIWiPhonePageFlip is a control that can be used to flip between TIWiPhoneRegion controls, featuring asynchronous updates.Ideal in combination with the TIWiPhoneList component to provide details for a list item. The TTIWiPhonePageFlip has a FrontRegion and a BackRegion property.Both can be assigned to a TWIWiPhoneRegion control.Switching between the front region and the back region can be done using the SlideToFront and SlideToBack methods of the TTIWiPhonePageFlip, or by assigning arFront or arBack to the ActiveRegion property. The transition can be controlled using AnimationSpeed and AnimationType (which can be set to atDrop, atFlip, atSlide, atSwing or atTurn).
TTIWiPhonePhoneLabel
This is a special label control that will turn into a “hot” hyperlink if we assign a value to the TelephoneNumber property.When you click on it during runtime, the iPhone will make a call to the specified number.
TTIWiPhoneRegion
A region component that we can use to place IntraWeb and TMS iPhone controls, which automatically shows itself at the correct iPhone, iPod and iPad screen sizes. The TTIWiPhoneRegion has properties for AutoClientAlignAtRuntime, ClipRegion, Device (which can be set to iPhone or iPad), DevizeOrientation (oVertical or oHorizontal, although the iPhone and iPad will automatically cause the orientation to switch),
TTIWiPhoneScrollRegion
This is a special TIWiPhoneRegion component that offers iPhone style scrolling and scroll indicator, and also keeps the Header and Footer or Menu fixed, so only the content of the Region itself will scroll. Note that if you want to display a scrollable list of items, you should consider using a TTIWiPhoneList on a TTIWiPhoneRegion instead of using a TTIWiPhoneScollRegion.
TTIWiPhoneSMSLabel
This is a special label control that will turn into a “hot” hyperlink if we assign a value to the SMSNumber property.When you click on it during runtime, the iPhone will start an SMS message (initially empty) to the specified number.
TTIWiPhoneStyle
The TWITiPhoneStyle component is responsible for the style of the iPhone/iPad application, and has a number of useful properties that we should set. The BGColor and BGColorTo properties, default both set to $00D4CCC5 can be used to set the gradient background color of the page. The StartupImage can contain the URL for a splash screen that will be used on the iPhone or iPad when the application starts.Even more useful is the IconImage property which can be set to the URL of the icon that’s used if we place the IntraWeb application on the home screen (desktop) of the iPhone.Note that for best results you should use PNG files, and specify a URL that can be found by the client (i.e.do not use localhost).The images will be resolved when the application is started and cached (so if you change the remote image, it will take another startup for the splash screen to be changed for example).
TTIWiPhoneTrackbar
The TIWiPhoneTrackbas is an iPhone style horizontal trackbar, like a slider control, which can be updated asynchronously, and can produce both synchronous OnEndDrag and asynchronous events OnAsyncStartDrag, OnAsyncDrag and OnAsyncEndDrag.

ادامه دارد ...

لینک منبع و کد های نمونه : www.drbob42.com
(http://www.drbob42.com/examines/examinD4.htm) لینک صفحه دانلود : TMS IntraWeb iPhone Controls Pack (http://www.tmssoftware.com/site/tmsiwiphone.asp)
=================================

سلام (الان اینجوری شده که تو تلویزیون مجری دوساعت مطلب میگه بعد سلام میکنه . بد آموزی داشت )
من ندیدیم جایی در این مورد نوشته باشه که خروجی تولیدی چی هست ؟ کسی میدونه ؟ یعنی این کامپوننت رو نصب کردیم و کد رو نوشتیم حالا کامپایلش exe. هست ؟ یا فرمت وب ؟ یا فرمت های اجرایی ipad ؟
(فکر کنم نه ipad ، بتونه exe اجراکنه و نه دلفی (xe) بتونه خروجی وب بده ) اگه اشتباه فکر می کنم لطفا راهنمایی کنین . (-:

BORHAN TEC
جمعه 18 شهریور 1390, 01:21 صبح
دوست عزیز این کامپوننت هایی که معرفی کردید مبتنی بر تکنولوژی IntraWeb و یا همان VCL For the Web هستند. خروجی برنامه های مبتنی بر IntraWeb به صورت Exe و یا ISAPI DLL است که باید آنرا در یک سرور قرار دهید و سپس کاربر اگر به آن مراجعه کند می تواند آن صفحه اینترنتی را به صورت یک برنامه شبیه به برنامه های iPhone مشاهده کند. در واقع برنامه هایی که با IntraWeb تولید می شوند به صورت Web Application هستند و نه Desktop Application. در واقع هدف این کامپوننت ها ساخت Web Application هایی است که با iPhone سازگار باشند. البته باید به این نکته توجه داشته باشید که همه سرویس دهنده های وب از CGI Executable و ISAPI DLL پشتیبانی نمی کنند. اگر باز هم سوالی بود ما در خدمتیم.