Massimo,
Yes, by now, it is required that you jailbreak it ![]()
(S铆, por ahora, es necesario hacerle el jailbreak)
Massimo,
Yes, by now, it is required that you jailbreak it ![]()
(S铆, por ahora, es necesario hacerle el jailbreak)
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)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.

http://www.ikangai.com/blog/development/code-snippet-of-the-week-modal-uialertview-updateManuel, 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 ![]()
@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];
}....
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
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
Antonio Linares wrote:No se puede usar el emulador porque en realidad es un simulador que ejecuta c贸digo intel, no arm.
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
function Main()
聽 聽local oWnd := TWindow():New()
聽 聽TNavBar():New( oWnd, "FivePhone", "Exit", "About" )
聽 聽oWnd:Activate()
聽 聽
return nil

#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 ] );
}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