he conseguido un iphone

Re: he conseguido un iphone

Postby mastintin » Mon Nov 29, 2010 10:22 am

Muy bueno lo del hack :D .
Antonio, Daniel quiero implementar los comandos para la clase View , pero no se si usar el comando DIALOG ,por similitud con el resto de los productos five o usar un nuevo comando VIEW . ¿ Como lo veis ?.
Saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Mon Nov 29, 2010 11:10 am

Manuel,

Mi voto es ambos :-)

Que pueda escribirse como VIEW ó DIALOG, asi ayudamos a los FiveWinners que vayan llegando :-)
regards, saludos

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

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Mon Nov 29, 2010 12:30 pm

Antonio Linares wrote:Manuel,

Mi voto es ambos :-)

Que pueda escribirse como VIEW ó DIALOG, asi ayudamos a los FiveWinners que vayan llegando :-)


Misma opinion
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 » Mon Nov 29, 2010 11:06 pm

Implementados los commandos de Dialog - View
Implementados los commandos del tabbar ....
ahora es muy facil crear tabbars genericos ...
Code: Select all  Expand view

function Main()

   local oWnd , oLabel
   
   local oVista1, oView2, oTabbar
   local onavitem , onav1,onav2  
   
    DEFINE WINDOW oWnd COLOR 255,255,0,100

   DEFINE TABS oTabBar OF oWnd ITEMS "UNO","DOS","TRES"  OPTION 2  
     
 @ 100, 130 SAY "First" OF oTabBar:aView[1]
 @ 100, 130 SAY "Second" OF oTabBar:aView[2]
 @ 100, 130 SAY "TRES" OF oTabBar:aView[3]  
 
   ACTIVATE WINDOW oWnd
   
return nil  

 

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

Re: he conseguido un iphone

Postby mastintin » Tue Nov 30, 2010 1:52 pm

primera implementacion de comandos NavBar funcionando.
el codigo que ejemplo de tabbar y navbar con comandos :
Code: Select all  Expand view

#include "fivephone.ch"
 
function Main()

   local oWnd , oLabel
   
   local oVista1, oView2, oTabbar
   local onavitem , onav1,onav2  
   
    DEFINE WINDOW oWnd COLOR 255,255,0,100

    DEFINE TABS oTabBar OF oWnd ITEMS "UNO","DOS","TRES" ;
    OPTION 2  
 
   
 @ 100, 130 SAY "First" OF oTabBar:aView[1]
 @ 100, 130 SAY "Second" OF oTabBar:aView[2]
 @ 100, 130 SAY "TRES" OF oTabBar:aView[3]  
 
 
 DEFINE NAVBAR oNav1 TITLE "Vista 1" OF oTabBar:aView[1] ;
            BTNLEFT "Exit 1"   ACTION msginfo("exit1")  ;
            BTNRIGHT "About 1" ACTION msginfo("About1")
 
 DEFINE NAVBAR oNav2 TITLE "Vista 2" OF oTabBar:aView[2] ;
            BTNLEFT "Exit 2"   ACTION msginfo("exit2")  ;
            BTNRIGHT "About 2" ACTION msginfo("About2")
                             
  ACTIVATE WINDOW oWnd
   
return nil    



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

Re: he conseguido un iphone

Postby mastintin » Wed Dec 01, 2010 9:55 pm

Implementado el comando listbox .Se puede mejorar aun mucho pero por ahora lo dejo asi .
Un ejemplo , tres tabs y en el segundo tab el listbox :

Code: Select all  Expand view

 #include "fivephone.ch"
 
