Page 30 of 43
Re: he conseguido un iphone
Posted: Mon Nov 29, 2010 10:22 am
by mastintin
Muy bueno lo del hack
.
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.
Re: he conseguido un iphone
Posted: Mon Nov 29, 2010 11:10 am
by Antonio Linares
Manuel,
Mi voto es ambos
Que pueda escribirse como VIEW ó DIALOG, asi ayudamos a los FiveWinners que vayan llegando
Re: he conseguido un iphone
Posted: Mon Nov 29, 2010 12:30 pm
by Daniel Garcia-Gil
Antonio Linares wrote:Manuel,
Mi voto es ambos
Que pueda escribirse como VIEW ó DIALOG, asi ayudamos a los FiveWinners que vayan llegando
Misma opinion
Re: he conseguido un iphone
Posted: Mon Nov 29, 2010 11:06 pm
by mastintin
Implementados los commandos de Dialog - View
Implementados los commandos del tabbar ....
ahora es muy facil crear tabbars genericos ...
Code: Select all | Expand
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 :
Re: he conseguido un iphone
Posted: Tue Nov 30, 2010 1:52 pm
by mastintin
primera implementacion de comandos NavBar funcionando.
el codigo que ejemplo de tabbar y navbar con comandos :
Code: Select all | Expand
#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
Re: he conseguido un iphone
Posted: Wed Dec 01, 2010 9:55 pm
by mastintin
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
#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
Re: he conseguido un iphone
Posted: Thu Dec 02, 2010 1:16 am
by Antonio Linares
Manuel,
Está estupendo, enhorabuena!
Re: he conseguido un iphone
Posted: Thu Dec 02, 2010 7:34 am
by pgfdz
¡¡Bonito!! Esto se está convirtiendo en una costumbre, llegar al curro y tirarse al post "he conseguido un iphone", jajajaja
Enhorabuena
Re: he conseguido un iphone
Posted: Thu Dec 02, 2010 9:09 pm
by mastintin
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
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
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
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 ...
Re: he conseguido un iphone
Posted: Fri Dec 03, 2010 8:53 am
by Antonio Linares
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
Re: he conseguido un iphone
Posted: Fri Dec 03, 2010 9:32 am
by Antonio Linares
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
Re: he conseguido un iphone
Posted: Fri Dec 03, 2010 10:54 pm
by mastintin
Antonio nos falta un methodo para oview:end() .
si creamos una ventana ,matarla , se te ocurre algo ?
Re: he conseguido un iphone
Posted: Sat Dec 04, 2010 9:17 am
by Antonio Linares
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
Re: he conseguido un iphone
Posted: Sat Dec 04, 2010 11:27 am
by mastintin
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 .
Code: Select all | Expand
HB_FUNC( VIEWEND )
{
UIView * view = ( UIView * ) hb_parnl( 1 );
[view removeFromSuperview ];
[view release];
}
Re: he conseguido un iphone
Posted: Sat Dec 04, 2010 12:24 pm
by mastintin
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
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 ..
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 .....