topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
he conseguido un iphone | Saludos
esta faltando este archivo [b:39qqxpdr]tabbar.prg[/b:39qqxpdr] |
he conseguido un iphone | [quote="Daniel Garcia-Gil":27kk5kps]Saludos
esta faltando este archivo [b:27kk5kps]tabbar.prg[/b:27kk5kps][/quote:27kk5kps]
Daniel,
subido! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
genial el script para crear IPAs, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Solucionado el rutado de eventos touchesBegan de views hijos.
Al definir el método, ya no es rutado el evento al padre (contenedor). En tutor07.prg puede comprobarse
Subido al SVN |
he conseguido un iphone | Implementado bChange en la clase TTabBar, samples/tutor07.prg lo usa <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Ahora solo nos queda crear varios views y cambiarlos desde el bChange del TabBar.
ya tenemos lo necesario... |
he conseguido un iphone | samples/tutor07.pg ya cambia views <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Nueva función mail para mandar correos desde el programa ....
[img:fg01wiyn]http://img513.imageshack.us/img513/3923/lafoto.png[/img:fg01wiyn]
Antonio , respecto a los dialogos modales encontre esto :[url:fg01wiyn]http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html[/url:fg01wiyn]
Saludos. |
he conseguido un iphone | Manuel,
Como haces para mostrar las pantallas capturadas de ese tamaño ? ImageShack muestra mas grande las mias
He leido ese articulo acerca de ejecución modal, pero parece que no serviria para MsgInfo()...
ó si... si cubrimos la ventana completa con un view previamente que sea modal... |
he conseguido un iphone | [quote="Antonio Linares":1uglv5nh]Manuel,
Como haces para mostrar las pantallas capturadas de ese tamaño ? ImageShack muestra mas grande las mias
He leido ese articulo acerca de ejecución modal, pero parece que no serviria para MsgInfo()...
ó si... si cubrimos la ventana completa con un view previamente que sea modal...[/quote:1uglv5nh]
Lo del tamaño de la captura viene ( supongo) marcado por el nº de pixeles de la pantalla del telefono . Me supongo tienes un iphone 4G retina mientras que el mio es un 3GS ...
De todas maneras al subir a imageshack tienes un enlace que pone resize justo encima del boton de envio que te permite escojer el tamaño a subir ...
Una idea es cubrir con un modal trasparente y luego lanzar el msginfo() , a ver que podemos hacer. |
he conseguido un iphone | [quote:24j6mhn4]Una idea es cubrir con un modal trasparente y luego lanzar el msginfo() , a ver que podemos hacer[/quote:24j6mhn4]
Si, lo he pensado. Pero al no ser modal el MsgInfo() la ejecución continuará y terminará el view modal ??? |
he conseguido un iphone | [quote="Antonio Linares":xah0276q][quote:xah0276q]Una idea es cubrir con un modal trasparente y luego lanzar el msginfo() , a ver que podemos hacer[/quote:xah0276q]
Si, lo he pensado. Pero al no ser modal el MsgInfo() la ejecución continuará y terminará el view modal ???[/quote:xah0276q]
Mientras no "mates" el view modal no deberia ¿ no? . Si colocamos la accion de cierre del view en el evento del boton de la Alert ( ya sea msginfo , o msgyesno ) , el view modal deberia seguir esperando su cierre , vamos eso sería lo logico , aunque con apple ... su lógica no es la nuestra <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> .
Saludos. |
he conseguido un iphone | ¿ Esa funcionando el tutor7 ? .Me está dando error al cambiar de tab y en principio tengo todo actualizado.mirar si podeis confirmarlo .
Saludos. |
he conseguido un iphone | Como no tengo acceso al repositorio desde donde estoy , os dejo aqui unas cuantas funciones para añadir ...
Son funciones curiosas y estan sin probar aún.
Funcion SetIdLETimer() y getIdleTimer() activa desactiva y mira el estado del autoreposo.
Función setproximimonitor() comprueba si el dispositivo tiene sensor de proximidad , sino lo tiene nos da un aviso , si lo tiene lo activa o desactiva segun el parametro pasado .
Funcion phoneCall() llama al número de telefono pasado como parametro ( ojo texto).
Saludos.
[code=fw:3ooepxkk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> SETIDLETIMER <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><span style="color: #000000;">[</span><span style="color: #000000;">[</span>UIApplication sharedApplication<span style="color: #000000;">]</span> setIdleTimerDisabled:<span style="color: #000000;">hb_parnl</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><span style="color: #000000;">]</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETIDLETIMER <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br />hb_retl<span style="color: #000000;">(</span> <span style="color: #000000;">[</span><span style="color: #000000;">[</span>UIApplication sharedApplication<span style="color: #000000;">]</span> isIdleTimerDisabled<span style="color: #000000;">]</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> SETPROXIMONITOR <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br />UIDevice *device = <span style="color: #000000;">[</span>UIDevice currentDevice<span style="color: #000000;">]</span>;<br />device.proximityMonitoringEnabled = YES;<br /><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span>device.proximityMonitoringEnabled == YES<span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><span style="color: #000000;">[</span> device setProximityMonitoringEnabled:<span style="color: #000000;">hb_parnl</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><span style="color: #000000;">]</span>;<br /><br /><span style="color: #000000;">}</span><br /><span style="color: #00C800;">else</span><br /><span style="color: #000000;">{</span><br /><span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Dispositivo sin sensor de proximidad"</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> PHONECALL <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> NSString *ctelf = <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> NSString alloc <span style="color: #000000;">]</span> initWithCString: <span style="color: #000000;">ISCHAR</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> ? hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> : <span style="color: #ff0000;">""</span> <span style="color: #000000;">]</span> autorelease <span style="color: #000000;">]</span>; <br /> NSString *cURL = <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> NSString alloc <span style="color: #000000;">]</span> initWithCString: <span style="color: #ff0000;">"tel:"</span> <span style="color: #000000;">]</span> autorelease <span style="color: #000000;">]</span>; <br /> <br /> cURL = <span style="color: #000000;">[</span>cURL stringByAppendingString:<span style="color: #000000;">ctelf</span> <span style="color: #000000;">]</span>;<br />NSURL *phoneNumberURL = <span style="color: #000000;">[</span>NSURL URLWithString: <span style="color: #000000;">cURL</span> <span style="color: #000000;">]</span>;<br /><span style="color: #000000;">[</span><span style="color: #000000;">[</span>UIApplication sharedApplication<span style="color: #000000;">]</span> openURL:<span style="color: #000000;">phoneNumberURL</span><span style="color: #000000;">]</span>;<br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:3ooepxkk] |
he conseguido un iphone | [quote="mastintin":1tlu4v59]¿ Esa funcionando el tutor7 ? .Me está dando error al cambiar de tab y en principio tengo todo actualizado.mirar si podeis confirmarlo .
Saludos.[/quote:1tlu4v59]
Manuel,
Borrado todo, hecho un checkout limpio y funcionando bien tutor07 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Perfecto ,pero no esta funcionando bien . Si pulso primero el primer boton en vez el segundo el view que se ve es el segundo , si luego al pulsar el segundo se ve el view primero .
He realizado unos cambios en la clase y en el tutor7 y ahora podemos asociar un view a cada tab . El cambio entre views lo he realizado en el tutor7 pero tendria que estar mas bien en la clase . Es una manera de implementarlo , vosotros direis.
Lo Subo al repositorio.
---------------- edito --------------------
Por cierto el codigo del phonecall() funciona perfecto <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ....
Añadida function smscall() tambien funciona ... |
he conseguido un iphone | Nueva function para view.m , aun sin probar si funciona o no ....
coloca una imagen como fondo de un view ..
Saludos.
[code=fw:2p0gk999]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> VIEWBKGIMG <span style="color: #000000;">)</span> <br /><span style="color: #000000;">{</span><br /> UIView * view = <span style="color: #000000;">(</span> UIView * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> NSString * cImage = <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> NSString alloc <span style="color: #000000;">]</span> initWithCString: <span style="color: #000000;">ISCHAR</span><span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> ? hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> : <span style="color: #ff0000;">""</span> <span style="color: #000000;">]</span> autorelease <span style="color: #000000;">]</span>;<br /> <br /> UIColor* BgrImg = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>UIColor alloc<span style="color: #000000;">]</span> initWithPatternImage<span style="color: #000000;">[</span>UIImage imageNamed:<span style="color: #000000;">cImage</span><span style="color: #000000;">]</span><span style="color: #000000;">]</span>;<br /> view.backgroundColor = BgrImg ;<br /> <span style="color: #000000;">[</span>BgrImg <span style="color: #0000ff;">release</span><span style="color: #000000;">]</span>; <br /><span style="color: #000000;">}</span> <br /> </div>[/code:2p0gk999]
___________________ edito -----------------------------
Probado y funcionando . |
he conseguido un iphone | He estado observando los programas propios deel iphone . Veo que cada View de un tab tiene su propia barra de navegación diferente a otor view ...
Si colocamos una barra de navegación en un view y intentamos ejecutar el programa ( tutor07 ) nos da una serie de mensajes de error ,si los pasamos ,al final la barrase pinta correctamente . Debemos cambiar la forma de implementar las barrasa de navegacion para que admitan los view .
Mirando las classes encuentro una cosa extraña , siendo en principio window la clase "primaria" de un programa sobre la que en principio se colocan los distintos views , es window quien hereda de view ...
pienso que lo correcto sería que windows al crearse Generara un view "primario" donde se colocaran los controles ... de esa forma el control de eventos se haría por el view asi como el contenido de toolbar ,navbar y demas controles , pasaria a ser window la clase primaria de la que hereda view ¿ no?
Un saludo. |
he conseguido un iphone | Manuel,
En la jerarquía de clases del iOS, la Clase UIWindow deriva de la Clase UIView. Es decir, una ventana es un UIView tambien, por lo que no es necesario crear un view contenido por la ventana, salvo que queramos una forma cómoda de pasar de un grupo de controles a otro (en Windows usamos cajas de dialogo no modales, y aqui serían UIViews).
Los controles derivan directamente desde UIView y no de UIWindow. Es algo que tiene una cierta lógica, pues una ventana ofrece una serie de funcionalidades que no necesitan los controles. En Windows todo son ventanas, por eso TControl deriva de TWindow en FWH. |
he conseguido un iphone | [quote="Antonio Linares":ozgo7vls]Manuel,
En la jerarquía de clases del iOS, la Clase UIWindow deriva de la Clase UIView. Es decir, una ventana es un UIView tambien, por lo que no es necesario crear un view contenido por la ventana, salvo que queramos una forma cómoda de pasar de un grupo de controles a otro (en Windows usamos cajas de dialogo no modales, y aqui serían UIViews).
Los controles derivan directamente desde UIView y no de UIWindow. Es algo que tiene una cierta lógica, pues una ventana ofrece una serie de funcionalidades que no necesitan los controles. En Windows todo son ventanas, por eso TControl deriva de TWindow en FWH.[/quote:ozgo7vls]
Ok comprendido .Da gusto como explicas las cosas . <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Por otro lado y volviendo al problema . Está claro que dentro de un programa pueden existir varias barras de navegación y que estas derivan de view directamente asi que lo logico ( creo yo) es que la propiedad onavbar pase a twiew . Otra opcion es crear un array de navbars , segun que item del tab se muestra se muestra "su" navbar , este array puede estar o bien en la clase windows o en la clase tabbar ( esto es lo que me parece que hace el ejemplo TabSampleBar que estamos usando ) .Yo pienso que es mejor la primera opción ¿no?.
Saludos. |
he conseguido un iphone | Por cierto el viewbackimg()...
[img:3g59begr]http://img28.imageshack.us/img28/3923/lafoto.png[/img:3g59begr] |
he conseguido un iphone | [quote="mastintin":20b2sfmr]Por cierto el viewbackimg()...
[img:20b2sfmr]http://img28.imageshack.us/img28/3923/lafoto.png[/img:20b2sfmr][/quote:20b2sfmr]
Manuel,
Que nombre de imagen has usado ? |
he conseguido un iphone | Primera version de la clase slider
[img:20wbsted]http://www.sitasoft.net/fivemac/iphone/screen/IMG_0068.png[/img:20wbsted]
* new class slider
+ tutorslider.prg
+ slider.prg
+ sliders.m
! makefile
! fmsgs,h
! fivephone.ch
* class label
+ method SetText
! labels.m
! label.prg |
he conseguido un iphone | Daniel,
Muy bueno! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Gracias!!! |
he conseguido un iphone | He subido un nuevo ejemplo slider2.prg que pretende usar tres sliders para cambiar el color de la ventana, pero algo debo estar haciendo mal <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="Antonio Linares":skor89tr][quote="mastintin":skor89tr]Por cierto el viewbackimg()...
[img:skor89tr]http://img28.imageshack.us/img28/3923/lafoto.png[/img:skor89tr][/quote:skor89tr]
Manuel,
Que nombre de imagen has usado ?[/quote:skor89tr]
La imagen esta en el repositorio en el directorio images , back.png .
En otro orden de cosas ,he estado intentando solucionar el problema del navBar con varios views ( TABS) ,pero no consiguo hacer que funcione bien del todo .
Comento lo quue he hecho y hasta donde he llegado ...
he puesto una data oNavBar a la clase view para poder ponerle una barra de navegación . En el archivo navBars.m he cambiado estas lineas :
[code=fw:skor89tr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #0000ff;">Window</span> * miwindow = <span style="color: #000000;">(</span> <span style="color: #0000ff;">Window</span> * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br />.......<br /> <span style="color: #000000;">[</span> item setLeftBarButtonItem : <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> UIBarButtonItem alloc <span style="color: #000000;">]</span> initWithTitle : <span style="color: #0000ff;">left</span> <span style="color: #0000ff;">style</span> : <span style="color: #000000;">UIBarButtonItemStyleBordered</span> target :<span style="color: #000000;">[</span> miwindow <span style="color: #0000ff;">window</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">action</span> : @selector<span style="color: #000000;">(</span> BarLeftClick: <span style="color: #000000;">)</span> <span style="color: #000000;">]</span> animated : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> item setRightBarButtonItem : <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> UIBarButtonItem alloc <span style="color: #000000;">]</span> initWithTitle : <span style="color: #0000ff;">right</span> <span style="color: #0000ff;">style</span> : <span style="color: #000000;">UIBarButtonItemStyleBordered</span> target : <span style="color: #000000;">[</span>miwindow <span style="color: #0000ff;">window</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">action</span> : @selector<span style="color: #000000;">(</span> BarRightClick: <span style="color: #000000;">)</span> <span style="color: #000000;">]</span> animated : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">]</span>;<br /><br /> </div>[/code:skor89tr]
De esta manera consiguo que rute el evento a a la window raiz en vez a el view ... hasta aqui funciona ya que el evento llega al HandleEvent.
El problema está aqui :
llega hasta el msginfo("si") , pero no se como indicarle que navbar lo desencadena .
Una opción es crear una clase navbaritem , que vendría bien para poder gestionarlos distintos estilos de boton y que esta fuera la que tuviera el codeblock a ejecutar ... gracias al hsender si sabriamos que control manda el clik ....
[code=fw:skor89tr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">case</span> nMsg == WM_BARRIGHTCLICK<br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"si"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oNavBar</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"yo"</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oNavBar</span>:<span style="color: #000000;">RightClick</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> </div>[/code:skor89tr]
Un Saludo. |
he conseguido un iphone | [quote="Antonio Linares":2bhgnvgq]He subido un nuevo ejemplo slider2.prg que pretende usar tres sliders para cambiar el color de la ventana, pero algo debo estar haciendo mal <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:2bhgnvgq]
Solucionado (habia un bug en la gestión de colores de los views) y subido <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:2bhgnvgq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oSlider1, oSlider2, oSlider3<br /> <br /> oSlider1 = TSlider<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">50</span>,, <span style="color: #000000;">1</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> <br /> oSlider2 = TSlider<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">10</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">50</span>,, <span style="color: #000000;">1</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> <br /> oSlider3 = TSlider<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">10</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">50</span>,, <span style="color: #000000;">1</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> <br /> oSlider1:<span style="color: #000000;">bChanged</span> := oSlider2:<span style="color: #000000;">bChanged</span> := oSlider3:<span style="color: #000000;">bChanged</span> := ;<br /> <span style="color: #000000;">{</span> | oSelf | oWnd:<span style="color: #000000;">SetBkgColor</span><span style="color: #000000;">(</span> oSlider1:<span style="color: #000000;">nValue</span>, oSlider2:<span style="color: #000000;">nValue</span>, oSlider3:<span style="color: #000000;">nValue</span>, <span style="color: #000000;">255</span> * <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:2bhgnvgq]
[img:2bhgnvgq]http://img535.imageshack.us/img535/7836/lafotox.png[/img:2bhgnvgq] |
he conseguido un iphone | Subido el primer prototipo de la Clase TImageView y samples/image.prg
Aun no muestra nada (?) pero bueno, ya lo solucionaremos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | ...
Pensando un poco en aplicaciones mobiles y lo importante del rendimiento y consumo de memoria de las mismas, se me ocurre no usar el array de ventanas (aWindow) y en vez de hacer la busqueda del handle dentro del array, podriamos llamar directamente el metodo HandleEvent de cada uno de los controles, es decir, pasar el objeto PRG (self) a bajo nivel, lo guardamos en una data y desde bajo nivel lo retornamos a PRG y hacemos a llamada al metodo...
Espero haberme explicado
Preparo un ejemplo y lo subo para probar.... |
he conseguido un iphone | He encontrado una herramienta que puede hacernos acelerar el desarrollo de contrioles un monton , se llama nib2objc ( buscar por internet) .
Es un "programa" que trasforma el codigo de una nib en su correspondiente codigo objective-c .
SE coje el interface builder se coloca el control que deseamos y se guarda en un nib , luego se ejecuta este programa y nos saca su correspondiente codigo objective-c .
Un saludo. |
he conseguido un iphone | Manuel
te he creado una cuenta FTP ilimitada en mi servidor (si te interesa), alli puedes subir lo que quieras
mandame un email a <!-- e --><a href="mailto:danielgarciagil@gmail.com">danielgarciagil@gmail.com</a><!-- e --> para pasarte la informacion de la cuenta |
he conseguido un iphone | [quote="Daniel Garcia-Gil":za3sa7o6]...
Pensando un poco en aplicaciones mobiles y lo importante del rendimiento y consumo de memoria de las mismas, se me ocurre no usar el array de ventanas (aWindow) y en vez de hacer la busqueda del handle dentro del array, podriamos llamar directamente el metodo HandleEvent de cada uno de los controles, es decir, pasar el objeto PRG (self) a bajo nivel, lo guardamos en una data y desde bajo nivel lo retornamos a PRG y hacemos a llamada al metodo...
Espero haberme explicado
Preparo un ejemplo y lo subo para probar....[/quote:za3sa7o6]
subido los cambios para hacer las pruebas
Se envia el objeto prg, este es guardado en una data para luego ser retornado al prg, recibido por la funcion FWEvents
[code=fw:za3sa7o6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> FWEvents<span style="color: #000000;">(</span> oSender, nMsg, uParam1, uParam2 <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> oSender:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">(</span> nMsg, uParam1, uParam2 <span style="color: #000000;">)</span></div>[/code:za3sa7o6]
agrege el uso de bSetGet a las clases Switch y Get, modificado tutor06 para ver el funcionamiento |
he conseguido un iphone | Daniel,
El problema de hacerlo de esa forma es que hay que bloquear el objeto a bajo nivel para que no lo destruya el recolector de basura de Harbour y posteriormente hay que liberarlo en un momento correcto en el que no le puedan llegar más eventos.
Este sistema lo probamos en FWPPC y se generaban muchos problemas de memoria por no liberarse los objetos correctamente, y si se liberaban mal daban lugar a GPFs.
El sistema de arrays a alto nivel puede ser un poco más lento pero evita esos dos problemas: objetos de memoria sin liberar ó errores de protección por usar objetos ya destruidos. De todas formas, podemos volver a probarlo y ver como se comporta en iOS. Estos problemas en ejemplos pequeños no se manifiestan, pero en aplicaciones algo complejas, si. |
he conseguido un iphone | Antonio
Entendido
estoy probando algunas cosas... en poco tiempo lo subo si resulta |
he conseguido un iphone | ...
Subido unos cambios que espero sean de utilidad para el tema que plantee para descontinuar el uso del array de "ventanas"
ver el ejemplo slider2
* use GC collected objects.
It's enough to replace handles with NIL assigments, or simply delete them.
+ new function hb_NSSTRING_par( int )
use to convert parameter from char to NSSTRING |
he conseguido un iphone | Daniel,
No has subido fwprototypes.m, fwprototypes.h
gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Quiero haceros un regalo ... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> . Este programa es util para los aficionados a la fotografía . es una calculadora de profundidad de campo y de hiperfocal . Inicialmente lo desarrolle en Dashcode para mi trabajo pero como normalmente no tenía conexión en los sitios donde queria usarlo no le he dado mucho uso . Ahora gracias a fivephone se puede usar en local ...Las camaras que aparecen son viejas pero facilmente se pueden añadir nuevas camaras ...
Usa el prototipo del control webview y codigo javascript ...
[url:2e7caf0a]http://rapidshare.com/files/428084978/tutorweb.ipa[/url:2e7caf0a]
Saludos |
he conseguido un iphone | Solucionado el bug de la Clase TImageView, no hay que especificar AppPath() <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Funcionando! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:3ivvey25]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oImage := TImageView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"apple.gif"</span>, <span style="color: #000000;">70</span>, <span style="color: #000000;">120</span> <span style="color: #000000;">)</span><br /> <br /> oWnd:<span style="color: #000000;">SetBkgColor</span><span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3ivvey25]
[img:3ivvey25]http://img72.imageshack.us/img72/4098/lafotoq.png[/img:3ivvey25] |
he conseguido un iphone | Subidas los archivos faltantes |
he conseguido un iphone | mirar esta pagina , preguntas y respuesta sobre objective-c en español...
[url:14tfasla]http://www.nscodecenter.com/[/url:14tfasla] |
he conseguido un iphone | ...
Subida una nueva funcion para MsgInfo modales
MsgInfoModal( cText, cTitle )
para lograr el modal genere un propio loop de mensajes, usando UIAlertViewDelegate para "delegar" alli y no en el loop de mensajes de la aplicacion
prueba msgmodal.prg |
he conseguido un iphone | [quote="Daniel Garcia-Gil":1xic4v6x]...
Subida una nueva funcion para MsgInfo modales
MsgInfoModal( cText, cTitle )
para lograr el modal genere un propio loop de mensajes, usando UIAlertViewDelegate para "delegar" alli y no en el loop de mensajes de la aplicacion
prueba msgmodal.prg[/quote:1xic4v6x]
Daniel,
Muy bueno, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Implementada la Clase TActivityIndicator y nuevo ejemplo samples/waiting.prg
[code=fw:1ce9oiuu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oActInd := TActivityIndicator<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">// oWnd:SetBkgColor( 255, 255, 255, 255 )</span><br /> <br /> oActInd:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> <span style="color: #000000;">140</span>, <span style="color: #000000;">130</span> <span style="color: #000000;">)</span><br /> oActInd:<span style="color: #000000;">Start</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1ce9oiuu]
[img:1ce9oiuu]http://img808.imageshack.us/img808/2873/lafotol.png[/img:1ce9oiuu] |
he conseguido un iphone | Añadida la primera implementación de la Clase TPickerView y samples/picker.prg
[code=fw:22it97sz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> aItems := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Monday"</span>, <span style="color: #ff0000;">"Tuesday"</span>, <span style="color: #ff0000;">"Wednesday"</span>, <span style="color: #ff0000;">"Thursday"</span>, <span style="color: #ff0000;">"Friday"</span>, <span style="color: #ff0000;">"Saturday"</span>, <span style="color: #ff0000;">"Sunday"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> oPicker := TPickerView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, aItems, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">200</span> <span style="color: #000000;">)</span><br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:22it97sz]
[img:22it97sz]http://img529.imageshack.us/img529/4963/lafotog.png[/img:22it97sz] |
he conseguido un iphone | Antonio , Daniel ... revisando codigo me encuentro en mainapp.m varios "int" , justo he leido esto [url:2fh3futp]http://www.nscodecenter.com/preguntas/58/cual-es-la-diferencia-entre-nsinteger-y-nsuinteger[/url:2fh3futp]
¿ Se debería cambiar no ? .
Saludos. |
he conseguido un iphone | Manuel,
Depende del uso que se les de.
En el caso del TPickerView, se usa para pasar los elementos de un array al picker, y siempre va a ser un array con un numero de elementos no muy grande <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
El problema viene cuando intentemos almacenar un valor muy grande en ellos. Por ejemplo, en FWH 64 tenemos que usar valores tipo "longlong" (64 bits) porque en un long (32 bits) no caben algunos valores de 64 bits (handles, principalmente). |
he conseguido un iphone | Manuel
revisando la [url=http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html:xxqrn9ke]documentacion de apple[/url:xxqrn9ke]
posiblemente podriamos resolverlo con typedef sin cambiar el codigo
[code=fw:xxqrn9ke]<div class="fw" id="{CB}" style="font-family: monospace;">typedef NSInteger int;<br />typedef NSUInteger uint;</div>[/code:xxqrn9ke]
NSInteger
Used to describe an integer.
#if __LP64__ || TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef long NSInteger;
#else
typedef int NSInteger;
#endif
Discussion
When building 32-bit applications, NSInteger is a 32-bit integer. A 64-bit application treats NSInteger as a 64-bit integer.
NSUInteger
Used to describe an unsigned integer.
#if __LP64__ || TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef unsigned long NSUInteger;
#else
typedef unsigned int NSUInteger;
#endif
Discussion
When building 32-bit applications, NSUInteger is a 32-bit unsigned integer. A 64-bit application treats NSUInteger as a 64-bit unsigned integer |
he conseguido un iphone | He subido al repositorio una nueva version de msgs.m . Esta implementado el MsgYesNoModal para que devuelva el numero de boton que se ha pulsado , pero no consiguo que me devuelva un número ... seguro que es una tontada pero estoy ofuscado y no consiguo terminarlo asi que aqui lo dejo ....
Si quereis hecharle un vistazo ...
Saludos.
-------------------------- editado--------------------
Resuelto . Ya esta funcionando msgYesNoModal..... , añadidas funciones MsgActivity() y delMsgActivity() mensajes sin boton y con un control activity ...
Un saludo. |
he conseguido un iphone | Manuel,
Muy bien, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has visto algo de los sensores de proximidad, de aceleración, de movimiento ? |
he conseguido un iphone | [quote="Antonio Linares":3nr6dxnr]Manuel,
Muy bien, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has visto algo de los sensores de proximidad, de aceleración, de movimiento ?[/quote:3nr6dxnr]
He encontrado este codigo que puede servir de comienzo:
[code=fw:3nr6dxnr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#define</span> kAccelerationThreshold <span style="color: #000000;">2.2</span><br /><br /><br /><span style="color: #B900B9;">//Somewhere in initialization</span><br /><br />UIAccelerometer *accel = <span style="color: #000000;">[</span>UIAccelerometer sharedAccelerometer<span style="color: #000000;">]</span>;<br /><br />accel.delegate = <span style="color: #00C800;">self</span>;<br /><br />accel.updateInterval = <span style="color: #000000;">1</span>.0f/<span style="color: #000000;">10</span>.0f;<br /><br /> <br /><br />- <span style="color: #000000;">(</span>void<span style="color: #000000;">)</span>accelerometer:<span style="color: #000000;"><span style="color: #000000;">(</span>UIAccelerometer</span> *<span style="color: #000000;">)</span>accelerometer didAccelerate:<span style="color: #000000;"><span style="color: #000000;">(</span>UIAcceleration</span> *<span style="color: #000000;">)</span>acceleration <span style="color: #000000;">{</span><br /><br /><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span>fabsf<span style="color: #000000;">(</span>acceleration.x<span style="color: #000000;">)</span> > kAccelerationThreshold || fabsf<span style="color: #000000;">(</span>acceleration.y<span style="color: #000000;">)</span> > kAccelerationThreshold || fabsf<span style="color: #000000;">(</span>acceleration.z<span style="color: #000000;">)</span> > kAccelerationThreshold<span style="color: #000000;">)</span> <span style="color: #000000;">{</span><br /><br />NSLog<span style="color: #000000;">(</span>@<span style="color: #ff0000;">"Shaking!!!"</span><span style="color: #000000;">)</span>;<br /><br /><span style="color: #000000;">}</span><br /><br /><span style="color: #000000;">}</span> <br /> </div>[/code:3nr6dxnr] |
he conseguido un iphone | [quote="Antonio Linares":iqhxpydj]Manuel,
Muy bien, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has visto algo de los sensores de proximidad, de aceleración, de movimiento ?[/quote:iqhxpydj]
Añadida funcion de ajuste del sensor de proximidad ...SetProxiMonitor( lactivardesactivar) .
No está aun probado y no se si funciona bien ( se me atraganta algo el pasar parametros bool <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> )
Saludos. |
he conseguido un iphone | por cierto en encontrado esto que nos puede venir muy bien <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> he visto que tenemos mal el codigo de control de color ya que alpha no divide entre 255 <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> )
[code=fw:1r23j81g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> RGBA<span style="color: #000000;">(</span>r,g,b,a<span style="color: #000000;">)</span> <span style="color: #000000;">[</span>UIColor colorWithRed:<span style="color: #000000;">r</span>/<span style="color: #000000;">255.0</span> green:<span style="color: #000000;">g</span>/<span style="color: #000000;">255.0</span> blue:<span style="color: #000000;">b</span>/<span style="color: #000000;">255.0</span> alpha:<span style="color: #000000;">a</span><span style="color: #000000;">]</span><br /> </div>[/code:1r23j81g] |
he conseguido un iphone | Manuel,
Creo que lo tenemos bien. Según la documentación de la Clase UIColor:
[url:29glu6g2]http://developer.apple.com/library/ios/#documentation/uikit/reference/UIColor_Class/Reference/Reference.html[/url:29glu6g2]
[quote:29glu6g2]
Parameters
red
The red component of the color object, specified as a value from 0.0 to 1.0.
green
The green component of the color object, specified as a value from 0.0 to 1.0.
blue
The blue component of the color object, specified as a value from 0.0 to 1.0.
alpha
The opacity value of the color object, specified as a value from 0.0 to 1.0.
[/quote:29glu6g2]
Todos los valores van de 0 a 1, y es correcto dividir por 255, si queremos usar un rango de 0 a 255 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="mastintin":1r7cc3nl][quote="Antonio Linares":1r7cc3nl]Manuel,
Muy bien, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has visto algo de los sensores de proximidad, de aceleración, de movimiento ?[/quote:1r7cc3nl]
Añadida funcion de ajuste del sensor de proximidad ...SetProxiMonitor( lactivardesactivar) .
No está aun probado y no se si funciona bien ( se me atraganta algo el pasar parametros bool <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> )
Saludos.[/quote:1r7cc3nl]
Manuel,
Ligeramente modificado. Los valores lógicos los pasamos usando hb_parl() <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="Antonio Linares":jjj9g8bt]Manuel,
Creo que lo tenemos bien. Según la documentación de la Clase UIColor:
[url:jjj9g8bt]http://developer.apple.com/library/ios/#documentation/uikit/reference/UIColor_Class/Reference/Reference.html[/url:jjj9g8bt]
[quote:jjj9g8bt]
Parameters
red
The red component of the color object, specified as a value from 0.0 to 1.0.
green
The green component of the color object, specified as a value from 0.0 to 1.0.
blue
The blue component of the color object, specified as a value from 0.0 to 1.0.
alpha
The opacity value of the color object, specified as a value from 0.0 to 1.0.
[/quote:jjj9g8bt]
Todos los valores van de 0 a 1, y es correcto dividir por 255, si queremos usar un rango de 0 a 255 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:jjj9g8bt]
Correcto para los colores , pero el canal alfa ( opacidad) creo que es mas "comprensible" si se usa de 0 a 100 ( porcentaje de opacidad ), como hace por ejemplo photoshop . ¿ no? . |
he conseguido un iphone | Manuel,
Es que en realidad usar un rango de 0.0 a 1.0 es un porcentaje también, pero en distinta escala.
Nosotros podemos usar la escala que queramos, pero tendremos que traducirla a la de ellos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Subida la Clase TAcceleroMeter basada en el código publicado por Manuel <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
y samples/accel.prg
Aún no funciona, pero ya lo solucionaremos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:3ob9vm1c]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oAccel<br /> <br /> TLabel<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"Shake me!"</span> <span style="color: #000000;">)</span><br /> <br /> oAccel = TAcceleroMeter<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oAccel:<span style="color: #000000;">bShaking</span> = <span style="color: #000000;">{</span> || <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"shaking!"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:3ob9vm1c] |
he conseguido un iphone | Arreglado, solo habia que variar la cantidad de acceleración <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
#define kAccelerationThreshold 1.07 |
he conseguido un iphone | [quote="Antonio Linares":f3tuh1rv]Subida la Clase TAcceleroMeter basada en el código publicado por Manuel <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
y samples/accel.prg
[/quote:f3tuh1rv]
Antonio muy buena la implementación . Ahora tenemos que dar un paso más . <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Ahora mismo detectamos si hay movimiento , pero no nos vale para nada mas . Si lo que queremos es poder dibujar una imagen y controlarla en pantalla ( tipo juego laberinto, por ejemplo ) lo que realmente debemos "devolver" a Harbour son las coordenadas y en fivephone podemos controlar si detectamos movimiento o un determinado cambio de cordenadas y obrar en consecuencia .
Mira este codigo ... tres progress que funcionan tipo lo de la tele con la f1 <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
[code=fw:f3tuh1rv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br />- <span style="color: #000000;">(</span> void <span style="color: #000000;">)</span> accelerometer : <span style="color: #000000;"><span style="color: #000000;">(</span></span> UIAccelerometer * <span style="color: #000000;">)</span> accelerometer didAccelerate : <span style="color: #000000;"><span style="color: #000000;">(</span></span> UIAcceleration * <span style="color: #000000;">)</span> acceleration <br /><span style="color: #000000;">{</span> <br /><br /> labelX.<span style="color: #0000ff;">text</span> = <span style="color: #000000;">[</span>NSString stringWithFormat:@<span style="color: #ff0000;">"%@%f"</span>, @<span style="color: #ff0000;">"X: "</span>, acceleration.x<span style="color: #000000;">]</span>;<br /> labelY.<span style="color: #0000ff;">text</span> = <span style="color: #000000;">[</span>NSString stringWithFormat:@<span style="color: #ff0000;">"%@%f"</span>, @<span style="color: #ff0000;">"Y: "</span>, acceleration.y<span style="color: #000000;">]</span>;<br /> labelZ.<span style="color: #0000ff;">text</span> = <span style="color: #000000;">[</span>NSString stringWithFormat:@<span style="color: #ff0000;">"%@%f"</span>, @<span style="color: #ff0000;">"Z: "</span>, acceleration.z<span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">self</span>.progressX.<span style="color: #0000ff;">progress</span> = <span style="color: #0000ff;">ABS</span><span style="color: #000000;">(</span>acceleration.x<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">self</span>.progressY.<span style="color: #0000ff;">progress</span> = <span style="color: #0000ff;">ABS</span><span style="color: #000000;">(</span>acceleration.y<span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">self</span>.progressZ.<span style="color: #0000ff;">progress</span> = <span style="color: #0000ff;">ABS</span><span style="color: #000000;">(</span>acceleration.z<span style="color: #000000;">)</span>;<br /> <br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:f3tuh1rv]
Se me ocurre algo asi :
[code=fw:f3tuh1rv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@<span style="color: #00C800;">interface</span> AccelDelegate : <span style="color: #000000;">NSObject</span> <UIAccelerometerDelegate><br /><span style="color: #000000;">{</span><br /> NSInteger acex ;<br /> NSInteger acey ;<br /> NSInteger acez ; <br /> <span style="color: #000000;">}</span><br /> <br />- <span style="color: #000000;">(</span>NSInteger<span style="color: #000000;">)</span>getResultx; <br />- <span style="color: #000000;">(</span>NSInteger<span style="color: #000000;">)</span>getResulty; <br />- <span style="color: #000000;">(</span>NSInteger<span style="color: #000000;">)</span>getResultz; <br /><br />@end<br /><br />@implementation AccelDelegate<br /><br />- <span style="color: #000000;">(</span> void <span style="color: #000000;">)</span> accelerometer : <span style="color: #000000;"><span style="color: #000000;">(</span></span> UIAccelerometer * <span style="color: #000000;">)</span> accelerometer didAccelerate : <span style="color: #000000;"><span style="color: #000000;">(</span></span> UIAcceleration * <span style="color: #000000;">)</span> acceleration <br /><span style="color: #000000;">{</span> <br /> acex = <span style="color: #0000ff;">ABS</span><span style="color: #000000;">(</span>acceleration.x<span style="color: #000000;">)</span>;<br /> acey = <span style="color: #0000ff;">ABS</span><span style="color: #000000;">(</span>acceleration.y<span style="color: #000000;">)</span>;<br /> acez = <span style="color: #0000ff;">ABS</span><span style="color: #000000;">(</span>acceleration.z<span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />-<span style="color: #000000;">(</span>NSInteger<span style="color: #000000;">)</span>getResultx <br /><span style="color: #000000;">{</span> <br /> <span style="color: #00C800;">return</span> acex ; <br /><span style="color: #000000;">}</span> <br /><br />-<span style="color: #000000;">(</span>NSInteger<span style="color: #000000;">)</span>getResulty <br /><span style="color: #000000;">{</span> <br /> <span style="color: #00C800;">return</span> acey ; <br /><span style="color: #000000;">}</span> <br /><br />-<span style="color: #000000;">(</span>NSInteger<span style="color: #000000;">)</span>getResultz <br /><span style="color: #000000;">{</span> <br /> <span style="color: #00C800;">return</span> acez ; <br /><span style="color: #000000;">}</span> <br /><br />@end<br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> CREATEACCELEROMETER <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIAccelerometer * accel = <span style="color: #000000;">[</span> UIAccelerometer sharedAccelerometer <span style="color: #000000;">]</span>;<br /> AccelDelegate * delegate = <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> AccelDelegate alloc <span style="color: #000000;">]</span> <span style="color: #0000ff;">init</span> <span style="color: #000000;">]</span>;<br /> <br /> accel.updateInterval = <span style="color: #000000;">1</span>.0f / <span style="color: #000000;">10</span>.0f;<br /> <br /> accel.delegate = delegate;<br /> <br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> accel <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span> <br /><br /> <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETACCELEROMETERX <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br />UIAccelerometer * accel = <span style="color: #000000;">(</span>UIAccelerometer * <span style="color: #000000;">)</span> h_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span> ;<br /><br /> NSInteger acex = <span style="color: #000000;">[</span>accel.delegate getResultx<span style="color: #000000;">]</span>; <br /> hb_retnl<span style="color: #000000;">(</span> acex<span style="color: #000000;">)</span><br /> <span style="color: #000000;">}</span> <br /><br /> <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETACCELEROMETERY <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br />UIAccelerometer * accel = <span style="color: #000000;">(</span>UIAccelerometer * <span style="color: #000000;">)</span> h_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span> ;<br /><br /> NSInteger acey = <span style="color: #000000;">[</span>accel.delegate getResulty<span style="color: #000000;">]</span>; <br /> hb_retnl<span style="color: #000000;">(</span> acey<span style="color: #000000;">)</span><br /> <span style="color: #000000;">}</span> <br /><br /> <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETACCELEROMETERZ <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br />UIAccelerometer * accel = <span style="color: #000000;">(</span>UIAccelerometer * <span style="color: #000000;">)</span> h_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span> ;<br /><br /> NSInteger acez = <span style="color: #000000;">[</span>accel.delegate getResultz<span style="color: #000000;">]</span>; <br /> hb_retnl<span style="color: #000000;">(</span> acez<span style="color: #000000;">)</span><br /> <span style="color: #000000;">}</span> <br /><br /><br /> <br /> </div>[/code:f3tuh1rv]
Saludos. |
he conseguido un iphone | Antonio mirate esto , puede ser de gran utilidad para poder instalar nuestras ipas en iphones sin jailbreak si no comprendo mal ....
[url:3qer0xo6]http://iphonesdkdev.blogspot.com/search/label/Decrypted%20IPA[/url:3qer0xo6]] |
he conseguido un iphone | Muy buenas, estoy muy interesado en desarrollar aplicaciones para iPhone y poder ayudar a implementar mejoras en este foro, pero no encuentro:
- GNU C Compiler desde Cydia, ¿me podeis decir como puedo intalarlo?
Un Saludo. |
he conseguido un iphone | [quote="softruz":2ocnv1w2]Muy buenas, estoy muy interesado en desarrollar aplicaciones para iPhone y poder ayudar a implementar mejoras en este foro, pero no encuentro:
- GNU C Compiler desde Cydia, ¿me podeis decir como puedo intalarlo?
Un Saludo.[/quote:2ocnv1w2]
En la pagina 1 mensaje 5 tienes instrucciones para instalar el gcc para iphone . Daniel creo que lo tiene asi . El te puede indicar mejor como superar los distintos errores que te pueden salir al instalar ...
Suerte .
Saludos. |
he conseguido un iphone | Softruz
Mi estimado, no te preocupes por reconstruir harbour desde el iphone usa la que ya esta construida: [url:2vzvbbuh]http://code.google.com/p/fivephone/[/url:2vzvbbuh] esta estable y funcional
que version del iphone y OS usas? |
he conseguido un iphone | Softruz
aqui se explica como hacerlo...
[quote="Antonio Linares":3rul50cc]Por el primer camino:
...
7. Instalamos el GNU C compiler desde Cydia (aqui hay un problema que solucionar)
8. apt-get install wget
9. wget [url:3rul50cc]http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb[/url:3rul50cc]
10. dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb
11. apt-get install iphone-gcc
ya podemos escribir gcc y vemos que se ejecuta bien
[/quote:3rul50cc]
para solventar el punto 7, que desde cydia no se puede instalar, no se (sabemos) pq, sigue del 8-11 |
he conseguido un iphone | ...
Implementando clase Button
tutorbutton es un buen ejemplo tambien para ver el consumo de memoria
podriamos cambiar esta linea y ver como disminuye la memoria
[code=fw:3uwx5v7b]<div class="fw" id="{CB}" style="font-family: monospace;">oBtnBuild = TButton<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"Rebuild"</span>, <span style="color: #000000;">80</span>, <span style="color: #000000;">220</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">{</span>|| <span style="color: #B900B9;">/*CloseAll( aBtn, aSlider ), */</span>Build<span style="color: #000000;">(</span> oWnd, aBtn, aSlider <span style="color: #000000;">)</span><span style="color: #000000;">}</span> <span style="color: #000000;">)</span></div>[/code:3uwx5v7b]
[img:3uwx5v7b]http://www.sitasoft.net/fivemac/iphone/screen/IMG_0071.png[/img:3uwx5v7b] |
he conseguido un iphone | Antonio.He subido el codigo de accels.m con una mezcla de tu código y el que yo tenia a medias .
He realizado un cambio tambien en el ejemplo para que se presenten los datos de aceleración pero parece que no va del todo bien.
El Código del ejemplo usado:
[code=fw:236caoa3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oAccel<br /> <br /> TLabel<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"Shake me!"</span> <span style="color: #000000;">)</span><br /> <br /> oAccel = TAcceleroMeter<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oAccel:<span style="color: #000000;">bShaking</span> = <span style="color: #000000;">{</span> || movi<span style="color: #000000;">(</span>oAccel<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">Function</span> movi<span style="color: #000000;">(</span>oAcell<span style="color: #000000;">)</span><br />MsgInfoModal<span style="color: #000000;">(</span> <span style="color: #ff0000;">"shaking!"</span> <span style="color: #000000;">)</span> <br /><br />msginfoModal<span style="color: #000000;">(</span> <span style="color: #ff0000;">"x.."</span>+str<span style="color: #000000;">(</span>GETACCELEROMETERx<span style="color: #000000;">(</span>oAcell:<span style="color: #000000;">hWnd</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />msginfoModal<span style="color: #000000;">(</span> <span style="color: #ff0000;">"y.."</span>+str<span style="color: #000000;">(</span>GETACCELEROMETERy<span style="color: #000000;">(</span>oAcell:<span style="color: #000000;">hWnd</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />msginfoModal<span style="color: #000000;">(</span> <span style="color: #ff0000;">"z.."</span>+str<span style="color: #000000;">(</span>GETACCELEROMETERZ<span style="color: #000000;">(</span>oAcell:<span style="color: #000000;">hWnd</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:236caoa3] |
he conseguido un iphone | Muy buenas, estoy instalando todas los paquetes para poder compilar pero ya es la 2ª vez que tengo que jailbreak el movil porque me sale una ventana en el movil y me dice que no tiene espacio y que borre fotos o datos (no me acuerdo del mensaje exactamente) pero el movil es un 32 GB, no creo que sea de espacio y despues de esto ya no me funciona el ssh me rehusa la conexion.
¿Sabeis que puede ser?
Un Saludo. |
he conseguido un iphone | Muy buenas, Daniel yo tengo un iPhone 32 GB y lo he jailbreak con el 4.1.
Con respecto a construir harbour yo utilizo el punto 6
svn co <!-- m --><a class="postlink" href="https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk">https://harbour-project.svn.sourceforge ... ject/trunk</a><!-- m --> harbour
¿es mejor coger el harbour por <!-- m --><a class="postlink" href="http://code.google.com/p/fivephone/">http://code.google.com/p/fivephone/</a><!-- m -->, si es asi como sería.?
La ultima vez que se me quedo pillado el movil me dio en el make de harbour el siguiente resultado:
iPhone:~/trunk/harbour root# make
! Building Harbour 2.1.0beta2 from source - <!-- m --><a class="postlink" href="http://harbour-project">http://harbour-project</a><!-- m -->
! MAKE: make 3.81 /bin/sh
! HB_HOST_PLAT: darwin HB_SHELL: sh
! LD_LIBRARY_PATH: /private/var/root/harbour/harbour/lib/darwin/gc
! HB_PLATFORM: darwin (autodetected)
! HB_COMPILER: gcc (autodetected: /usr/bin/)
! Component: 'zlib' found in /usr/include
! Component: 'pcre' found in /usr/include
! Component: 'gpm' not supported on darwin platform
! Component: 'slang' not found
! Component: 'curses' found in /usr/include
! Component: 'x11' not found
! Component: 'wattcp/watt-32' not supported on darwin platform
! HB_INSTALL_PREFIX automatically set to: /usr/local
! REVISION: 15734
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
dyld: Library not loaded: /usr/lib/libncurses.5.dylib
Referenced from: /bin/sh
Reason: no suitable image found. Did find:
/usr/lib/libncurses.5.dylib: file too short
/usr/lib/libncurses.5.dylib: stat() failed with errno=0
/usr/lib/libncurses.5.dylib: file too short
/usr/lib/libncurses.5.dylib: stat() failed with errno=0
make[2]: *** [first] Trace/BPT trap
make[1]: *** [sqlite3] Error 2
make: *** [external] Error 2
¿Podemos saber por que se me queda pillado el movil?
¿donde instalais ustedes el harbour? yo lo instalo en /private/var/root/harbour, ¿debería hacerse en /private/var/mobile?
Un Saludo. |
he conseguido un iphone | [quote="softruz":4eff87do]Muy buenas, estoy instalando todas los paquetes para poder compilar pero ya es la 2ª vez que tengo que jailbreak el movil porque me sale una ventana en el movil y me dice que no tiene espacio y que borre fotos o datos (no me acuerdo del mensaje exactamente) pero el movil es un 32 GB, no creo que sea de espacio y despues de esto ya no me funciona el ssh me rehusa la conexion.
¿Sabeis que puede ser?
Un Saludo.[/quote:4eff87do]
A mi tambien me ha salido "el cartelito" en mi 3gs 16gb . Le he dado a aceptar ( no he borrado nada) y he continuado con la instalación sin mayor problema . Realmente no entiendo el mensaje a que viene ,pero no eres el único.
Ahora estoy usando el metodo de compilar desde mac y no ha vuelto a salir.
Saludos. |
he conseguido un iphone | mastintin, ¿habría alguna posibilidad de utilizar toolchain en opensuse?, es decir, tienes algún sitio donde me digan los pasos a instalar.
Un Saludo. |
he conseguido un iphone | [quote="softruz":25s4powx]mastintin, ¿habría alguna posibilidad de utilizar toolchain en opensuse?, es decir, tienes algún sitio donde me digan los pasos a instalar.
Un Saludo.[/quote:25s4powx]
Realmente no se mucho de toolchain y linux pero mirate por aqui a ver ...[url:25s4powx]http://iphonesdkdev.blogspot.com/search/label/toolchain%202.0[/url:25s4powx] |
he conseguido un iphone | [quote="softruz":6hikww40]Muy buenas, Daniel yo tengo un iPhone 32 GB y lo he jailbreak con el 4.1.
Con respecto a construir harbour yo utilizo el punto 6
svn co <!-- m --><a class="postlink" href="https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk">https://harbour-project.svn.sourceforge ... ject/trunk</a><!-- m --> harbour
¿es mejor coger el harbour por <!-- m --><a class="postlink" href="http://code.google.com/p/fivephone/">http://code.google.com/p/fivephone/</a><!-- m -->, si es asi como sería.?
[/quote:6hikww40]
yo lo tengo instalado en el Mac, compilo con harbour y enlazo con las librerias contruidas para el iphone...
en el iphone no tengo nada instalado |
he conseguido un iphone | Juan,
No tienes que instalar nada en el iPhone. Nosotros ya hemos construido las librerias de Harbour que necesitas.
Lo que haces es usar Harbour construido en el Mac y enlazas con las librerias construidas para el iPhone, como te ha comentado Daniel.
Si quieres te damos Harbour ya construido en el Mac, para que empieces a usarlo. Asi puedes probar si construyes bien en el Mac para el iPhone <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Mi estimado ... tarde pero sin sueño, me uno a las pruebas.
Por donde iniciamos, o que bajamos.
Saludos
Osvaldo Ramirez |
he conseguido un iphone | ...
Subidos unos cambios en AcceleroMeter,
el codeblock bShaking recibe ahora las tres coordenadas x, y, z, ya tenemos control de movimiento
modificado el ejemplo accel.prg para tener un texto en movimiento por medio del acelerometro <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
he conseguido un iphone | Juan, Osvaldo,
Podeis descargar Harbour para OSX (Mac) desde aqui:
<!-- m --><a class="postlink" href="http://www.fivetechsoft.com/files/harbour_osx.zip">http://www.fivetechsoft.com/files/harbour_osx.zip</a><!-- m -->
Y Harbour para el iOS (iPhone/iPad) desde aqui:
<!-- m --><a class="postlink" href="http://www.fivetechsoft.com/files/harbour_ios.zip">http://www.fivetechsoft.com/files/harbour_ios.zip</a><!-- m -->
Se usa el Harbour para Mac para compilar, pero se enlaza con las librerias de Harbour para iOS.
Se usa buildmac.sh en samples de FivePhone para construir los ejecutables <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Daniel,
Al intentar probar tus cambios veo que faltan estas declaraciones en fwprototypes.h:
id hb_OBJECT_par( int iParam );
void hb_OBJECT_ret( id p );
y tenemos este warning aqui:
source/sdkapi/fwprototypes.m: In function ‘OBJECT_release’:
source/sdkapi/fwprototypes.m:78: warning: no ‘-releaseSender’ method found
source/sdkapi/fwprototypes.m:78: warning: (Messages without a matching method signature
source/sdkapi/fwprototypes.m:78: warning: will be assumed to return ‘id’ and accept
source/sdkapi/fwprototypes.m:78: warning: ‘...’ as arguments.)
source/sdkapi/fwprototypes.m:80: warning: no ‘-releaseObject:’ method found
Puedes revisarlo ? gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Daniel,
Probado tu ejemplo con los cambios en el acelerómetro. Esta chulísimo !!! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Daniel , efectivamente el problema estaba en el tipo que no eran NSinteger <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> .
El Ejemplo buenísimo.Cambiamos el label por una imagen dew una bola y a crear video juegos <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> .
Saludos. |
he conseguido un iphone | Daniel , tengo esta función para añadir a UIbutton pero con los ultimos cambios en el array de objetos no se exactamente como quedaría , si tu puedes cambiarlo y asi veo como sería ?
[code=fw:3nhu9m9a]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> SETIMAGEBUTTON <span style="color: #000000;">)</span> <br /><span style="color: #000000;">{</span><br />UIButton * <span style="color: #0000ff;">button</span> = <span style="color: #000000;">(</span> UIButton * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br />NSString * imageNormal = hb_NSSTRING_par<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br />NSString * imagePressed = hb_NSSTRING_par<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> <br /><span style="color: #0000ff;">button</span>.backgroundColor = <span style="color: #000000;">[</span>UIColor clearColor<span style="color: #000000;">]</span>;<br /><span style="color: #000000;">[</span><span style="color: #0000ff;">button</span> setTitleColor:<span style="color: #000000;">[</span>UIColor whiteColor<span style="color: #000000;">]</span> forState:<span style="color: #000000;">UIControlStateNormal</span> <span style="color: #000000;">]</span>;<br /><br />UIImage *buttonImageNormal = <span style="color: #000000;">[</span>UIImage imageNamed: <span style="color: #000000;">imageNormal</span> <span style="color: #000000;">]</span>;<br />UIImage *strechableButtonImageNormal = <span style="color: #000000;">[</span>buttonImageNormal stretchableImageWithLeftCapWidth:<span style="color: #000000;">12</span> topCapHeight:<span style="color: #000000;">0</span><span style="color: #000000;">]</span>;<br /><span style="color: #000000;">[</span><span style="color: #0000ff;">button</span> setBackgroundImage:<span style="color: #000000;">strechableButtonImageNormal</span> forState:<span style="color: #000000;">UIControlStateNormal</span><span style="color: #000000;">]</span>;<br /><br />UIImage *buttonImagePressed = <span style="color: #000000;">[</span>UIImage imageNamed: <span style="color: #000000;">imagePressed</span> <span style="color: #000000;">]</span>;<br />UIImage *strechableButtonImagePressed = <span style="color: #000000;">[</span>buttonImagePressed stretchableImageWithLeftCapWidth:<span style="color: #000000;">12</span> topCapHeight:<span style="color: #000000;">0</span><span style="color: #000000;">]</span>;<br /><span style="color: #000000;">[</span><span style="color: #0000ff;">button</span> setBackgroundImage:<span style="color: #000000;">strechableButtonImagePressed</span> forState:<span style="color: #000000;">UIControlStateHighlighted</span><span style="color: #000000;">]</span>;<br /><br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:3nhu9m9a] |
he conseguido un iphone | Muy buenas foro, pregunta puede ser que el mensaje de que el IPHONE se ha quedado sin espacio, sea de sustituir las librerias del iOS SDK por /usr/lib o de sustituir /usr/include
Un Saludo. |
he conseguido un iphone | [quote="Antonio Linares":3jtku4bs]Daniel,
Al intentar probar tus cambios veo que faltan estas declaraciones en fwprototypes.h:
id hb_OBJECT_par( int iParam );
void hb_OBJECT_ret( id p );
[/quote:3jtku4bs]
faltaban esos prototipos
[quote="Antonio Linares":3jtku4bs]Daniel,
y tenemos este warning aqui:
source/sdkapi/fwprototypes.m: In function ‘OBJECT_release’:
source/sdkapi/fwprototypes.m:78: warning: no ‘-releaseSender’ method found
source/sdkapi/fwprototypes.m:78: warning: (Messages without a matching method signature
source/sdkapi/fwprototypes.m:78: warning: will be assumed to return ‘id’ and accept
source/sdkapi/fwprototypes.m:78: warning: ‘...’ as arguments.)
source/sdkapi/fwprototypes.m:80: warning: no ‘-releaseObject:’ method found
Puedes revisarlo ? gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:3jtku4bs]
pienso que estos warning son inofencibos esos metodos estan declarados en fwprotocols.h, como no son metodos existentes dentro de ninguna clase nativa del api, pero son incluidos por nosotros.
OBJECT_release es invocado automaticamente por el recolentor de basura cuando hacemos NIL el puntero posteriormente liberamos el objeto PRG y removemos del "View" y la memoria queda liberada
podria subtituir el recolecgor de basura por una funcion END_[i:3jtku4bs]OBJECT[/i:3jtku4bs] e invocarla desde PRG para liberar el objeto PRG en objective-C y remover el objeto del "View" (voy a probar) |
he conseguido un iphone | [quote="mastintin":3f3dqe8t]Daniel , tengo esta función para añadir a UIbutton pero con los ultimos cambios en el array de objetos no se exactamente como quedaría , [/quote:3f3dqe8t]
Manuel es un concepto simple, ubicamos el el objeto PRG (self) en una data de una clase en objective-C (puedes mirar sliders.m), usando hb_gcGripGet( hb_param( [i:3f3dqe8t]iPar[/i:3f3dqe8t], HB_IT_ANY ) ) ([i:3f3dqe8t]esto lo usamos en fivewin para rutar los eventos de los controles activex[/i:3f3dqe8t]) los eventos se rutan desde objective-C a PRG a la function FWEvents( oSender, nMsg, uParam1, uParam2 ) (windows.prg) que recibe como primer parametro el objeto PRG almacenado en objective-C y esta funcion llama directamete am metodo HandleEvent del objeto PRG oSender:HandleEvent( nMsg, uParam1, uParam2 )
ahora con respecto al recolector de basura, son tecnicas que usa harbour (a mi entendimiento pq no he visto documentaciones al respecto)
hb_OBJECT_ret( id p ) se encarga de alocatear el objeto en el recolector que despues lo tomaremos usando hb_OBJECT_par( int iParam )
es decir, una vez creado el objeto en objective-C lo enviamos a PRG con la funcion hb_OBJECT_ret y lo recibimos en objective-C con hb_OBJECT_par
subido el codigo que colocaste del botton ( no lo he probado ) |
he conseguido un iphone | Daniel , gracias por la explicación. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
[quote="Daniel Garcia-Gil":3elybhe5]
subido el codigo que colocaste del botton ( no lo he probado )[/quote:3elybhe5]
Lo he probado y funcionar,funciona. Falta poner parametros para las medidas de las imagenes ,pero como primera aproximacion vale.
Un Saludo. |
he conseguido un iphone | Muy buenas, a la hora de hacer make en la carpeta Harbour, me dan los siguientes errores, ¿sabeis porque puede ser?
! Building Harbour 2.1.0beta2 from source - <!-- m --><a class="postlink" href="http://harbour-project.org">http://harbour-project.org</a><!-- m -->
! MAKE: make 3.81 /bin/sh
! HB_HOST_PLAT: darwin HB_SHELL: sh
! LD_LIBRARY_PATH: /private/var/mobile/harbour/harbour/lib/darwin/gcc:
! HB_PLATFORM: darwin (autodetected)
! HB_COMPILER: gcc (autodetected: /usr/bin/)
! Component: 'zlib' found in /usr/include
! Component: 'pcre' found in /usr/include
! Component: 'gpm' not supported on darwin platform
! Component: 'slang' not found
! Component: 'curses' found in /usr/include
! Component: 'x11' not found
! Component: 'wattcp/watt-32' not supported on darwin platform
! HB_INSTALL_PREFIX automatically set to: /usr/local
! REVISION: 15746
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
! 'sqlite3' library skipped (unused)
gcc -I. -I../../../../../include -fno-common -W -O3 -DHB_LEGACY_TYPES_OFF -o blocksor.o -c ../../../blocksor.c
In file included from /usr/include/libkern/arm/OSByteOrder.h:8,
from /usr/include/libkern/_OSByteOrder.h:70,
from /usr/include/sys/_endian.h:124,
from /usr/include/arm/endian.h:75,
from /usr/include/machine/endian.h:39,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from ../../../bzlib_pr.h:25,
from ../../../blocksor.c:22:
/usr/include/stdint.h:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
In file included from /usr/include/libkern/arm/OSByteOrder.h:8,
from /usr/include/libkern/_OSByteOrder.h:70,
from /usr/include/sys/_endian.h:124,
from /usr/include/arm/endian.h:75,
from /usr/include/machine/endian.h:39,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from ../../../bzlib_pr.h:25,
from ../../../blocksor.c:22:
/usr/include/stdint.h:3:1: error: invalid suffix "c0b7e54f82f10929bdfc91ac2dbefd" on integer constant
In file included from /usr/include/libkern/_OSByteOrder.h:70,
from /usr/include/sys/_endian.h:124,
from /usr/include/arm/endian.h:75,
from /usr/include/machine/endian.h:39,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from ../../../bzlib_pr.h:25,
from ../../../blocksor.c:22:
/usr/include/libkern/arm/OSByteOrder.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_OSSwapInt32'
/usr/include/libkern/arm/OSByteOrder.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_OSSwapInt64'
/usr/include/libkern/arm/OSByteOrder.h:83: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OSReadSwapInt16'
/usr/include/libkern/arm/OSByteOrder.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OSReadSwapInt32'
/usr/include/libkern/arm/OSByteOrder.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OSReadSwapInt64'
/usr/include/libkern/arm/OSByteOrder.h:134: error: expected declaration specifiers or '...' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:135: error: expected declaration specifiers or '...' before 'uint16_t'
/usr/include/libkern/arm/OSByteOrder.h: In function 'OSWriteSwapInt16':
/usr/include/libkern/arm/OSByteOrder.h:138: error: expected ')' before 'uint16_t'
/usr/include/libkern/arm/OSByteOrder.h:138: error: expected ')' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:138: error: 'offset' undeclared (first use in this function)
/usr/include/libkern/arm/OSByteOrder.h:138: error: (Each undeclared identifier is reported only once
/usr/include/libkern/arm/OSByteOrder.h:138: error: for each function it appears in.)
/usr/include/libkern/arm/OSByteOrder.h:138: error: 'data' undeclared (first use in this function)
/usr/include/libkern/arm/OSByteOrder.h: At top level:
/usr/include/libkern/arm/OSByteOrder.h:145: error: expected declaration specifiers or '...' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:146: error: expected declaration specifiers or '...' before 'uint32_t'
/usr/include/libkern/arm/OSByteOrder.h: In function 'OSWriteSwapInt32':
/usr/include/libkern/arm/OSByteOrder.h:149: error: expected ')' before 'uint32_t'
/usr/include/libkern/arm/OSByteOrder.h:149: error: expected ')' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:149: error: 'offset' undeclared (first use in this function)
/usr/include/libkern/arm/OSByteOrder.h:149: error: 'data' undeclared (first use in this function)
/usr/include/libkern/arm/OSByteOrder.h: At top level:
/usr/include/libkern/arm/OSByteOrder.h:156: error: expected declaration specifiers or '...' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:157: error: expected declaration specifiers or '...' before 'uint64_t'
/usr/include/libkern/arm/OSByteOrder.h: In function 'OSWriteSwapInt64':
/usr/include/libkern/arm/OSByteOrder.h:160: error: expected ')' before 'uint64_t'
/usr/include/libkern/arm/OSByteOrder.h:160: error: expected ')' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:160: error: 'offset' undeclared (first use in this function)
/usr/include/libkern/arm/OSByteOrder.h:160: error: 'data' undeclared (first use in this function)
make[3]: *** [blocksor.o] Error 1
make[2]: *** [descend] Error 2
make[1]: *** [bzip2] Error 2
make: *** [external] Error 2
Un Saludo. |
he conseguido un iphone | muy buenas, con harbour he creado sin problemas el .c pero ahora me da errores al utilizar el gcc para seguir.
¿Que puede ser?
iPhone:/var/mobile/harbour/harbour/samples root# gcc hello.c -c -I./../include
| grep fichero
In file included from /usr/include/libkern/arm/OSByteOrder.h:8,
from /usr/include/libkern/_OSByteOrder.h:70,
from /usr/include/sys/_endian.h:124,
from /usr/include/arm/endian.h:75,
from /usr/include/machine/endian.h:39,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from ./../include/hbdefs.h:58,
from ./../include/hbvmpub.h:56,
from hello.c:7:
/usr/include/stdint.h:2: error: expected '=', ',', ';', 'asm' or '__attribute__'
before numeric constant
In file included from /usr/include/libkern/arm/OSByteOrder.h:8,
from /usr/include/libkern/_OSByteOrder.h:70,
from /usr/include/sys/_endian.h:124,
from /usr/include/arm/endian.h:75,
from /usr/include/machine/endian.h:39,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from ./../include/hbdefs.h:58,
from ./../include/hbvmpub.h:56,
from hello.c:7:
/usr/include/stdint.h:3:1: error: invalid suffix "c0b7e54f82f10929bdfc91ac2dbefd
" on integer constant
In file included from /usr/include/libkern/_OSByteOrder.h:70,
from /usr/include/sys/_endian.h:124,
from /usr/include/arm/endian.h:75,
from /usr/include/machine/endian.h:39,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from ./../include/hbdefs.h:58,
from ./../include/hbvmpub.h:56,
from hello.c:7:
/usr/include/libkern/arm/OSByteOrder.h:40: error: expected '=', ',', ';', 'asm'
or '__attribute__' before '_OSSwapInt32'
/usr/include/libkern/arm/OSByteOrder.h:58: error: expected '=', ',', ';', 'asm'
or '__attribute__' before '_OSSwapInt64'
/usr/include/libkern/arm/OSByteOrder.h:83: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'OSReadSwapInt16'
/usr/include/libkern/arm/OSByteOrder.h:96: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'OSReadSwapInt32'
/usr/include/libkern/arm/OSByteOrder.h:109: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'OSReadSwapInt64'
/usr/include/libkern/arm/OSByteOrder.h:134: error: expected declaration specifie
rs or '...' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:135: error: expected declaration specifie
rs or '...' before 'uint16_t'
/usr/include/libkern/arm/OSByteOrder.h: In function 'OSWriteSwapInt16':
/usr/include/libkern/arm/OSByteOrder.h:138: error: expected ')' before 'uint16_t
'
/usr/include/libkern/arm/OSByteOrder.h:138: error: expected ')' before 'uintptr_
t'
/usr/include/libkern/arm/OSByteOrder.h:138: error: 'offset' undeclared (first us
e in this function)
/usr/include/libkern/arm/OSByteOrder.h:138: error: (Each undeclared identifier i
s reported only once
/usr/include/libkern/arm/OSByteOrder.h:138: error: for each function it appears
in.)
/usr/include/libkern/arm/OSByteOrder.h:138: error: 'data' undeclared (first use
in this function)
/usr/include/libkern/arm/OSByteOrder.h: At top level:
/usr/include/libkern/arm/OSByteOrder.h:145: error: expected declaration specifie
rs or '...' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:146: error: expected declaration specifie
rs or '...' before 'uint32_t'
/usr/include/libkern/arm/OSByteOrder.h: In function 'OSWriteSwapInt32':
/usr/include/libkern/arm/OSByteOrder.h:149: error: expected ')' before 'uint32_t
'
/usr/include/libkern/arm/OSByteOrder.h:149: error: expected ')' before 'uintptr_
t'
/usr/include/libkern/arm/OSByteOrder.h:149: error: 'offset' undeclared (first us
e in this function)
/usr/include/libkern/arm/OSByteOrder.h:149: error: 'data' undeclared (first use
in this function)
/usr/include/libkern/arm/OSByteOrder.h: At top level:
/usr/include/libkern/arm/OSByteOrder.h:156: error: expected declaration specifie
rs or '...' before 'uintptr_t'
/usr/include/libkern/arm/OSByteOrder.h:157: error: expected declaration specifie
rs or '...' before 'uint64_t'
/usr/include/libkern/arm/OSByteOrder.h: In function 'OSWriteSwapInt64':
/usr/include/libkern/arm/OSByteOrder.h:160: error: expected ')' before 'uint64_t
'
/usr/include/libkern/arm/OSByteOrder.h:160: error: expected ')' before 'uintptr_
t'
/usr/include/libkern/arm/OSByteOrder.h:160: error: 'offset' undeclared (first us
e in this function)
/usr/include/libkern/arm/OSByteOrder.h:160: error: 'data' undeclared (first use
in this function)
In file included from ./../include/hbdefs.h:78,
from ./../include/hbvmpub.h:56,
from hello.c:7:
/usr/include/stdint.h: At top level:
/usr/include/stdint.h:2: error: expected '=', ',', ';', 'asm' or '__attribute__'
before numeric constant
In file included from ./../include/hbdefs.h:78,
from ./../include/hbvmpub.h:56,
from hello.c:7:
/usr/include/stdint.h:3:1: error: invalid suffix "c0b7e54f82f10929bdfc91ac2dbefd
" on integer constant |
he conseguido un iphone | Juan,
Parece que estas compilando dentro del iPhone. Tienes que compilar en el Mac, no en el iPhone <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Muy buenas, así es Antonio, estoy compilando en el iPhone, la cuestion es que no tengo un Mac, ¿tenemos otras alternativas?
Un Saludo. |
he conseguido un iphone | Juan,
Puede ser que más adelante lleguemos a poder construir desde Windows o Linux, pero en estos momentos solo lo sabemos hacer con un Mac. |
he conseguido un iphone | Manuel, Daniel,
Ando intentando cargar un View (usando su controlador) desde un NIB:
MyController * about = [ [ MyController alloc ] initWithNibName : @"about" bundle : nil ];
pero no lo carga.
A ver si le encontramos la forma, y asi podemos usar el interface builder para diseñar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | * New class TActionSheet
+ classes/actionsheet.prg
+ sdkapi/actiossheets.m
+ samples/button2.prg
[img:1sxifip8]http://www.sitasoft.net/fivemac/iphone/screen/IMG_0073.png[/img:1sxifip8]
[img:1sxifip8]http://www.sitasoft.net/fivemac/iphone/screen/IMG_0074.png[/img:1sxifip8]
[img:1sxifip8]http://www.sitasoft.net/fivemac/iphone/screen/IMG_0075.png[/img:1sxifip8] |
he conseguido un iphone | [quote="softruz":lngsq5f5]Muy buenas, así es Antonio, estoy compilando en el iPhone, la cuestion es que no tengo un Mac, ¿tenemos otras alternativas?
Un Saludo.[/quote:lngsq5f5]
Compilando desde el iphone poco mas lejos de un "hello word" por consola hemos conseguido llegar ( ojo que seguro que se puede) .
Una opción que desde aqui "no te podemos recomendar" es instalar en una maquina virtual de VMware ,una de las muchas distribuciones de mac para tal efecto .Dependiendo de la configuracion del ordenador ,procesador , tarjeta , puede ser muy simple o complicarse , pero en general funciona en muchos equipos .La velocidad de ejecucion no es comparable a un Mac ,pero es "aceptable". Yo he instalado un Leopard , con proposito didactico ( tengo mac , asi que otro proposito sería ridiculo) ,en un ordenador con un AMD64 y funcionaba casi todo ( el sonido no ) .
Saludos. |
he conseguido un iphone | [quote="Antonio Linares":4g91g1yu]Manuel, Daniel,
Ando intentando cargar un View (usando su controlador) desde un NIB:
MyController * about = [ [ MyController alloc ] initWithNibName : @"about" bundle : nil ];
pero no lo carga.
A ver si le encontramos la forma, y asi podemos usar el interface builder para diseñar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:4g91g1yu]
Antonio mira este codigo, pon el nib dentro del app, por lo que bundle se puede asignar , para que lo encuentre , si o si .
por otor lado lo haces visible en [window makeKeyAndVisible];
hvc:view , ¿ Te devuelve nil ?
[code=fw:4g91g1yu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//HelloUniverseAppDelegate.m</span><br />- <span style="color: #000000;">(</span>void<span style="color: #000000;">)</span>applicationDidFinishLaunching:<span style="color: #000000;"><span style="color: #000000;">(</span>UIApplication</span> *<span style="color: #000000;">)</span>application <span style="color: #000000;">{</span> <br /><br />HelloUniverseController *hvc = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>HelloUniverseController alloc<span style="color: #000000;">]</span><br />initWithNibName:@<span style="color: #ff0000;">"HelloUniverse"</span> bundle:<span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span><span style="color: #000000;">]</span>;<br /><br /><span style="color: #00C800;">self</span>.hvController = hvc;<br /><br /><span style="color: #000000;">[</span>hvc <span style="color: #0000ff;">release</span><span style="color: #000000;">]</span>;<br /><br /><span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> addSubview:<span style="color: #000000;">[</span><span style="color: #00C800;">self</span>.hvController view<span style="color: #000000;">]</span><span style="color: #000000;">]</span>;<br /><br /><br /><span style="color: #B900B9;">// Override point for customization after application launch</span><br /><span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> makeKeyAndVisible<span style="color: #000000;">]</span>;<br /><span style="color: #000000;">}</span><br /> </div>[/code:4g91g1yu] |
he conseguido un iphone | Muy buenas Antonio, ¿podrías resolverme algunas dudas que tengo=, el mensaje de instalacion:
1. Instalamos openssh desde Cydia
2. Instalamos apt strict desde Cydia
3. Accedemos al iphone por SSH usando putty (login: root, contraseña: alpine)
4. para probar que el apt-get va bien, podemos hacer: apt-get install mc (se instala el midnight commander, con mc se ejecuta)
5. apt-get install subversion
6. Creamos una carpeta harbour (mkdir harbour) y descargamos harbour:
svn co <!-- m --><a class="postlink" href="https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk">https://harbour-project.svn.sourceforge ... ject/trunk</a><!-- m --> harbour
7. Instalamos el GNU C compiler desde Cydia (aqui hay un problema que solucionar)
8. apt-get install wget
9. wget <!-- m --><a class="postlink" href="http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb">http://apt.saurik.com/debs/libgcc_4.2-2 ... os-arm.deb</a><!-- m -->
10. dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb
11. apt-get install iphone-gcc
ya podemos escribir gcc y vemos que se ejecuta bien
12. apt-get install make ldid zip unzip
13. Los ficheros de cabecera del gcc no vienen incluidos asi que los copiamos desde el Mac al iPhone:
en el Mac estan en: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/usr/include
en el iPhone ponerlos en: /usr/include
Los he copiado usando el Total Commander con el plugin SFTP
14. Desde la carpeta de Harbour, escribir make
es en el iPhone, no?. Yo he seguido los pasos estos y creia que se podía compilar desde un iPhone, entonces por que instalamos todo en el iPhone.
Un Saludo. |
he conseguido un iphone | [quote="softruz":4o9tzh6k]Muy buenas Antonio, ¿podrías resolverme algunas dudas que tengo=, el mensaje de instalacion:
1. Instalamos openssh desde Cydia
2. Instalamos apt strict desde Cydia
3. Accedemos al iphone por SSH usando putty (login: root, contraseña: alpine)
4. para probar que el apt-get va bien, podemos hacer: apt-get install mc (se instala el midnight commander, con mc se ejecuta)
5. apt-get install subversion
6. Creamos una carpeta harbour (mkdir harbour) y descargamos harbour:
svn co <!-- m --><a class="postlink" href="https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk">https://harbour-project.svn.sourceforge ... ject/trunk</a><!-- m --> harbour
7. Instalamos el GNU C compiler desde Cydia (aqui hay un problema que solucionar)
8. apt-get install wget
9. wget <!-- m --><a class="postlink" href="http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb">http://apt.saurik.com/debs/libgcc_4.2-2 ... os-arm.deb</a><!-- m -->
10. dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb
11. apt-get install iphone-gcc
ya podemos escribir gcc y vemos que se ejecuta bien
12. apt-get install make ldid zip unzip
13. Los ficheros de cabecera del gcc no vienen incluidos asi que los copiamos desde el Mac al iPhone:
en el Mac estan en: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/usr/include
en el iPhone ponerlos en: /usr/include
Los he copiado usando el Total Commander con el plugin SFTP
14. Desde la carpeta de Harbour, escribir make
es en el iPhone, no?. Yo he seguido los pasos estos y creia que se podía compilar desde un iPhone, entonces por que instalamos todo en el iPhone.
Un Saludo.[/quote:4o9tzh6k]
Efectivamente ese fué el primer metodo seguido ,con el se compiló las librerias del Harbour para iphone y conseguimos construir un "hello" en modo consola .De eso no conseguimos pasar .
Visto que el tema era complicado y las compilaciones tardaban bastante ,pasamos a compilar en el mac usando las libreria de harbour generadas .No es que no se pueda , que seguro que si( tirando horas en resolver problemas) , pero no es práctico . si cada compilación nueva lleva 2 o 3 minutos , depurar o mirar errores puede ser un "horror".De momento , se trata de "completar" una libreria de controles mínima para poder crear un programita simple y cuando esto esté conseguido , se intentará mirar el poder compilar desde distintas plataformas ( incluido el propio iphone ) supongo .
Saludos. |
he conseguido un iphone | Muchas gracias, ya lo he comprendido todo, yo voy a intentar 2 caminos:
- Compilar desde Mac virtualizado o Instalando Mac en una particion en un PC.
- Tambien voy a intentar compilar desde OpenSuse.
Un Saludo y ya os comentaré.
Un Saludo. |
he conseguido un iphone | Juan,
Existe una utilidad gratuita llamada "Empire EFI" que te permite instalar Snow Leopard en un PC, siempre y cuando reuna una serie de condiciones (no AMD, algunas placas madre si, etc). Pero puedes probar.
Ojo que la licencia de Apple no autoriza a hacer eso. Pero bueno, tampoco autoriza al jailbreak (aunque ya es legal). Te sirve para probar...
Si no tienes el Empire EFI, te lo envio. Yo personalmente solo trabajo con ordenadores Apple originales <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Juan,
No puedes virtualizar OSX desde un PC porque OSX comprueba el hardware. Solo se puede virtualizar desde un Mac (me refiero a un OSX original, no modificado). |
he conseguido un iphone | [quote="Antonio Linares":2ipce6u0]Juan,
No puedes virtualizar OSX desde un PC porque OSX comprueba el hardware. Solo se puede virtualizar desde un Mac (me refiero a un OSX original, no modificado).[/quote:2ipce6u0]
Efectivamente tiene que ser una distribución hackintosh ( existen muchas y muy buenas ) .
[quote="softruz":2ipce6u0]
- Tambien voy a intentar compilar desde OpenSuse.
Un Saludo.[/quote:2ipce6u0]
Mirando lo de compilar en un linux , encontre esto :[url:2ipce6u0]http://www.ipodtouchfans.com/forums/showthread.php?t=243103[/url:2ipce6u0]
Es para windows ....
Saludos. |
he conseguido un iphone | Antonio si me puedes enviar el "Empire EFI", muchas gracias, me lo puedes enviar a la direccion de correo de usuario.
Un Saludo. |
he conseguido un iphone | Juan,
Enviado <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Recuerda que tienes que usar un OSX Snow Leopard "generico" (el que venden por ejemplo en Fnac), no te vale el que viene con un Mac, ó con portatil. Esos son especificos para esos ordenadores. |
he conseguido un iphone | Manuel,
He intentado modificar el MsgSound() para reproducir un fichero "aac" en vez de "wav", y lo curioso es que funciona en el simulador y no va en el telefono.
Lo he probado tambien desde el xcode...
Puedes probarlo ahi ? gracias |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.