he conseguido un iphone

Re: he conseguido un iphone

Postby Antonio Linares » Fri Oct 22, 2010 2:22 pm

Massimo,

Yes, by now, it is required that you jailbreak it :-)

(Sí, por ahora, es necesario hacerle el jailbreak)
regards, saludos

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

Re: he conseguido un iphone

Postby mastintin » Fri Oct 22, 2010 7:35 pm

Seguimos testeando cosas ....
Buenas noticias ....
con este codigo ....
Code: Select all  Expand view

function Main()
     local oWnd := TWindow():New()
     local cpath:= apppath()

   local cDbf:= cpath+"/test.dbf"
   local cAlias
   oWnd:Activate()
   
   MsgInfo( "Hello world! "+cDbf )
   use (cDbf) New
   calias:=alias()
   Msginfo(calias)
   dbgoto(5)
   msginfo( (calias)->last )
   dbskip(5)
   msginfo( (calias)->last )
  close(calias)

 

La gestion de dbfs parece que funciona sin problema . Me enconrado con una sorpresa los distintos msginfo se muestran en orden inverso a como deberian .. . primero aparece el último de ellos y según le vamos dando al ok van apareciendo el resto..
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Fri Oct 22, 2010 8:34 pm

Manuel,

Parece que el MsgInfo() aun no se muestra modal, de ahi que se habran todos y se vea el ultimo.

Tenemos que buscar la forma de hacerlo modal. Debe existir alguna opcion.
regards, saludos

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

Re: he conseguido un iphone

Postby mastintin » Fri Oct 22, 2010 9:03 pm

Una especie de msgGet ....
de momento no estamos pasando los distintos "datos" al harbour solo estamos colocando en pantalla cosas y viendo ideas y problemas , pero queda muy aparente .
Saludos.
Image
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Fri Oct 22, 2010 9:22 pm

Antonio al tema del modal ... mira este codigo , puede ser una solución
Code: Select all  Expand view
http://www.ikangai.com/blog/development/code-snippet-of-the-week-modal-uialertview-update

. En principio el iphone esta pensado para no modal ..
Saludso.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Fri Oct 22, 2010 9:32 pm

Manuel, Daniel,

He actualizado el repositorio del FivePhone a la versión más reciente. Podeis actualizar desde:
https://fivephone.googlecode.com/svn/trunk/

samples/tutor03 ya funciona, aunque con limitaciones que hay que implementar :-)
regards, saludos

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

Re: he conseguido un iphone

Postby mastintin » Fri Oct 22, 2010 10:01 pm

Antonio he encontrado este codigo ,pero no consiguo que funcione como se espera , yo por hoy lo dejo ...
Code: Select all  Expand view


@interface MyUIAlertViewDelegate : NSObject <UIActionSheetDelegate, UIAlertViewDelegate>  
{  
    int result;  
}  

-(int)getResult;  

@end;  

@implementation MyUIAlertViewDelegate  

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex  
{  
    result = buttonIndex;  
}  

-(int)getResult  
{  
    return result;  
}  

@end;  
 
void MimsSleep(uint32_t msec)
{
    struct timespec timeout0;
    struct timespec timeout1;
    struct timespec* tmp;
    struct timespec* t0 = &timeout0;
    struct timespec* t1 = &timeout1;
   
    t0->tv_sec = msec / 1000;
    t0->tv_nsec = (msec % 1000) * (1000 * 1000);
   
    while ((nanosleep(t0, t1) == (-1)) && (errno == EINTR))
    {
        tmp = t0;
        t0 = t1;
t1 = tmp;
}
}

HB_FUNC( MSGBEEP )
{
   // NSBeep();
}  

void MsgInfo( NSString * text )
{
   
    MyUIAlertViewDelegate *lpDelegate = [[MyUIAlertViewDelegate alloc] init];
   
    UIAlertView * alert = [ [ UIAlertView alloc ] initWithTitle : @"Information"
                                                        message : text delegate : lpDelegate
                                              cancelButtonTitle : @"OK" otherButtonTitles : nil ];  
   
        [ alert show ];
   
   
    // Run modally!
    // By the time this loop terminates, our delegate will have been called and we can
    // get the result from the delegate (i.e. what button was pressed...)
    while ((!alert.hidden) && (alert.superview!=nil))
    {
        [[NSRunLoop currentRunLoop] limitDateForMode:NSDefaultRunLoopMode];
        Mimssleep(10);
    }
   
    // Grab the result from our delegate (via a custom property)
    int nResult = [lpDelegate getResult];
   
    // aqui damos salida al resultado
   
       
    [ alert release ];  
   
    [lpDelegate release];
   
}





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

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Fri Oct 22, 2010 10:38 pm

....

Sono la flauta ( a medias )...
(efectivamente faltaba el uso de ldid -S)

he logrado compilar tutor03 pero al copiarla al telefono no se ejecuta, puedo ejecutar la aplicacion desde el emulador?

se ve como si estuviese abriendo pero vuelve al springboard sin mostrar nada
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 » Fri Oct 22, 2010 10:43 pm

Daniel,

No se puede usar el emulador porque en realidad es un simulador que ejecuta código intel, no arm.

Prueba con tutor02 que es más simple
regards, saludos

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

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Fri Oct 22, 2010 10:54 pm

Antonio...

Antonio Linares wrote:No se puede usar el emulador porque en realidad es un simulador que ejecuta código intel, no arm.

Entendido

mismo resultado con tutor02

si ejecuta "hello.prg"
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 » Sat Oct 23, 2010 5:19 am

Daniel,

Te digo como lo estamos usando nosotros:

una vez construido el ejecutable, copialo dentro de la aplicacion TabBarSample, renombrando tu ejecutable a TabBarSample y hazle chmod +x TabBarSample
regards, saludos

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

Re: he conseguido un iphone

Postby Antonio Linares » Sat Oct 23, 2010 7:01 am

Progresando con el UINavigationBar:

tutor03.prg
Code: Select all  Expand view

function Main()

   local oWnd := TWindow():New()

   TNavBar():New( oWnd, "FivePhone", "Exit", "About" )

   oWnd:Activate()
   
return nil
 

Image
regards, saludos

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

Re: he conseguido un iphone

Postby Antonio Linares » Sat Oct 23, 2010 9:38 am

Ejecutando acciones desde los botones de la barra de navegación:

Image
regards, saludos

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

Re: he conseguido un iphone

Postby mastintin » Sat Oct 23, 2010 9:45 am

Antonio , no se muy bien como subir archivos al repositorio , lo he intentado con el snvX paro me da un error ( puede que sea solo cosas de permisos ) dejo el archivo system.m con una sola funcion :
Code: Select all  Expand view

#import <UIKit/UIKit.h>
#import <UIKit/UIApplication.h>
#define HB_DONT_DEFINE_BOOL
#include <hbapi.h>


HB_FUNC( APPPATH )
{
   NSString * buPath = [ [ NSBundle mainBundle ] bundlePath ];

   hb_retc( [ buPath cStringUsingEncoding : NSASCIIStringEncoding ] );      
}
 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Sat Oct 23, 2010 9:49 am

Antonio Linares wrote:Daniel,

Te digo como lo estamos usando nosotros:

una vez construido el ejecutable, copialo dentro de la aplicacion TabBarSample, renombrando tu ejecutable a TabBarSample y hazle chmod +x TabBarSample


Antonio

es exactamente lo que hago, de hecho lo hace buildmac automáticamente
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

PreviousNext

Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: Google [Bot] and 24 guests