function Main()

   local oWnd , oTabbar
   local  onav1,onav2 , oBrw
     
    DEFINE WINDOW oWnd COLOR 255,255,0,100

   DEFINE TABS oTabBar OF oWnd ITEMS "UNO","DOS","TRES" ;
    OPTION 2  
 
   
 @ 100, 130 SAY "First" OF oTabBar:aView[1]
 @ 100, 130 SAY "TRES" OF oTabBar:aView[3]  
 
 
 DEFINE NAVBAR oNav1 TITLE "Vista 1" OF oTabBar:aView[1] ;
            BTNLEFT "Exit 1"   ACTION msginfo("exit1")  ;
            BTNRIGHT "About 1" ACTION msginfo("About1")
 
 DEFINE NAVBAR oNav2 TITLE "Configuracion" OF oTabBar:aView[2] ;
            BTNLEFT "Exit 2"   ACTION msginfo("exit2")  ;
            BTNRIGHT "About 2" ACTION msginfo("About2")
           
                             
  @  10, 100  LISTBOX oBrw ;
              ITEMS { "Indices","Parametros","Conexiones"} ;
              HEADS {space(21)+"Varios"} ;
              OF oTabBar:aView[2]  ;
              SIZE 300,190 ;
              CELLHEIGHT 90 ;
              CELLSTYLE  1   ;
              CELLACCESORY 2 ;
              GROUP
             
            obrw:SetBackClear()
           
         
   ACTIVATE WINDOW oWnd
   
return nil    

 


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

Re: he conseguido un iphone

Postby Antonio Linares » Thu Dec 02, 2010 1:16 am

Manuel,

Está estupendo, enhorabuena! :-)
regards, saludos

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

Re: he conseguido un iphone

Postby pgfdz » Thu Dec 02, 2010 7:34 am

¡¡Bonito!! Esto se está convirtiendo en una costumbre, llegar al curro y tirarse al post "he conseguido un iphone", jajajaja

Enhorabuena
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby mastintin » Thu Dec 02, 2010 9:09 pm

Antonio tenemos un problema en la libreria de harbour ....
Al usar la funcion alias() en un prg en el simulador me da este error :
Code: Select all  Expand view

