he conseguido un iphone

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 5:59 pm

huston, huston...



/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static -o ./lib/libfive.a ./obj/accel.o ./obj/actind.o ./obj/actionsheet.o ./obj/button.o ./obj/datepck.o ./obj/imgview.o ./obj/label.o ./obj/movie.o ./obj/navbar.o ./obj/nsobject.o ./obj/tblview.o ./obj/get.o ./obj/toolbar.o ./obj/picview.o ./obj/progres.o ./obj/search.o ./obj/segment.o ./obj/slider.o ./obj/switch.o ./obj/tabbar.o ./obj/timer.o ./obj/tblviewCell.o ./obj/valtochr.o ./obj/webview.o ./obj/view.o ./obj/window.o
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -mthumb -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -fobjc-legacy-dispatch -I./../harbour/include -I./include -Wall -c -o objc/views.o source/sdkapi/views.m
source/sdkapi/views.m: In function ‘-[View drawRect:]’:
source/sdkapi/views.m:74: error: ‘symFPH’ undeclared (first use in this function)
source/sdkapi/views.m:74: error: (Each undeclared identifier is reported only once
source/sdkapi/views.m:74: error: for each function it appears in.)
source/sdkapi/views.m:77: warning: implicit declaration of function ‘hb_vmPushSymbol’
source/sdkapi/views.m:78: warning: implicit declaration of function ‘hb_vmPushNil’
source/sdkapi/views.m:79: warning: implicit declaration of function ‘hb_vmPushLong’
source/sdkapi/views.m:79: error: aggregate value used where an integer was expected
source/sdkapi/views.m:80: error: ‘WM_VIEWPAINT’ undeclared (first use in this function)
source/sdkapi/views.m:81: warning: implicit declaration of function ‘hb_vmDo’
source/sdkapi/views.m: In function ‘HB_FUN_CLEARAREA’:
source/sdkapi/views.m:303: error: incompatible type for argument 2 of ‘CGContextClearRect’
make: *** [objc/views.o] Error 1
rm obj/progres.c obj/actind.c obj/get.c obj/label.c obj/search.c obj/switch.c obj/timer.c obj/webview.c obj/tabbar.c obj/navbar.c obj/picview.c obj/nsobject.c obj/slider.c obj/segment.c obj/accel.c obj/toolbar.c obj/valtochr.c obj/tblview.c obj/tblviewCell.c obj/view.c obj/button.c obj/window.c obj/movie.c obj/actionsheet.c obj/imgview.c obj/datepck.c
MacBook-Pro-de-Francisco-Garcia-Fernandez:fivephone franciscogarciafernandez$
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 6:13 pm

Te lo grabo en video para que veas. También me ha salido un directorio fivephone Working Copy ??? que coño he hecho???
http://www.youtube.com/watch?v=HUs-CXwO_JA
Last edited by pgfdz on Mon Dec 27, 2010 6:37 pm, edited 1 time in total.
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby mastintin » Mon Dec 27, 2010 6:37 pm

Aun no estaban subidos los cambios al repositorio . Vuelve a cargar el repositorio ahora ... atento que el archivo fmsgs.h que esta en include tambien tiene cambios .
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 6:43 pm

la libreria monta ok. Pegame el código, plis
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby mastintin » Mon Dec 27, 2010 7:05 pm

pgfdz wrote:la libreria monta ok. Pegame el código, plis

He vuelto a subir una nueva version de view.m al repositorio borrando un msginfo() de la depuracion que se quedo sin borrar .Vuelve a cargar el repositorio y regenera la libreria .
El codigo que tengo ahora mismo , un poco mas elaborado ya es este :
Code: Select all  Expand view

#include "fivephone.ch"

function Main()

   local owebview ,oWnd := TWindow():GetMain()  
 
     oView1 = TView():New( oWnd,0, 0, ScreenWidth(), ScreenHeight() - 49 )
     oView1:SetBkgColor( 0, 255, 0, 255 )
     oview1:bpaint:= {|| dibuja()  }
    // oview1:Repaint()         
return nil

Function dibuja()
  DrawBorderCircle(50,50,130,130,0,0,0,100  )
  DrawBorderCircle(60,60,110,110,0,0,0,100  )
  DrawBorderCircle(70,70,90,90,0,0,0,100  )
  DrawBorderCircle(80,80,70,70,0,0,0,100  )
  DrawBorderCircle(90,90,50,50,0,0,0,100  )
  DrawBorderCircle(100,100,30,30,0,0,0,100  )
  DrawCircle(110,110,10,10,0,0,0,100  ) 
  DrawLine(69,69,161,161,0,0,0,100)  
  DrawLine(115,50,115,180,0,0,0,100)  
  DrawLine(50,115,180,115,0,0,0,100)
  DrawLine(69,161,161,69,0,0,0,100)    
  Return nil

 


