he conseguido un iphone

Re: he conseguido un iphone

Postby ramirezosvaldo2 » Thu Nov 04, 2010 3:43 am

Mi estimado ... tarde pero sin sueño, me uno a las pruebas.

Por donde iniciamos, o que bajamos.

Saludos
Osvaldo Ramirez
ramirezosvaldo2
 
Posts: 58
Joined: Mon Jan 19, 2009 4:40 pm

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Thu Nov 04, 2010 5:20 am

...

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 :D
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: he conseguido un iphone

Postby Antonio Linares » Thu Nov 04, 2010 6:14 am

Juan, Osvaldo,

Podeis descargar Harbour para OSX (Mac) desde aqui:
http://www.fivetechsoft.com/files/harbour_osx.zip

Y Harbour para el iOS (iPhone/iPad) desde aqui:
http://www.fivetechsoft.com/files/harbour_ios.zip

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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby Antonio Linares » Thu Nov 04, 2010 7:11 am

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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby Antonio Linares » Thu Nov 04, 2010 7:24 am

Daniel,

Probado tu ejemplo con los cambios en el acelerómetro. Esta chulísimo !!! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: he conseguido un iphone

Postby mastintin » Thu Nov 04, 2010 8:06 am

Daniel , efectivamente el problema estaba en el tipo que no eran NSinteger :) .
El Ejemplo buenísimo.Cambiamos el label por una imagen dew una bola y a crear video juegos :lol: .
Saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Thu Nov 04, 2010 8:56 am

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: Select all  Expand view


HB_FUNC( SETIMAGEBUTTON )
{
UIButton * button = ( UIButton * ) hb_parnl( 1 );
NSString * imageNormal  = hb_NSSTRING_par( 2 );
NSString * imagePressed = hb_NSSTRING_par( 3 );
   
button.backgroundColor = [UIColor clearColor];
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal ];

UIImage *buttonImageNormal = [UIImage imageNamed: imageNormal ];
UIImage *strechableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:12 topCapHeight:0];
[button setBackgroundImage:strechableButtonImageNormal forState:UIControlStateNormal];

UIImage *buttonImagePressed = [UIImage imageNamed: imagePressed ];
UIImage *strechableButtonImagePressed = [buttonImagePressed stretchableImageWithLeftCapWidth:12 topCapHeight:0];
[button setBackgroundImage:strechableButtonImagePressed forState:UIControlStateHighlighted];

}

 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Error de espacio

Postby softruz » Thu Nov 04, 2010 10:09 am

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.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Thu Nov 04, 2010 12:00 pm

Antonio Linares wrote: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 );


faltaban esos prototipos

Antonio Linares wrote: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 :-)


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_OBJECT e invocarla desde PRG para liberar el objeto PRG en objective-C y remover el objeto del "View" (voy a probar)
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Thu Nov 04, 2010 12:56 pm

mastintin wrote: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 ,


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( iPar, HB_IT_ANY ) ) (esto lo usamos en fivewin para rutar los eventos de los controles activex) 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 )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: he conseguido un iphone

Postby mastintin » Thu Nov 04, 2010 3:10 pm

Daniel , gracias por la explicación. :D
Daniel Garcia-Gil wrote:subido el codigo que colocaste del botton ( no lo he probado )

Lo he probado y funcionar,funciona. Falta poner parametros para las medidas de las imagenes ,pero como primera aproximacion vale.
Un Saludo.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Error

Postby softruz » Thu Nov 04, 2010 3:26 pm

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 - http://harbour-project.org
! 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.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Error al crear Gcc

Postby softruz » Thu Nov 04, 2010 4:44 pm

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
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Re: he conseguido un iphone

Postby Antonio Linares » Thu Nov 04, 2010 9:30 pm

Juan,

Parece que estas compilando dentro del iPhone. Tienes que compilar en el Mac, no en el iPhone :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Construir no en el Mac

Postby softruz » Thu Nov 04, 2010 10:35 pm

Muy buenas, así es Antonio, estoy compilando en el iPhone, la cuestion es que no tengo un Mac, ¿tenemos otras alternativas?

Un Saludo.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

PreviousNext

Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 0 guests