ld: duplicate symbol _HB_FUN_ALIAS in /Users/manuel/Desktop/paraiphone/harbour/lib/libharbour.a(dbcmd.o) and /Users/manuel/Desktop/paraiphone/harbour/lib/libharbour.a(nulsys.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

 


A sumar ... el mismo código , si me paso al Device en vez el simulador meda otro error distinto :
Code: Select all  Expand view

ld: duplicate symbol _HB_FUN_DBUNLOCK in /Users/manuel/Desktop/paraiphone/harbour/lib/libharbour.a(dbcmd.o) and /Users/manuel/Desktop/paraiphone/harbour/lib/libharbour.a(nulsys.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

 


Si uso el simulador y quito la referencia a la funcion alias() del prg ahora el error es :
Code: Select all  Expand view

ld: duplicate symbol _hb_rddSelectWorkAreaAlias in /Users/manuel/Desktop/paraiphone/harbour/lib/libharbour.a(nulsys.o) and /Users/manuel/Desktop/paraiphone/harbour/lib/libharbour.a(wafunc.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
 


Si usamos las librerias antiguas de harbour para iphone y compilamos desde terminal funciona sin problemas ...
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Fri Dec 03, 2010 8:53 am

Manuel,

El problema es que hemos añadido la librería libnullrdd.a junto con las otras librerias de RDDs al construir la librería única.

Hay que quitar libnullrdd.a al construir la libreria completa de Harbour
regards, saludos

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

Re: he conseguido un iphone

Postby Antonio Linares » Fri Dec 03, 2010 9:32 am

Quedaría así:

libtool -static -o libharbour.a libhbcommon.a libhbcpage.a libhbcplr.a libhbdebug.a libhbextern.a libhbhsx.a libhblang.a libhbmacro.a libhbrdd.a libhbrtl.a libhbsix.a libhbuddall.a libhbusrrdd.a libhbvm.a libjpeg.a liblibhpdf.a libminizip.a libpng.a librddcdx.a librddfpt.a librddnsx.a librddntx.a

Aqui está la librería completa de Harbour (iPhone/iPad y simuladores) de nuevo:
http://fivephone.googlecode.com/files/libharbour.a
regards, saludos

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

Re: he conseguido un iphone

Postby mastintin » Fri Dec 03, 2010 10:54 pm

Antonio nos falta un methodo para oview:end() .
si creamos una ventana ,matarla , se te ocurre algo ?
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby Antonio Linares » Sat Dec 04, 2010 9:17 am

Manuel,

En la Clase TWindow tenemos:

METHOD End() INLINE WndClose( ::hWnd ), EndPool()

Que destruye la ventana y hace que se salga del bucle principal, liberando el pool de memoria. Pues las aplicaciones del iPhone/iPad solo tienen una única ventana.

Para el método End() de la Clase TView solo tendriamos que hacer:

[ view release ];

y removerla de nuestro array devuelto por GetAllWin(). Creo que con eso es suficiente :-)
regards, saludos

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

Re: he conseguido un iphone

Postby mastintin » Sat Dec 04, 2010 11:27 am

Añadido el methodo end a los view . Ya esta funcionando bien .
Realizaba el borrado y redimensionamiento del array de controles de harbour , y el release del objeto , pero el detalle que me tenia parado es que no realizaba la "baja" del objeto en el su superview de objective c :
Ahora si funciona . :D
Code: Select all  Expand view


HB_FUNC( VIEWEND )
{
    UIView * view = ( UIView * ) hb_parnl( 1 );
    [view removeFromSuperview ];
    [view release];        
}  


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

Re: he conseguido un iphone

Postby mastintin » Sat Dec 04, 2010 12:24 pm

que numeros son los que tendría que pasar como parametros para las animaciones ? . No entiendo que devuelve cada cosa
el problema es que es una variable NSUInteger y yo paso una variable hb_parnl que se supone es integer , por lo que no tiene el mismo tipo ...

Code: Select all  Expand view

UIViewAnimationOptions
Specifies options for animating views with blocks.

enum {
   UIViewAnimationOptionLayoutSubviews            = 1 <<  0,
   UIViewAnimationOptionAllowUserInteraction      = 1 <<  1,
   UIViewAnimationOptionBeginFromCurrentState     = 1 <<  2,
   UIViewAnimationOptionRepeat                    = 1 <<  3,
   UIViewAnimationOptionAutoreverse               = 1 <<  4,
   UIViewAnimationOptionOverrideInheritedDuration = 1 <<  5,
   UIViewAnimationOptionOverrideInheritedCurve    = 1 <<  6,
   UIViewAnimationOptionAllowAnimatedContent      = 1 <<  7,
   UIViewAnimationOptionShowHideTransitionViews   = 1 <<  8,
   
   UIViewAnimationOptionCurveEaseInOut            = 0 << 16,
   UIViewAnimationOptionCurveEaseIn               = 1 << 16,
   UIViewAnimationOptionCurveEaseOut              = 2 << 16,
   UIViewAnimationOptionCurveLinear               = 3 << 16,
   
   UIViewAnimationOptionTransitionNone            = 0 << 20,
   UIViewAnimationOptionTransitionFlipFromLeft    = 1 << 20,
   UIViewAnimationOptionTransitionFlipFromRight   = 2 << 20,
   UIViewAnimationOptionTransitionCurlUp          = 3 << 20,
   UIViewAnimationOptionTransitionCurlDown        = 4 << 20,
};
typedef NSUInteger UIViewAnimationOptions;
 


----------------- edito -------------------
Resuelto he cambiado la forma de implementarlo y ya no necesito lo anterior .. :D
Saludos.
como ampliacion y que quede aqui .....

UIViewAnimationOptionTransitionFlipFromLeft = 1 << 20 => su valor es 1048576 * 1
UIViewAnimationOptionTransitionFlipFromRight = 2 << 20, => su valor es 1048576 * 2 .....

UIViewAnimationOptionCurveEaseIn = 1 << 16 => su valor 65536 *1 .....
Last edited by mastintin on Sat Dec 04, 2010 10:40 pm, edited 1 time in total.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

PreviousNext

Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 1 guest