Image
Last edited by mastintin on Mon Dec 27, 2010 7:22 pm, edited 1 time in total.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Mon Dec 27, 2010 7:20 pm

Subido al repositorio el nuevo template compatible con los cambios propuestos por Antonio.
Saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 8:01 pm

mastintin wrote:
pgfdz wrote:la libreria monta ok. Pegame el código, plis

He vuelto a subir una nueva version de view.m al repositorio borrando un msginfo() de la depuracion que se quedo sin borrar .Vuelve a cargar el repositorio y regenera la libreria .
El codigo que tengo ahora mismo , un poco mas elaborado ya es este :
Code: Select all  Expand view

#include "fivephone.ch"

function Main()

   local owebview ,oWnd := TWindow():GetMain()  
 
     oView1 = TView():New( oWnd,0, 0, ScreenWidth(), ScreenHeight() - 49 )
     oView1:SetBkgColor( 0, 255, 0, 255 )
     oview1:bpaint:= {|| dibuja()  }
    // oview1:Repaint()         
return nil

Function dibuja()
  DrawBorderCircle(50,50,130,130,0,0,0,100  )
  DrawBorderCircle(60,60,110,110,0,0,0,100  )
  DrawBorderCircle(70,70,90,90,0,0,0,100  )
  DrawBorderCircle(80,80,70,70,0,0,0,100  )
  DrawBorderCircle(90,90,50,50,0,0,0,100  )
  DrawBorderCircle(100,100,30,30,0,0,0,100  )
  DrawCircle(110,110,10,10,0,0,0,100  ) 
  DrawLine(69,69,161,161,0,0,0,100)  
  DrawLine(115,50,115,180,0,0,0,100)  
  DrawLine(50,115,180,115,0,0,0,100)
  DrawLine(69,161,161,69,0,0,0,100)    
  Return nil

 


Image


!!!GRANDE MANUEL!!!! :D
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 8:03 pm

Creo que las funciones de pintado deben incluir el Contexto, no pillar el que existe en ese momento. Si quisieras pintar en otro contxto, en memoria, supongo, con estas funciones no podrías. En W2 obtenemos un DC y pintamos en el. Aquí creo que debería ser mas o menos lo mismo. ¿qué te parece?
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby mastintin » Mon Dec 27, 2010 8:15 pm

pgfdz wrote:Creo que las funciones de pintado deben incluir el Contexto, no pillar el que existe en ese momento. Si quisieras pintar en otro contxto, en memoria, supongo, con estas funciones no podrías. En W2 obtenemos un DC y pintamos en el. Aquí creo que debería ser mas o menos lo mismo. ¿qué te parece?

Todos los ejemplos que he visto ,lo usan asi .
Normalmente asignan primero el tipo de contexto en el que van a trabajar por ejemplo :

UIGraphicsBeginImageContext(self.view.frame.size);
.... uso del currentcontext
UIGraphicsEndImageContext();

digamos como si fuera ( entiendase la comparativa ) un Area en los dbfs .
Si tienes algun ejemplo distinto mandame el enlace y miramos como podemos cambiarlo .

---------edito-----
he encontrado la referencia de apple ....http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html

Code: Select all  Expand view

A graphics context contains drawing parameters and all device-specific information needed to render the paint on a page to the destination, whether the destination is a window in an application, a bitmap image, a PDF document, or a printer.
 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 9:05 pm

Mira:
http://www.codingventures.com/2009/08/image-manipulation-and-drawing-using-quartz-in-the-background-threads/

y
http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html

creo que deberiamos usar Quartz:

Quartz 2D is an advanced, two-dimensional drawing engine available for iOS application development and to all Mac OS X application environments outside of the kernel.
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby mastintin » Mon Dec 27, 2010 9:34 pm

pgfdz wrote:Mira:
http://www.codingventures.com/2009/08/image-manipulation-and-drawing-using-quartz-in-the-background-threads/

y
http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html

creo que deberiamos usar Quartz:

Quartz 2D is an advanced, two-dimensional drawing engine available for iOS application development and to all Mac OS X application environments outside of the kernel.


Paco , todas las funciones que estamos usando para dibujar "CGContext" llaman al framework Quarz 2d asi que ya lo estas utilizando . Por otro lado mirando toda esta documentacion la operativa es la misma genera un contexto lo usa y lo destruye ...
Podriamos intentar que estas funciones no cogieran el contexto por defecto pero el problema radica en como pasas un parametro del tipo CGContextRef a harbour ? Creo que es una extructura c , CGrect por ejemplo se puede trasformar a string , pasarla como estring y luego recuperarla , pero CGContextRef no tengo ni idea ...
Una solucion podria ser enumerar los distintos contextos , pasar el integer correspondiente , luego recuperar el contexto segun el integer que pasemos , pero sinceramente no es la mejor solucion .
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby pgfdz » Mon Dec 27, 2010 11:37 pm

Pues no se, la verdad. Vamos a dejarlo de momento como tu decías. Creo que no es lo mas importante decidir eso ahora. Creo que es mas interesante el poder disponer una clase "TControl" en IOS osea una TView de la que se pueda heredar para hacer controles. No es que este pirao por hacer controles pero por ejemplo, hacer un browse a imagen y semejanza de los controles nativos creo que sería un puntazo. Yo me voy a poner a ello en cuanto se pueda. Lo único que necesito es un Pseudo TControl ya sabes, poder interactuar con los gestos en pantalla, los toques, pintar y esas pequeñas cosas.
La idea que tengo del iBrowse es como si fuera una pagina grande que se pueda ver a través de la ventanita que nos proporciona el iphone-ipad
que podamos hacerla scroll moviendola con el dedo arriba-abajo-izda-dcha. La estoy viendo en mi mente y creo que puedo hacer el iBrowse o el iGrid o que se yo. Me lo imagino con todas estas posibilidades que da este entorno gráfico y alucino. Bueno... mañana mas.
buenas noches ;)
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: he conseguido un iphone

Postby mastintin » Tue Dec 28, 2010 1:02 pm

Antonio ...
-------edito ------------
Olvidate de esto era todo un bug introducido al meter el codigo para coger imagenes desde url y yaestá corregido .... lo siento :cry:
NO -> Nos falta la funcion fwrite$UNIX2003 con el ejemplo tutor image.prg
Saludos.

------ edito -----------------
siguiendo el dedo ....
http://www.youtube.com/watch?v=62OwAJUb8TQ
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: he conseguido un iphone

Postby mastintin » Tue Dec 28, 2010 10:05 pm

Antonio , Daniel .
Estoy liado con el tema del zoom in - zoom out , o pinch o como se llame ( detectar dos dedos que se separan , o se juntan ) .
Ya casi lo tengo , pero me falta un pequeño detalle , fijo que es una tonteria , pero estoy ofuscado.
El codigo siguiente captura los dos dedos y la distancia entre ellos ,la compara con otra tomada anteriormente en el evento touchbegan y dependiendo sea positiva o negativa , discernimos el evento
( puede que sea mejor hacerlo en un solo evento ) .El problema surge en que quiero pasar la diferencia a harbour .
Se supone que la diferencia entre 2 CGFloat es una CGFloat y esta no se como pasarla a harbour . He puesto LONG por poner algo , pero es otra cosa seguro :D
¿ como seria ?
Code: Select all  Expand view


                       UITouch *touch1 = [[allTouches allObjects] objectAtIndex:0];
            UITouch *touch2 = [[allTouches allObjects] objectAtIndex:1];
           
            CGFloat finalDistance =  distanceBetweenTwoPoints([touch1 locationInView:self], [touch2 locationInView:self]) ;        
           
           
            if ( initialDistance > finalDistance) {
               
                hb_vmPushSymbol( symFPH );
                hb_vmPushNil();
                hb_vmPushLong( ( LONG ) self );
                hb_vmPushLong( WM_TOUCHOUT );
                hb_vmPushLong( 0 );
                hb_vmPushLong( ( LONG ) ( initialDistance > finalDistance) );
                hb_vmDo( 4 );                  
            }
            else {
               
                hb_vmPushSymbol( symFPH );
                hb_vmPushNil();
                hb_vmPushLong( ( LONG ) self );
                hb_vmPushLong( WM_TOUCHIN );
                hb_vmPushLong( 0 );
                hb_vmPushLong( ( LONG ) ( initialDistance > finalDistance) );
                hb_vmDo( 4 );              
                               
            }

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

Re: he conseguido un iphone

Postby Daniel Garcia-Gil » Tue Dec 28, 2010 11:28 pm

Manuel

intenta pasar un valor doble de 2 decimales

hb_vmPushDouble( double dNumber, int iDec )
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: No registered users and 6 guests